I am trying to update the set I am looping over at each iteration, my code looks like the following:
SET
hours / 1*8760 /;
Alias(hours, h);
SET
k(h);
SCALARS start, i;
start = 1;
for(i=1 to 365,
*----- Updating Set --------------------------------------
k(h)$((ord(h)>=i*start) and (ord(h)=1) and (ord(h)<20))=yes;
**** $188
188 Assigning to this set is NOT allowed. The set may have been
used in a domain definition or is a predefined/readonly set.
Anybody have any clues on what I am doing wrong?
\
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/dKWHg6bWr6IJ.
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.
Hello,
did you probably define ps as ps(w,k) instead of ps(w,h). if you use a set in a parameter definition it can not be dynamic!
Am Samstag, 14. Juli 2012 12:34:41 UTC+2 schrieb Bjarke Durhuus:
I am trying to update the set I am looping over at each iteration, my code looks like the following:
SET
hours / 1*8760 /;
Alias(hours, h);
SET
k(h);
SCALARS start, i;
start = 1;
for(i=1 to 365,
*----- Updating Set --------------------------------------
k(h)$((ord(h)>=i*start) and (ord(h)=1) and (ord(h)<20))=yes;
**** $188
188 Assigning to this set is NOT allowed. The set may have been
used in a domain definition or is a predefined/readonly set.
Anybody have any clues on what I am doing wrong?
\
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/QtbB4ClKvSoJ.
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.