AC refers to every single variable in the model and ACP is an Alias for AC.
I understand that the error comes from cDim = 1 because when I increase cdim to a value x, the error message changes to Bad dimension:x.
Yet I know that labels are defined at column 1… So I am confused.
Hi Sarah
It looks like you haven’t defined AC yet. If I define the parameter PARAMETER ZIMSAM2(*, *) instead of PARAMETER ZIMSAM2(AC,ACP), the import runs fine.
Did you define/import AC before you want to import ZIMSAM2?
Hope this helps
Cheers
Renger
Hi Renger,
Thank you for this prompt reply. I did define AC previously, as well as ACP as an alias for AC. Furthermore, I can import all my data correctly if I enter it manually in the following way:
This is a subsection of the data, but it would be too long to enter all of it manually, hence my interest in uploading the data from Excel.
So my question is the following: I can write ZIMSAM2(AC, ACP) in a table and GAMS will recognize the parameter ZIMSAM2, as well as AC and ACP, but I don’t understand why GAMS won’t do the same if I import the data from Excel?
You don’t need semicolons after “$”-statements.
Here GAMS gives the error: “ZIMSAM2 Bad dimension: 1;”
Drop the semicolon in “cdim=1;” and it should work fine.