Hi, I am trying to save an optimal solution of variable x (with zero dimension) to gdx file, and retrieve it from gdx to a parameter.

So code looks like this.

Variable

x;

Parameter

par;

Equation

Solve the problem

Execute_unload ‘save.gdx’, x;

Execute_load ‘save.gdx’, par = x.l;

However, the above code does not work with error message “Cannot load/unload symbol with unknown dimension”.

If I change the dimension of variable x with an arbitrary set (for example x(i)) and do the same thing, the same code works just fine. But this is not what I want, because I need to introduce redundant sets for all variables then.

So my question is how to load the level value of a variable with zero dimension from gdx file to a parameter.

Thank you.