Hello
I wrote the following code in GAMS but encountered an error. In the code,
I want to subtract several specific values of Y from X. E is a table with 5 columns and 24 rows. H is a parameter that includes 33 values, each with its own specific value (for example: Parameters H /1 20, 2 30, ..., 33 40/
). The error I am facing is displayed for the display command, and its text is as follows:
Error 141: Symbol declared but no values have been assigned. Check for missing data definition, assignment, data loading or implicit assignment via a solve statement. A wild shot: You may have spurious commas in the explanatory text of a declaration. Check symbol reference list.
This error is displayed even though each of the parameters E and H have numerical values. I would appreciate your guidance.
Code:
Parameters X(i, j), Y(k);
Equation es1, es2, es3, es4, es5, es6;
X(i, j) = E(i, j);
es1(k).. Y(k) =e= H(k);
es2(i, j, k).. Y('6') =e= X(i, 'j1')-Y('6');
es3(i, j, k).. Y('18') =e= X(i, 'j2')-Y('18');
es4(i, j, k).. Y('21') =e= X(i, 'j3')-Y('21');
es5(i, j, k).. Y('24') =e= X(i, 'j4')-Y('24');
es6(i, j, k).. Y('30') =e= X(i, 'j5')-Y('30');
display Y;