Hello,
I’m solving a scenario problem and I need to store the value of optcr associated with every scenario solution in the excel file.
I tried using
PUT ‘OG’,loop (scn, PUT optcr)PUT/;
but it gave an error 140
Error 140 in…
Unknowm sysmbol
Please help.
You can access run time options only through the option statement for setting: “option optCR=0.05;”. If you want to do more with optCR e.g. write it out at its current value you should switch to the model attribute (see https://www.gams.com/latest/docs/UG_ModelSolve.html#UG_ModelSolve_ModelAttributes) modelname.optCR. This one overwrites the global run-time option optCR and is accessible in other statements like put:
* Instead of option optCR=0.05 do
modelmodel.optCR = 0.05;
solve mymodel min obj using mip;
put mymodel.optCR /;
-Michael
Hello Michael,
Thank you it solved the issue.
I can do a lot more now with this approach. I didn’t know about it.
Thank you.