Page 1 of 1

Using the last result as new initial guess

Posted: Tue Jul 09, 2019 6:31 pm
by Nadhita.C
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

Re: Using the last result as new initial guess

Posted: Tue Jul 09, 2019 8:00 pm
by Renger
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.

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 ...;
Cheers
Renger