PROPT Hanging Chain: Difference between revisions
From TomWiki
Jump to navigationJump to search
(Created page with "{{Part Of Manual|title=the PROPT Manual|link=PROPT Manual}} Benchmarking Optimization Software with COPS Elizabeth D. Dolan and Jorge J. More ARGONNE NATIONAL LABOR...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Part Of Manual|title=the PROPT | {{Part Of Manual|title=the PROPT Manual|link=[[PROPT|PROPT Manual]]}} | ||
Benchmarking Optimization Software with COPS Elizabeth D. Dolan and Jorge J. More ARGONNE NATIONAL LABORATORY | Benchmarking Optimization Software with COPS Elizabeth D. Dolan and Jorge J. More ARGONNE NATIONAL LABORATORY | ||
Line 80: | Line 80: | ||
title('Hanging Chain state variable'); | title('Hanging Chain state variable'); | ||
</source> | </source> | ||
[[File:hangingChain_01.png]] |
Revision as of 14:23, 2 November 2011
This page is part of the PROPT Manual. See PROPT Manual. |
Benchmarking Optimization Software with COPS Elizabeth D. Dolan and Jorge J. More ARGONNE NATIONAL LABORATORY
Problem Formulation
Find x(t) over t in [0; 1 ] to minimize
subject to:
% Copyright (c) 2007-2008 by Tomlab Optimization Inc.
Problem setup
toms t
p = tomPhase('p', t, 0, 1, 30);
setPhase(p);
tomStates x
% Initial guess
a = 1; b = 3;
x0 = icollocate(x == 2*abs(b-a)*t.*(t-2*(0.25+(b<a)*0.5))+1);
% Constraints
con = {initial(x) == a
final(x) == b
integrate(sqrt(1+dot(x).^2)) == 4};
% Objective
objective = integrate(x.*sqrt(1+dot(x).^2));
Solve the problem
options = struct;
options.name = 'Hanging Chain';
solution = ezsolve(objective, con, x0, options);
t = subs(collocate(t),solution);
x = subs(collocate(x),solution);
Problem type appears to be: con Time for symbolic processing: 0.092435 seconds Starting numeric solver ===== * * * =================================================================== * * * TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31 ===================================================================================== Problem: --- 1: Hanging Chain f_k 5.068480111039492400 sum(|constr|) 0.000000000097416963 f(x_k) + sum(|constr|) 5.068480111136909500 f(x_0) 4.742150260697735900 Solver: snopt. EXIT=0. INFORM=1. SNOPT 7.2-5 NLP code Optimality conditions satisfied FuncEv 295 GradEv 293 ConstrEv 293 ConJacEv 293 Iter 244 MinorIter 279 CPU time: 0.171601 sec. Elapsed time: 0.171000 sec.
Plot result
figure(1)
plot(t,x,'*-');
legend('x');
title('Hanging Chain state variable');