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.

130 CONOPT<br />

the NLP solver will compute constraint values and derivatives in various points within the bounds defined by<br />

the modeler. If these calculations result in undefined intermediate or final values, a function evaluation error is<br />

reported, an error counter is incremented, and the point is flagged as a bad point. <strong>The</strong> following action will then<br />

depend on the solver. <strong>The</strong> solver may try to continue, but only if the modeler has allowed it with an ”Option<br />

Domlim = xxx”. <strong>The</strong> problem of detecting discontinuities is changed from a structural test at the <strong>GAMS</strong> model<br />

generation stage to a dynamic test during the solution process.<br />

You may have a perfectly nice model in which intermediate terms become undefined. <strong>The</strong> composite function<br />

SQRT( POWER(x,3) ) is mathematically well defined around x = 0, but the computation will involve the<br />

derivative of SQRT at zero, that is undefined. It is the modeler’s responsibility to write expressions in a way that<br />

avoids undefined intermediate terms in the function and derivatives computations. In this case, you may either<br />

add a small strictly positive lower bound on x or rewrite the function as x**1.5.<br />

8 Conic Constraints with <strong>GAMS</strong>/CONOPT<br />

Certain types of conic constraints can be formulated in <strong>GAMS</strong> as described in the <strong>GAMS</strong>/MOSEK user’s guide.<br />

<strong>The</strong> <strong>GAMS</strong>/CONOPT interface translates these constraints into nonlinear constraints and treats them as described<br />

in this note.<br />

<strong>The</strong> quadratic cone is described in <strong>GAMS</strong> as<br />

Qcone.. x =C= sum(i, y(i) );<br />

and it represents the convex nonlinear constraint<br />

x > sqrt( sum(i, sqr( y(i) ) ) ).<br />

<strong>The</strong> rotated quadratic (or hyperbolic) cone is described in <strong>GAMS</strong> as<br />

Hcone.. x1 + x2 =C= sum(i, y(i) );<br />

and it represents the convex nonlinear constraint<br />

sqrt(2*x1*x2) > sqrt( sum(i, sqr( y(i) ) ) ) with x1 > 0 and x2 > 0.<br />

<strong>The</strong> cones are in <strong>GAMS</strong>/CONOPT implemented using one of two mathematical forms. <strong>The</strong> mathematical form<br />

is selected from the CONOPT option GCForm as follows:<br />

GCForm = 0 (the default value):<br />

QCone.. sqr(x) =G= sum(i, sqr( y(i) ) );<br />

Hcone.. 2*x1*x2 =G= sum(i, sqr( y(i) ) );<br />

GCForm = 1:<br />

QCone.. x+GCPtb2 =G= sqrt( GCPtb1+sum(i, sqr( y(i) ) ) );<br />

Hcone.. Sqrt( GCPtb1 + 2*x1*x2 ) =G= Sqrt( GCptb1+sum(i, sqr( y(i) ) ) );<br />

where GCPtb1 and GCPtb2 are perturbation parameters (explained below).<br />

<strong>The</strong> advantages and disadvantages of the two formulations are as follows: With GCForm = 0 all functions are<br />

quadratic with a sparse Hessian and bounded second derivatives. However, function values grow with sqr(x) and<br />

first derivatives grow with x and CONOPT’s automatic scaling methods will sometimes have problems selecting<br />

good scaling factors for these equations. With GCForm = 1 the functions are more complicated with dense Hessian<br />

matrices. However, the function values grow linearly with x and the first derivatives are unit vectors which usually<br />

gives a nicely scaled model.

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

Saved successfully!

Ooh no, something went wrong!