problem in using ord
Posted: Tue Oct 10, 2023 3:02 pm
i tried to save i th term of a parameter in a scalar but gams says Uncontrolled set entered as constant. can anybody help me?
here is my code
sets i /1*3/
j/1*3/;
scalar counter /1/
a /0/
b /0/;
parameters
dinf(i) /1*3 0/ ;
a= dinf(i)$(ord(i) = counter);
display a
here is my code
sets i /1*3/
j/1*3/;
scalar counter /1/
a /0/
b /0/;
parameters
dinf(i) /1*3 0/ ;
a= dinf(i)$(ord(i) = counter);
display a