Access of variables during execution

Problems with modeling
Post Reply
YounesIsbeih
User
User
Posts: 1
Joined: 6 years ago

Access of variables during execution

Post 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.
I. Huck
User
User
Posts: 3
Joined: 6 years ago

Re: Access of variables during execution

Post 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
Post Reply