Linear Tangent Steering Problem

Benchmarking Optimization Software with COPS Elizabeth D. Dolan and Jorge J. More ARGONNE NATIONAL LABORATORY

Contents

Problem Formulation

Find u(t) over t in [0; tF ] to minimize

$$ J = t_f $$

subject to:

$$ \frac{d^{2}y_1}{dt^{2}} = a*cos(u) $$

$$ \frac{d^{2}y_2}{dt^{2}} = a*sin(u) $$

$$ |u| <= \frac{pi}{2} $$

$$ y_{1:2}(0) = 0 $$

$$ \frac{dy_{1:2}}{dt} = 0 $$

$$ a = 1 $$

$$ y_{2}(f) = 5 $$

$$ \frac{dy_{1:2}}{dt}(f) = [45 \ 0] $$

The following transformation gives a new formulation:

$$ x_1 = y_1 $$

$$ x_2 = \frac{dy_1}{dt} $$

$$ x_3 = y_2 $$

$$ x_4 = \frac{dy_2}{dt} $$

$$ \frac{dx_1}{dt} = x_2 $$

$$ \frac{dx_2}{dt} = a*cos(u) $$

$$ \frac{dx_3}{dt} = x_4 $$

$$ \frac{dx_4}{dt} = a*sin(u) $$

% Copyright (c) 2007-2008 by Tomlab Optimization Inc.

Problem setup

toms t
toms tf
p = tomPhase('p', t, 0, tf, 30);
setPhase(p);

tomStates x1 x2 x3 x4
tomControls u

% Initial guess
x0 = {tf == 1
    icollocate({
    x1 == 12*t/tf
    x2 == 45*t/tf
    x3 == 5*t/tf
    x4 == 0})};

% Box constraints
cbox = {sqrt(eps) <= tf
    -pi/2 <= collocate(u) <= pi/2};

% Boundary constraints
cbnd = {initial({x1 == 0; x2 == 0; x3 == 0; x4 == 0})
    final({x2 == 45; x3 == 5; x4 == 0})};

% ODEs and path constraints
a = 100;
ceq = collocate({dot(x1) == x2
    dot(x2) == a*cos(u)
    dot(x3) == x4
    dot(x4) == a*sin(u)});

% Objective
objective = tf;

Solve the problem

options = struct;
options.name = 'Linear Tangent Steering';
options.solver = 'knitro';
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: lpcon
===== * * * =================================================================== * * *
TOMLAB - Tomlab Optimization Inc. Development license  999001. Valid to 2010-02-05
=====================================================================================
Problem: ---  1: Linear Tangent Steering        f_k       0.554570878334224250
                                       sum(|constr|)      0.000000008174906782
                              f(x_k) + sum(|constr|)      0.554570886509131000
                                              f(x_0)      1.000000000000000000

Solver: KNITRO.  EXIT=0.  INFORM=0.
Default NLP KNITRO
Locally optimal solution found

FuncEv    9 GradEv    7 HessEv    7 ConstrEv    8 ConJacEv    7 ConHessEv    6 Iter    6 MinorIter    6
CPU time: 0.218750 sec. Elapsed time: 0.110000 sec. 

Plot result

subplot(2,1,1)
plot(t,x1,'*-',t,x2,'*-',t,x3,'*-',t,x4,'*-');
legend('x1','x2','x3','x4');
title('Linear Tangent Steering state variables');

subplot(2,1,2)
plot(t,u,'+-');
legend('u');
title('Linear Tangent Steering control');