Hi everyone,
I'm including the looping in my model and would like to use the result from the latest calculation as a new initial guess of the new loop.
I figured that there should be a new variable to define and save the result, but I'm stuck and would like some suggestion.
Thank you
Using the last result as new initial guess
Re: Using the last result as new initial guess
Hi
You could use a savepoint. >See this example https://www.gams.com/latest/testlib_ml/ ... avep1.html.
The idea is to save your solution with the option savepoint, e.g.
Cheers
Renger
You could use a savepoint. >See this example https://www.gams.com/latest/testlib_ml/ ... avep1.html.
The idea is to save your solution with the option savepoint, e.g.
Code: Select all
model mymodel/ALL/;
option savepoint=1;
solve mymodel using ...;
* Solve the next version with the savepoint
* Set the new scenario
x = 10;
....
* Solve the model using the previous solve information
execute_loadpoint 'mymodel_p';
solve mymodel using ...;
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist