« Previous « Start » Next »
54 Isoperimetric Constraint Problem
54.1 Problem Formulation
Find u over t in [0; 1 ] to minimize
subject to:
The initial condition are:
54.2 Problem setup
toms t
p = tomPhase('p', t, 0, 1, 30);
setPhase(p);
tomStates x
tomControls u
% Initial guess
x0 = {icollocate(x == 0)
collocate(u == 0)};
% Box constraints
cbox = {icollocate(-10 <= x <= 10)
collocate(-4 <= u <= 4)};
% Boundary constraints
cbnd = {initial(x == 1)
final(x == 0)};
% ODEs and path constraints
ceq = collocate(dot(x) == -sin(x)+u);
% Integral constraint
cint = {integrate(u^2) == 10};
% Objective
objective = integrate(x);
54.3 Solve the problem
options = struct;
options.name = 'Isoperimetric';
solution = ezsolve(objective, {cbox, cbnd, ceq, cint}, x0, options);
t = subs(collocate(t),solution);
x = subs(collocate(x),solution);
u = subs(collocate(u),solution);
Problem type appears to be: lpcon
Starting numeric solver
===== * * * =================================================================== * * *
TOMLAB - Tomlab Optimization Inc. Development license 999001. Valid to 2011-02-05
=====================================================================================
Problem: --- 1: Isoperimetric f_k -0.375495523108184680
sum(|constr|) 0.000000031769415330
f(x_k) + sum(|constr|) -0.375495491338769360
f(x_0) 0.000000000000000000
Solver: snopt. EXIT=0. INFORM=1.
SNOPT 7.2-5 NLP code
Optimality conditions satisfied
FuncEv 1 ConstrEv 112 ConJacEv 112 Iter 53 MinorIter 216
CPU time: 0.171875 sec. Elapsed time: 0.171000 sec.
54.4 Plot result
subplot(2,1,1)
plot(t,x,'*-');
legend('x');
title('Isoperimetric state variable');
subplot(2,1,2)
plot(t,u,'+-');
legend('u');
title('Isoperimetric control');
« Previous « Start » Next »