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.

CONOPT 147<br />

<strong>The</strong> necessary information is related to the order of the variables and equations and number of occurrences of<br />

variables and equations, and since <strong>GAMS</strong> does no have a natural place for this type of information CONOPT<br />

returns it in the marginals of the equations and variables. <strong>The</strong> solution order for the triangular equations and<br />

variables that have been solved successfully are defined with positive numbers in the marginals of the equations<br />

and variables. For the remaining non- triangular variables and equations CONOPT shows the number of places<br />

they appear as negative numbers, i.e. a negative marginal for an equation shows how many of the non- triangular<br />

variables that appear in this equation. You must fix one or more variables until at least one of the non-triangular<br />

equation only has one non-fixed variable left.<br />

2. Infeasibilities due to bounds: If some of the triangular equations cannot be solved with respect to their<br />

variable because the variable will exceed the bounds, then CONOPT will flag the equation as infeasible, keep<br />

the variable at the bound, and continue the triangular solve. <strong>The</strong> solution to the triangular model will therefore<br />

satisfy all bounds and almost all equations. <strong>The</strong> termination message will be<br />

** Infeasible solution. xx artificial(s) have been<br />

introduced into the recursive equations.<br />

and the model status will be 5, Locally Infeasible.<br />

<strong>The</strong> modeler may in this case add explicit artificial variables with high costs to the infeasible constraints and<br />

the resulting point will be an initial feasible point to the overall optimization model. You will often from the<br />

mathematics of the model know that only some of the constraints can be infeasible, so you will only need to check<br />

whether to add artificials in these equations. Assume that a block of equations MATBAL(M,T) could become<br />

infeasible. <strong>The</strong>n the artificials that may be needed in this equation can be modeled and identified automatically<br />

with the following <strong>GAMS</strong> constructs:<br />

SET APOSART(M,T) Add a positive artificial in Matbal<br />

ANEGART(M,T) Add a negative artificial in Matbal;<br />

APOSART(M,T) = NO; ANEGART(M,T) = NO;<br />

POSITIVE VARIABLE<br />

VPOSART(M,T) Positive artificial variable in Matbal<br />

VNEGART(M,T) Negative artificial variable in Matbal;<br />

MATBAL(M,T).. Left hand side =E= right hand side<br />

+ VPOSART(M,T)$APOSART(M,T) - VNEGART(M,T)$ANEGART(M,T);<br />

OBJDEF.. OBJ =E= other_terms +<br />

WEIGHT * SUM((M,T), VPOSART(M,T)$APOSART(M,T)<br />

+VNEGART(M,T)$ANEGART(M,T) );<br />

Solve triangular model ...<br />

APOSART(M,T)$(MATBAL.L(M,T) GT MATBAL.UP(M,T)) = YES;<br />

ANEGART(M,T)$(MATBAL.L(M,T) LT MATBAL.LO(M,T)) = YES;<br />

Solve final model ...<br />

3. Small pivots: <strong>The</strong> triangular facility requires the solution of each equation to be locally unique which also<br />

means that the pivots used to solve each equation must be nonzero. <strong>The</strong> model segment<br />

E1 .. X1 =E= 0;<br />

E2 .. X1 * X2 =E= 0;<br />

will give the message

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

Saved successfully!

Ooh no, something went wrong!