Changing labels in gdx file

Problems with syntax of GAMS
Post Reply
gamsguru
User
User
Posts: 1
Joined: 3 days ago

Changing labels in gdx file

Post by gamsguru » 3 days ago

Hi,

Is there a way to change the label of a set in a gdx file?

I want to do something similar to the example in https://www.gams.com/latest/docs/T_GDXRENAME.html but instead of changing the names of the values of the set, I want to change the label.

I have tried something like:

Set c / r, g, b, y /;

Parameter A(c);
A(c) = ord(c);

execute_unload 'data.gdx', A;
execute 'gdxdump data.gdx';

Set map(*,*) / c.colour /;
execute_unload 'map.gdx' map;

execute 'gdxrename data map';

execute 'gdxdump data.gdx';


I want this to give A(colour) as the label in the gdx file. But it is still A(c).

Post Reply