0

I don't know it is the place to ask this GAMS question but I couldn't find any other source.

My question is about reading 3 dimensional parameter to GAMS from Excel file. I know it if there is a 2 dimensional parameter we should use;

parameter t(i, j)
$call GDXXRW data.xlsx par=t trace=3 cdim=1 rdim=1 rng=Sayfa1!A1
$GDXIN data.gdx
$LOAD t
$GDXIN

As the same way if we use:

parameter t(i,j,k)
$call GDXXRW data.xlsx par=t trace=3 cdim=1 rdim=1 rng=Sayfa1!A1
$GDXIN data.gdx
$LOAD t
$GDXIN

Then it says "LOAD dimensions are different". How can it be done? Is there someone has knowledge GAMS? Please help.

Ali Tor
  • 180

1 Answers1

1

rdim+cdim should be 3 in your case. So depending on how the data is layed out in Excel, you should have rdim=1 cdim=2 or rdim=2 cdim=1.

E.g. for data like:

enter image description here

you would use rdim=2 cdim=1.