PROPT Nishida problem: Difference between revisions
From TomWiki
Jump to navigationJump to search
(Created page with "{{Part Of Manual|title=the PROPT Manual|link=PROPT Manual}} Second-order sensitivities of general dynamic systems with application to optimal control problems. 1999...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Part Of Manual|title=the PROPT | {{Part Of Manual|title=the PROPT Manual|link=[[PROPT|PROPT Manual]]}} | ||
Second-order sensitivities of general dynamic systems with application to optimal control problems. 1999, Vassilios S. Vassiliadis, Eva Balsa Canto, Julio R. Banga | Second-order sensitivities of general dynamic systems with application to optimal control problems. 1999, Vassilios S. Vassiliadis, Eva Balsa Canto, Julio R. Banga | ||
Line 113: | Line 113: | ||
title('Nishida Problem control'); | title('Nishida Problem control'); | ||
</source> | </source> | ||
[[File:nishidaProblem_01.png]] |
Revision as of 14:24, 2 November 2011
This page is part of the PROPT Manual. See PROPT Manual. |
Second-order sensitivities of general dynamic systems with application to optimal control problems. 1999, Vassilios S. Vassiliadis, Eva Balsa Canto, Julio R. Banga
Case Study 6.3: Nishida problem
Problem description
This case study was presented by Nishida et al. (1976) and it is posed as follows:
Minimize:
subject to:
with the initial conditions: x(i) = 10, i=1,..,4 and with t_f = 4.2.
% Copyright (c) 2007-2010 by Tomlab Optimization Inc.
Problem setup
toms t
p = tomPhase('p', t, 0, 4.2, 60);
setPhase(p);
tomStates x1 x2 x3 x4
tomControls -integer u
% Initial guess
x0 = {icollocate({
x1 == 10-10*t/4.2; x2 == 10-10*t/4.2
x3 == 10-10*t/4.2; x4 == 10-10*t/4.2})
collocate(u == 0)};
% Box constraints
cbox = {icollocate({
-15 <= x1 <= 15; -15 <= x2 <= 15
-15 <= x3 <= 15; -15 <= x4 <= 15})
-1 <= collocate(u) <= 1};
% Boundary constraints
cbnd = initial({x1 == 10; x2 == 10
x3 == 10; x4 == 10});
% ODEs and path constraints
ceq = collocate({
dot(x1) == -0.5*x1+5*x2
dot(x2) == -5*x1-0.5*x2+u
dot(x3) == -0.6*x3+10*x4
dot(x4) == -10*x3-0.6*x4+u});
% Objective
objective = final(x1)^2+final(x2)^2+final(x3)^2+final(x4)^2;
Solve the problem
options = struct;
options.name = 'Nishida Problem';
options.solver = 'cplex';
solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);
t = subs(collocate(t),solution);
x1 = subs(collocate(x1),solution);
x2 = subs(collocate(x2),solution);
x3 = subs(collocate(x3),solution);
x4 = subs(collocate(x4),solution);
u = subs(collocate(u),solution);
Problem type appears to be: miqp Time for symbolic processing: 0.12123 seconds Starting numeric solver ===== * * * =================================================================== * * * TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31 ===================================================================================== Problem: --- 1: Nishida Problem f_k 1.004741515225362000 sum(|constr|) 0.000000000099725394 f(x_k) + sum(|constr|) 1.004741515325087400 f(x_0) 0.000000000000000000 Solver: CPLEX. EXIT=0. INFORM=102. CPLEX Branch-and-Cut MIQP solver Optimal sol. within epgap or epagap tolerance found FuncEv 14 GradEv 14 CPU time: 0.171601 sec. Elapsed time: 0.164000 sec.
Plot result
subplot(2,1,1)
plot(t,x1,'*-',t,x2,'*-',t,x3,'*-',t,x4,'*-');
legend('x1','x2','x3','x4');
title('Nishida Problem state variables');
subplot(2,1,2)
plot(t,u,'+-');
legend('u');
title('Nishida Problem control');