Hanging Chain

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

Contents

Problem Formulation

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

$$ J = \int_0^{1} x*\sqrt{1+(\frac{dx}{dt})^2} \mathrm{d}t $$

subject to:

$$ \int_0^{1} \sqrt{1+(\frac{dx}{dt})^2} \mathrm{d}t = 4 $$

$$ x_0 = 1 $$

$$ x_1 = 3 $$

% 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
===== * * * =================================================================== * * *
TOMLAB - Tomlab Optimization Inc. Development license  999001. Valid to 2010-02-05
=====================================================================================
Problem: ---  1: Hanging Chain                  f_k       5.068480111111110600
                                       sum(|constr|)      0.000000000515360569
                              f(x_k) + sum(|constr|)      5.068480111626470800
                                              f(x_0)      4.742150260697741300

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.484375 sec. Elapsed time: 0.484000 sec. 

Plot result

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