GAMS/PATH User Guide Version 4.3
GAMS/PATH User Guide Version 4.3
GAMS/PATH User Guide Version 4.3
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
variables x;<br />
equations d_f;<br />
x.lo = 0;<br />
x.up = 2;<br />
d_f.. 2*(x - 1) =e= 0;<br />
model first / d_f.x /;<br />
solve first using mcp;<br />
Figure 1.5: First order conditions as an MCP, first.gms<br />
are derived from the bounds on the associated variable. Before solving the<br />
problem, for finite bounded variables, we do not know if the associated function<br />
will be positive, negative or zero at the solution. Thus, we do not know<br />
whether to define the equation as “=e=”, “=l=” or “=g=”. <strong>GAMS</strong> therefore<br />
allows any of these, and informs the modeler via the “REDEF” label that<br />
internally <strong>GAMS</strong> has redefined the bounds so that the solver processes the<br />
correct problem, but that the solution given by the solver does not satisfy<br />
the original bounds. However, in practice, a REDEF can also occur when the<br />
equation is defined using “=e=” and the variable has a single finite bound.<br />
This is allowed by <strong>GAMS</strong>, and as above, at a solution of the complementarity<br />
problem, the variable is at its bound and the function F does not satisfy the<br />
“=e=” relationship.<br />
Note that this is not an error, just a warning. The solver has solved the<br />
complementarity problem specified by this equation. <strong>GAMS</strong> gives this report<br />
to ensure that the modeler understands that the complementarity problem<br />
derives the relationships on the equations from the bounds, not from the<br />
equation definition.<br />
1.4 Pitfalls<br />
As indicated above, the ordering of an equation is important in the specification<br />
of an MCP. Since the data of the MCP is the function F and the bounds<br />
ℓ and u, it is important for the modeler to pass the solver the function F and<br />
not −F .<br />
17