GDX reading
Posted: Fri Dec 21, 2018 2:47 am
Dear All,
I am solving an optimization problem that works well. For further extension, I need the value to save the value of a variable (var) in a parameter (par). They both have same dimension. I have read in the help section and one way is to use GDX facility. I saved my variable in an gdx file results3.gdx. Now, I want to read the current value (.l) this but it end it an error "cannot load/unload this suffix". Does it occurs due to some syntax problem or due the logic? Or is there any other way to save/copy variable value in a parameter? This a general code
set t /1*50/
parameter par(t);
variable var(t)
** solve optimization problem**
execute_unload 'results3.gdx',
var.l;
$gdxin results3
$load par=var.l
$gdxin
Thanks
I am solving an optimization problem that works well. For further extension, I need the value to save the value of a variable (var) in a parameter (par). They both have same dimension. I have read in the help section and one way is to use GDX facility. I saved my variable in an gdx file results3.gdx. Now, I want to read the current value (.l) this but it end it an error "cannot load/unload this suffix". Does it occurs due to some syntax problem or due the logic? Or is there any other way to save/copy variable value in a parameter? This a general code
set t /1*50/
parameter par(t);
variable var(t)
** solve optimization problem**
execute_unload 'results3.gdx',
var.l;
$gdxin results3
$load par=var.l
$gdxin
Thanks