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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NLPEC 417<br />

This problem has the unique solution x 1 = 0, x 2 = −1, y 1 = 0, y 2 = 1. Note that f(x, y) = x 1 + x 2 and<br />

g(x, y) = x 2 1 + x 2 2 − 1 are the objective function and the standard nonlinear programming constraints for this<br />

problem. <strong>The</strong> function h(x, y) is given by:<br />

[ ]<br />

x1 − y<br />

h(x, y) =<br />

1 + y 2 − 1<br />

x 2 + y 2<br />

and<br />

[ 0<br />

a =<br />

−1<br />

] [ ∞<br />

, b =<br />

1<br />

]<br />

.<br />

This example is written very succinctly in <strong>GAMS</strong> notation as:<br />

$TITLE simple mpec example<br />

variable f, x1, x2, y1, y2;<br />

positive variable y1;<br />

y2.lo = -1;<br />

y2.up = 1;<br />

equations cost, g, h1, h2;<br />

cost.. f =E= x1 + x2;<br />

g.. sqr(x1) + sqr(x2) =L= 1;<br />

h1.. x1 =G= y1 - y2 + 1;<br />

h2.. x2 + y2 =N= 0;<br />

model example / cost, g, h1.y1, h2.y2 /;<br />

solve example using mpec min f;<br />

Note that the equation cost is used to define f, the constraint g defines the function g, and h is defined by h1<br />

and h2. <strong>The</strong> complementarity constraints utilize the standard <strong>GAMS</strong> convention of specifying the orthogonality<br />

relationship between h and y in the model statement. <strong>The</strong> interpretation of the “.” relies on the bounds a and b<br />

that are specified using positive, negative, or lo and up keywords in <strong>GAMS</strong>. Note that since h2 really specifies<br />

a function h 2 and not a constraint h 2 (x, y) = 0, we use the <strong>GAMS</strong> syntax =N= to ensure this is clear here. Since<br />

the relationships satisfied by h 1 and h 2 are determined by the bounds, =G= could also be replaced by =N= in h1.<br />

In describing the various reformulations for (24.6), it is convenient to partition the y variables into free F, lower<br />

bounded L, upper bounded U and doubly bounded B variables respectively, that is:<br />

B := {y = (y F , y L , y U , y B ) : a L ≤ y L , y U ≤ b U , a B ≤ y B ≤ b B } .<br />

We will assume (without loss of generality) that a B < b B . If a i = b i then (24.6) holds trivially for the index i and<br />

we can remove the constraint h i and its corresponding (fixed) variable y i from the model. <strong>The</strong> complementarity<br />

condition for variables in y i ∈ F is simply the equality h i (x, y) = 0 so these equality constraints are moved<br />

directly into the NLP constraints g of the original model as equalities. Thus, NLPEC needs only to treat the<br />

singly-bounded variables in L and U and the doubly-bounded variables in B. In the above example, L = {1},<br />

U = ∅ and B = {2}.<br />

3.1 Product reformulations<br />

Product reformulations all involve products of y i with h i , or products of y i with some auxiliary or slack variables<br />

that are set equal to h i . <strong>The</strong> underlying point is that the constraints (24.3) are entirely equivalent to the following<br />

system of equalities and inequalities:<br />

w L = h L (x, y), a L ≤ y L , w L ≥ 0 and (y L − a L ) T w L = 0<br />

v U = −h U (x, y), y U ≤ b U , v U ≥ 0 and (b U − y U ) T v U = 0<br />

w B − v B = h B (x, y), a B ≤ y B ≤ b B , w B ≥ 0, v B ≥ 0<br />

(y B − a B ) T w B = 0, (b B − y B ) T v B = 0.<br />

(24.7)

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

Saved successfully!

Ooh no, something went wrong!