PROPT Euler Buckling Problem
From TomWiki
Jump to navigationJump to search
This page is part of the PROPT Manual. See PROPT Manual. |
Problem 4: Miser3 manual
Problem description
Over t in [0; 1 ], minimize
subject to:
% Copyright (c) 2007-2008 by Tomlab Optimization Inc.
Problem setup
toms t
toms z1
p = tomPhase('p', t, 0, 1, 40);
setPhase(p);
% States
tomStates x1 x2 x3 x4
% We don't need to introduce any control variables.
% Initial guess
x0 = {icollocate({
x1 == 0; x2 == 1
x3 == 0.5; x4 == t/40})
z1 == 10};
% Box constraints
cbox = {
icollocate({-10 <= x1 <= 10
-10 <= x2 <= 10; 0.5 <= x3 <= 10})
0 <= z1 <= 500};
% Boundary constraints
cbnd = {initial({x3 >= 0.5; x1 == 0
x2 == 1; x4 == 0})
final({x1 == 0; x4 == 1})};
% ODEs and path constraints
ceq = {collocate({
dot(x1) == x2
dot(x2) == -z1*x1./x3.^2
x3 >= 0.5 % Path constr.
% Integral constr.
})
integrate(x3) == 1};
% Objective
objective = z1;
Solve the problem
options = struct;
options.name = 'Euler Buckling';
solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);
% Extract optimal states and controls from solution
t = subs(collocate(t),solution);
x1 = subs(collocate(x1),solution);
x2 = subs(collocate(x2),solution);
x3 = subs(collocate(x3),solution);
Problem type appears to be: lpcon Time for symbolic processing: 0.12429 seconds Starting numeric solver ===== * * * =================================================================== * * * TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31 ===================================================================================== Problem: --- 1: Euler Buckling f_k 9.881895688695372800 sum(|constr|) 0.000000016445692785 f(x_k) + sum(|constr|) 9.881895705141065600 f(x_0) 10.000000000000000000 Solver: snopt. EXIT=0. INFORM=1. SNOPT 7.2-5 NLP code Optimality conditions satisfied FuncEv 1 ConstrEv 73 ConJacEv 72 Iter 33 MinorIter 240 CPU time: 0.062400 sec. Elapsed time: 0.068000 sec.
Plot result
figure(1)
plot(t,x1,'*-',t,x2,'*-',t,x3,'*-');
legend('x1','x2','x3');
title('Euler Buckling state variables');
Footnote
In the original [Miser3] problem formulation, it is requested to compute "u", equal to x3_t. u is not included in the optimization problem, thereby speeding up the solution process. x3_t can be obtained by simple numeric differentiation of x3.
Note, however, that because there was no constraint on u, and it was not included in the cost function, x3_t looks very strange.