Hi All,
I’m using Gams for the very first time for modelling purpose and I’m stuck with a problem for the past 3-4 days. I’ve gone through the manual but couldn’t figure out the reason behind this error. I would highly appreciate if someone can help me out with this issue.
Gams Code:
Set i /14/ ;
Set j /14/ ;
Set k /0*1/ ;
Set s /0/;
Scalar h;
h = 5;
Parameter
alpha(i) / 1 0, 2 15, 3 12, 4 0/
beta(i) / 1 4, 2 5, 3 2, 4 2/ ;
Parameter c(i,j,k), d(i,s,k);
****Below mentioned is the part of code, that is generating errors:
c(i,j,k)= h*(j-i) + alpha(i)k ;
d(i,s,k)= beta(i)(1-k) - alpha(i)*k ;
Error being thrown by the compiler is:
Error 148: Dimension different- The symbol is referenced with more/less indices as declared.
Logically, I find the definition of c(i,j,k) and d(i,s,k) to be fine and thus I’m unable to comprehend the reason for this error. Going further I defined a Parameter II(i) and assigned it value as follows,
II(i) = i;
Even this simple statement throws the same error.
Thanks & Regards,
Akshat
–
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/-zIOTTUSeLsJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.