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.

PATH 4.6 471<br />

$include walras.dat<br />

positive variables p(i), y(j);<br />

variables d(i);<br />

equations S(i), L(j), demand(i);<br />

demand(i)..<br />

d(i) =e= c(i)*sum(k, g(k)*p(k)) / p(i) ;<br />

S(i).. b(i) + sum(j, A(i,j)*y(j)) - d(i) =g= 0 ;<br />

L(j).. -sum(i, p(i)*A(i,j)) =g= 0 ;<br />

model walras / demand.d, S.p, L.y /;<br />

solve walras using mcp;<br />

Figure 28.3: Walrasian equilibrium as an MCP, walras2.gms<br />

1.2.3 Mixed Complementarity Problem<br />

A mixed complementarity problem (MCP) is specified by three pieces of data, namely the lower bounds l, the<br />

upper bounds u and the function F .<br />

(MCP) Given lower bounds l ∈ {R ∪ {−∞}} n , upper bounds u ∈ {R ∪ {∞}} n and a function F : R n → R n ,<br />

find z ∈ R n such that precisely one of the following holds for each i ∈ {1, . . . , n}:<br />

F i (z) = 0 and l i ≤ z i ≤ u i<br />

F i (z) > 0 and z i = l i<br />

F i (z) < 0 and z i = u i .<br />

<strong>The</strong>se relationships define a general MCP (sometimes termed a rectangular variational inequality [25]). We will<br />

write these conditions compactly as<br />

l ≤ x ≤ u ⊥ F (x).<br />

Note that the nonlinear complementarity problem of Section 1.1.3 is a special case of the MCP. For example, to<br />

formulate an NCP in the <strong>GAMS</strong>/MCP format we set<br />

or declare<br />

z.lo(I) = 0;<br />

positive variable z;<br />

Another special case is a square system of nonlinear equations<br />

(NE) Given a function F : R n → R n find z ∈ R n such that<br />

F (z) = 0.<br />

In order to formulate this in the <strong>GAMS</strong>/MCP format we just declare<br />

free variable z;<br />

In both the above cases, we must not modify the lower and upper bounds on the variables later (unless we wish<br />

to drastically change the problem under consideration).

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

Saved successfully!

Ooh no, something went wrong!