Page 1 of 1

Empty parameter in gdx after unload

Posted: Wed Jan 12, 2022 6:41 pm
by suj8trip8
Hey.

I am trying to save two sets and a multidimensional parameter into a gdx file. To do this, I use gdxout and unload commands. I see both the sets in the newly created gdx file. But, the parameter is empty or has zero record. Could you please tell where I am going wrong? I am new to GAMS and thanks for your help.

So, here is what I do:

Define Sets, parameters

Load sets, parameters for a gdx file

Do some math operations (manipulations) with parameters to generate a new parameter

Save the new parameter to a new gdx file

Re: Empty parameter in gdx after unload

Posted: Wed Jan 12, 2022 7:48 pm
by abhosekar
Sujit,
can you attach a minimal example reproducing this issue?

Code: Select all

set 
i /i1*i5/
j /j1*j5/
;

parameter
p(i);
p(i) =20;

execute_unload 'parameterunload.gdx';
Does this work for you? Do you see parameter p in the gdx resulting gdx file after running the above program?

- Atharv