Modeling with the solution pool tool

Problems with modeling
Post Reply
User avatar
bussieck
Moderator
Moderator
Posts: 1038
Joined: 7 years ago

Re: Modeling with the solution pool tool

Post by bussieck »

From your email it is not clear what issue you face. You just attached the standard model solmpool from the GAMS Model Library (https://www.gams.com/latest/gamslib_ml/ ... mpool.html). The alias (*,u) is used to initialize the parameter xcostX(soln,*) to 0. Since an assignment xcostX(soln,*) = is not possible, this model needs an alias to the universe *. I doubt that this is your problem. Perhaps you can send your model and show where the real issue is.

-Michael
User avatar
bussieck
Moderator
Moderator
Posts: 1038
Joined: 7 years ago

Re: Modeling with the solution pool tool

Post by bussieck »

Here is the corrected code. -Michael
eoglsp_solpool_mrb.gms
(12.65 KiB) Downloaded 380 times
Fred
Posts: 373
Joined: 7 years ago

Re: Modeling with the solution pool tool

Post by Fred »

Enrique,

In your latest example there are 4 solve statements. You loop over 2 scenarios and for every scenario you solve the model twice.
It seems that in readsoln.gms you are computing some sort of report parameter xcostX. You could give this parameter additional indices for scenario and 1st/2nd solve to store the results from all solves (note that you should not clear xcostX in that case).
You could also give the solnpool gdx files different names in the cplex.opt file (e.g. with a scenario and 1st/2nd Solve suffix) if you want to keep them all.

I attached a modified version of the gms file.
glsp_pool_inst_ff.gms
Attachments
glsp_pool_inst_ff.gms
(13.69 KiB) Downloaded 200 times
Fred
Posts: 373
Joined: 7 years ago

Re: Modeling with the solution pool tool

Post by Fred »

Hi,

if you want to incorporate the solution time in report parameter xcostx, you could do for example

Code: Select all

xcostX(scenario,'%1',solnpool,'TIME','','','')  = EOGLSP.resusd;
This gives the time the solver took for a solve statement. I don't think that you can access the information at what time of a solve a particular solution from the solution pool was found.

I hope this helps!

Fred
Post Reply