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.

146 CONOPT<br />

CONOPT will after the preprocessor immediately add artificial variables to all infeasible constraints so Phase 0<br />

will be eliminated, but the sum and number of infeasibilities at the start of Phase 1 will be larger. You are in<br />

reality trading Phase 0 iterations for Phase 1 iterations.<br />

You may also try the experimental bending line search with<br />

lmmxsf = 1<br />

<strong>The</strong> line search in Phase 0 will with this option be different and the infeasibilities may be reduced faster than<br />

with the default ”lmmxsf = 0”. It is likely to be better if the number of iterations with both MX = F and OK<br />

= F is large. This option may be combined with ”lstcrs = t”. Usually, linear constraints that are feasible<br />

will remain feasible. However, you should note that with the bending linesearch linear feasible constraints could<br />

become infeasible.<br />

Phase 1 and 3: <strong>The</strong> number of iterations in Phase 1 and Phase 3 will probably be reduced if you use steepest<br />

edge, ”lsanrm = t”, but the overall time may increase. Steepest edge seems to be best for models with less than<br />

5000 constraints, but work in progress tries to push this limit upwards. Try it when the number of iterations is<br />

very large, or when many iterations are poorly behaved identified with OK = F in the iteration log. <strong>The</strong> default<br />

SLP mode is usually an advantage, but it is too expensive for a few models. If you observe frequent changes<br />

between SLP mode and non-SLP mode, or if many line searches in the SLP iterations are ill-behaved with OK =<br />

F, then it may be better to turn SLP off with ”lseslp = f”.<br />

Phase 2 and 4: <strong>The</strong>re are currently not many options available if most of the time is spend in Phase 2 and Phase<br />

4. If the change in objective during the last iterations is very small, you may reduce computer time in return for<br />

a slightly worse objective by reducing the optimality tolerance, rtredg.<br />

A13<br />

Miscellaneous Topics<br />

A13.1 Triangular Models<br />

A triangular model is one in which the non-fixed variables and the equations can be sorted such that the first<br />

equation only depends on the first variable, the second equation only depends on the first two variables, and the<br />

p-th equation only depends on the first p variables. Provided there are no difficulties with bounds or small pivots,<br />

triangular models can be solved one equation at a time using the method describe in section ”A4.1 Preprocessing:<br />

Pre-triangular Variables and Constraints” and the solution process will be very fast and reliable.<br />

Triangular models can in many cases be useful for finding a good initial feasible solution: Fix a subset of the<br />

variables so the remaining model is known to be triangular and solve this triangular simulation model. <strong>The</strong>n<br />

reset the bounds on the fixed variables to their original values and solve the original model. <strong>The</strong> first solve will<br />

be very fast and if the fixed variables have been fixed at good values then the solution will also be good. <strong>The</strong><br />

second solve will start from the good feasible solution generated by the first solve and it will usually optimize<br />

much more quickly than from a poor start.<br />

<strong>The</strong> modeler can instruct CONOPT that a model is supposed to be triangular with the option ”lstria = t”.<br />

CONOPT will then use a special version of the preprocessing routine (see section 4.1) that solves the model very<br />

efficiently. If the model is solved successfully then CONOPT terminates with the message:<br />

** Feasible solution to a recursive model.<br />

and the Model Status will be 2, Locally Optimal, or 1, Optimal, depending on whether there were any nonlinear<br />

pivots or not. All marginals on both variables and equations are returned as 0 (zero) or EPS.<br />

Two SOLVEs with different option files can be arranged by writing the option files as they are needed from within<br />

the <strong>GAMS</strong> program with PUT statements followed by a PUTCLOSE. You can also have two different option files,<br />

for example conopt.opt and conopt.op2, and select the second with the <strong>GAMS</strong> statement ”.optfile =<br />

2;”.<br />

<strong>The</strong> triangular facility handles a number of error situations:<br />

1. Non-triangular models: CONOPT will ensure that the model is indeed triangular. If it is not, CONOPT will<br />

return model status 5, Locally Infeasible, plus some information that allows the modeler to identify the mistake.

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

Saved successfully!

Ooh no, something went wrong!