Nishida problem

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

Contents

Problem description

This case study was presented by Nishida et al. (1976) and it is posed as follows:

Minimize:

$$ J = x_1(t_f)^2+x_2(t_f)^2+x_3(t_f)^2+x_4(t_f)^2 $$

subject to:

$$ \frac{dx_1}{dt} = -0.5*x_1+5*x_2 $$

$$ \frac{dx_2}{dt} = -5*x_1-0.5*x_2+u $$

$$ \frac{dx_3}{dt} = -0.6*x_3+10*x_4 $$

$$ \frac{dx_4}{dt} = -10*x_3-0.6*x_4+u $$

$$ -1.0 <= u <= 1.0 $$

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
Starting numeric solver
===== * * * =================================================================== * * *
TOMLAB - Tomlab Optimization Inc. Development license  999001. Valid to 2011-02-05
=====================================================================================
Problem: ---  1: Nishida Problem                f_k       1.004741515225467100
                                       sum(|constr|)      0.000000000061595707
                              f(x_k) + sum(|constr|)      1.004741515287062700
                                              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  872 GradEv  872 
CPU time: 0.687500 sec. Elapsed time: 0.703000 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');