PROPT Hanging Chain

From TomWiki
Jump to navigationJump to search

Notice.png

This page is part of the PROPT Manual. See PROPT Manual.

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

Problem Formulation

Find x(t) over t in [0; 1 ] to minimize


subject to:


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

Problem setup

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

tomStates x

% Initial guess
a = 1; b = 3;
x0 = icollocate(x == 2*abs(b-a)*t.*(t-2*(0.25+(b<a)*0.5))+1);

% Constraints
con = {initial(x) == a
    final(x) == b
    integrate(sqrt(1+dot(x).^2)) == 4};

% Objective
objective = integrate(x.*sqrt(1+dot(x).^2));

Solve the problem

options = struct;
options.name = 'Hanging Chain';
solution = ezsolve(objective, con, x0, options);
t = subs(collocate(t),solution);
x = subs(collocate(x),solution);
Problem type appears to be: con
Time for symbolic processing: 0.081962 seconds
Starting numeric solver
===== * * * =================================================================== * * *
TOMLAB - TOMLAB Development license  999007. Valid to 2011-12-31
=====================================================================================
Problem: ---  1: Hanging Chain                  f_k       5.068480111039492400
                                       sum(|constr|)      0.000000000097416963
                              f(x_k) + sum(|constr|)      5.068480111136909500
                                              f(x_0)      4.742150260697735900

Solver: snopt.  EXIT=0.  INFORM=1.
SNOPT 7.2-5 NLP code
Optimality conditions satisfied

FuncEv  295 GradEv  293 ConstrEv  293 ConJacEv  293 Iter  244 MinorIter  279
CPU time: 0.156001 sec. Elapsed time: 0.163000 sec. 

Plot result

figure(1)
plot(t,x,'*-');
legend('x');
title('Hanging Chain state variable');

HangingChain 01.png