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.

340 MINOS<br />

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

model m /all/;<br />

solve m using nlp minimizing z;<br />

This can be cast in form NLP (equations (1) − (4)) by saying minimize z subject to z = ∑ i resid2 i and the other<br />

constraints in the model. Although simple, this approach is not always preferable. Especially when all constraints<br />

are linear it is important to minimize ∑ i resid2 i directly. This can be achieved by a simple reformulation: z can<br />

be substituted out. <strong>The</strong> substitution mechanism carries out the formulation if all of the following conditions 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 MINOS. For instance the<br />

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

energy.lo = 0;<br />

on the objective variable energy and thus preventing it from being substituted out, MINOS 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=minos;<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).<br />

5 <strong>GAMS</strong> Options<br />

<strong>The</strong> following <strong>GAMS</strong> options are used by <strong>GAMS</strong>/MINOS:<br />

5.1 Options Specified through the Option Statement<br />

<strong>The</strong> following options are specified through the option statement. For example,<br />

option iterlim = 100 ;<br />

sets the iteration limit to 100.

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

Saved successfully!

Ooh no, something went wrong!