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.

164 CPLEX 11<br />

• You can collect all solutions or all optimal solutions to model. To do so, set the solution pool intensity<br />

parameter SolnPoolIntensity to its highest value.<br />

3.5.1 Filling the Solution Pool<br />

<strong>The</strong>re are two ways to fill the solution pool associated with a model: You can accumulate successive incumbents<br />

or generate alternative solutions by populating the solution pool. <strong>The</strong> method is selected with the parameter<br />

SolnPoolPop:<br />

• <strong>The</strong> regular optimization procedure automatically adds incumbents to the solution pool as they are discovered<br />

(SolnPoolPop=1).<br />

• Cplex also provides a procedure specifically to generate multiple solutions. You can invoke this procedure by<br />

setting option SolnPoolPop=2. You can also invoke this procedure many times in a row in order to explore<br />

the solution space differently. In particular, you may invoke this procedure multiple times to find additional<br />

solutions, especially if the first solutions found are not satisfactory. This is done by specifying a <strong>GAMS</strong><br />

program (option SolnPoolPopRepeat) that inspects the solutions. In case this <strong>GAMS</strong> program terminates<br />

normally, i.e. no execution or compilation error, the exploration for alternative solutions proceeds.<br />

<strong>The</strong> option SolnPoolReplace designates the strategy for replacing a solution in the solution pool when the<br />

solution pool has reached its capacity. <strong>The</strong> value 0 replaces solutions according to a first-in, first-out policy. <strong>The</strong><br />

value 1 keeps the solutions with the best objective values. <strong>The</strong> value 2 replaces solutions in order to build a set<br />

of diverse solutions.<br />

If the solutions you obtain are too similar to each other, try setting SolnPoolReplace to 2.<br />

<strong>The</strong> replacement strategy applies only to the subset of solutions created in the current call of populate. Solutions<br />

already in the pool are not affected by the replacement strategy. <strong>The</strong>y will not be replaced, even if they satisfy<br />

the criterion of the replacement strategy. So with every repeated call of the populate procedure the solution<br />

pool will be extended by the newly found solution. After the <strong>GAMS</strong> program specified in SolnPoolPopRepeat<br />

determined to continue the search for alternative solutions, the file specified by option SolnPoolPopDel option<br />

is read in. <strong>The</strong> solution numbers present in this file will be delete from the solution pool before the populate<br />

routine is called again. <strong>The</strong> file is automatically deleted by the <strong>GAMS</strong>/Cplex link after processing.<br />

Details can be found in the model solnpool in the <strong>GAMS</strong> model library.<br />

3.5.2 Enumerating All Solutions<br />

With the solution pool, you can collect all solutions to a model. To do so, set the solution pool intensity parameter<br />

SolnPoolIntensity to its highest value, 4 and set SolnPoolPop=2.<br />

You can also enumerate all solutions that are valid for a specific criterion. For example, if you want to enumerate<br />

all alternative optimal solutions, do the following:<br />

• Set the pool absolute gap parameter SolnPoolAGap=0.0.<br />

• Set the pool intensity parameter SolnPoolIntensity=4.<br />

• Set the populate limit parameter PopulateLim to a value sufficiently large for your model; for example,<br />

2100000000.<br />

• Set the pool population parameter SolnPoolPop=2.<br />

Beware, however, that, even for small models, the number of possible solutions is likely to be huge. Consequently,<br />

enumerating all of them will take time and consume a large quantity of memory.<br />

<strong>The</strong>re may be an infinite number of possible values for a continuous variable, and it is not practical to enumerate<br />

all of them on a finite-precision computer. <strong>The</strong>refore, populate gives only one solution for each set of binary

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

Saved successfully!

Ooh no, something went wrong!