16.01.2015 Views

GAMS — The Solver Manuals - Available Software

GAMS — The Solver Manuals - Available Software

GAMS — The Solver Manuals - Available Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SNOPT 523<br />

2 Description of the method<br />

Here we briefly describe the main features of the SQP algorithm used in SNOPT and introduce some terminology.<br />

<strong>The</strong> SQP algorithm is fully described by by Gill, Murray and Saunders[7].<br />

2.1 Objective function reconstruction<br />

<strong>The</strong> first step <strong>GAMS</strong>/SNOPT performs is to try to reconstruct the objective function. In <strong>GAMS</strong>, optimization<br />

models minimize or maximize an objective variable. SNOPT however works with an objective function. One way<br />

of dealing with this is to add a dummy linear function with just the objective variable. Consider the following<br />

<strong>GAMS</strong> fragment:<br />

obj.. z =e= sum(i, sqr[r(i)]);<br />

model m /all/;<br />

solve m using nlp minimizing z;<br />

This can be cast in form (32.1) by saying minimize z subject to z = ∑ i r2 i and the other constraints in the<br />

model. Although simple, this approach is not always preferable. Especially when all constraints are linear it is<br />

important to minimize the nonlinear expression ∑ i r2 i directly. This can be achieved by a simple reformulation: z<br />

can be substituted out. <strong>The</strong> substitution mechanism carries out the formulation if all of the following conditions<br />

hold:<br />

• the objective variable z is a free continuous variable (no bounds are defined on z),<br />

• z appears linearly in the objective function,<br />

• the objective function is formulated as an equality constraint,<br />

• z is only present in the objective function and not in other constraints.<br />

For many models it is very important that the nonlinear objective function be used by SNOPT. For instance the<br />

model chem.gms from the model library solves in 16 iterations. When we add the bound<br />

energy.lo = 0;<br />

on the objective variable energy and thus preventing it from being substituted out, SNOPT will not be able to<br />

find a feasible point for the given starting point.<br />

This reformulation mechanism has been extended for substitutions along the diagonal. For example, the <strong>GAMS</strong><br />

model<br />

variables x,y,z;<br />

equations e1,e2;<br />

e1..z =e= y;<br />

e2..y =e= sqr(1+x);<br />

model m /all/;<br />

option nlp=snopt;<br />

solve m using nlp minimizing z;<br />

will be reformulated as an unconstrained optimization problem<br />

minimize f(x) = (1 + x) 2 .<br />

<strong>The</strong>se additional reformulations can be turned off by using the statement option reform = 0; (see §4.1).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!