Appending to a parameter
Posted: Wed Jan 02, 2019 1:18 am
Hi everyone,
I am constructing a linear program of an energy system with multiple sectors. For each sector, some calculations are performed and saved in an Excel workbook. Each workbook contains a portion of the data that makes up a parameter. I would like to define a parameter in a .gms file and call each of the Excel workbooks (using GDXXRW) to construct the single parameter. I have not found a way to do this that doesn't overwrite the parameter with each GDXXRW call.
For example, workbook 1 would have:
EconomyA.Sector1.1990
EconomyA.Sector1.1991
EconomyA.Sector1.1992
and workbook 2 would have:
EconomyA.Sector2.1990
EconomyA.Sector2.1991
EconomyA.Sector2.1992
The parameter would be the six elements. Has anyone tried to do this? I searched on the forum but didn't find a related post (I might have missed one, though).
Thank you,
David Wogan
I am constructing a linear program of an energy system with multiple sectors. For each sector, some calculations are performed and saved in an Excel workbook. Each workbook contains a portion of the data that makes up a parameter. I would like to define a parameter in a .gms file and call each of the Excel workbooks (using GDXXRW) to construct the single parameter. I have not found a way to do this that doesn't overwrite the parameter with each GDXXRW call.
For example, workbook 1 would have:
EconomyA.Sector1.1990
EconomyA.Sector1.1991
EconomyA.Sector1.1992
and workbook 2 would have:
EconomyA.Sector2.1990
EconomyA.Sector2.1991
EconomyA.Sector2.1992
The parameter would be the six elements. Has anyone tried to do this? I searched on the forum but didn't find a related post (I might have missed one, though).
Thank you,
David Wogan