Year to Year Solve for Multiyear problem

Archive of Gamsworld Google Group
Post Reply
alamince
User
User
Posts: 1
Joined: 5 months ago

Year to Year Solve for Multiyear problem

Post by alamince » 5 months ago

Hello,

I am solving a multi-year MINLP problem. I would like to solve the problem from year to year. That is, I would like to solve the problem for one year at a time in a way that GAMS should use previous year's solution to solve the next year problem. For example, once the program solves for year 1, then it should use the solution of year 1 to solve the problem for year 2 and so on. How can I do it in a single run?

Thanks,

Al-Amin

User avatar
Renger
Posts: 221
Joined: 2 years ago

Re: Year to Year Solve for Multiyear problem

Post by Renger » 5 months ago

Hi
You could use a loop over all years (You might have to rewrite the model equations, so that the time is not part of the model anymore)

Code: Select all

set t /2018*2050/

 * Define the model parameters for each year
table myyearlyvalues(t,*);
     capa   ...
2018  10
2019   11
;

loop(t,

   mymodelparameter = myyearlyvalues(t, "capa");
   ...
   solve mymodel
* Adjust the start values (if necessary for the next year)
mymodelstart = X.L;
);
Gams will, in most cases, use the solution of the previous solve as a starting point for the next solve.

Hope this helps
Cheers
Renger

Post Reply