|
Effect of advanced basis on solution performance |
Top Previous Next |
|
The effect of an advanced basis on solver performance is best illustrated by example. Suppose I take a model and solve it twice (twotran.gms) and observe what happens in comparison with solving the model alone. In particular, I solve a model first then I solve it again then I alter the objective function and solve it a third time. The code to do this appears below (twotran.gms).
SOLVE FIRM USING LP MAXIMIZING NETINCOME; SOLVE FIRM USING LP MAXIMIZING NETINCOME; TRANSCOST(PRODUCT,TYPE,PLANT,PLANTS) =TRANSCOST(PRODUCT,TYPE,PLANT,PLANTS)*3; SOLVE FIRM USING LP MAXIMIZING NETINCOME;
The first solve of the model takes 11 iterations the second one takes 0 and the third one takes 1. The model in the third solve when solved all by itself (twotrana.gms) takes 12 iterations. The reason for fewer iterations when the second and third solves are issued is that GAMS suggested an advanced basis using the saved solution information from the prior solve. |