Page 1 of 1

Access of variables during execution

Posted: Wed Feb 21, 2018 9:50 am
by YounesIsbeih
Hi all

I would like to optimize the performce of a dynamic model built in matlab using gams. At each iteration of the solving process in gams, i want to examine some constraints using the dynamic model of matlab and then incoporate them in my optimization in GAMS. I would like to ask if it is possible to access the variables at each iteration of the solving process and store them in a gdx file such that matlab can read it and evaluate the constraints.

Thanks.

Re: Access of variables during execution

Posted: Thu Feb 22, 2018 10:52 pm
by I. Huck
Dear Younes Isbeih,
You can maybe do the folling: You can set the maximum iteration of your solver for example to 10 by running your gams model using the
option IterLim=10;
Then you can execute the model in a loop and store the output of your iterations.
simply put a
execute_unload filename storevariable
If you want to change the filename during the execution, you can use put_utility.
I hope it helps.
Best wishes
Ingo Huck