Using the last result as new initial guess

Problems with modeling
Post Reply
Nadhita.C
User
User
Posts: 3
Joined: 1 week ago

Using the last result as new initial guess

Post by Nadhita.C » 1 week ago

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

User avatar
Renger
Posts: 305
Joined: 2 years ago

Re: Using the last result as new initial guess

Post by Renger » 1 week ago

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
____________________________________
Enjoy modeling even more: The lazy economist

Post Reply