Hey, I am trying to model the following inequation in GAMS.
so I try something like this:
SETS
T time instants /01000/
J jobs /j1j2/;
ALIAS(T,S);
And then in the equation:
EQ(T) … SUM(J, SUM(S$(s LE t)$(s GE t+1-p(j)), x(j,s)) =L= 1 ;
However, I get a compile error “Dimension different - The symbol is referenced with more/less indices as declared”.
So what is the trick of getting the conditionals work as desired.
Thank you!
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Hi Sten
This has probably nothing to do with your condtional (although they won’t work either), but with the dimensions of the variables that do not match their declaration. However, it is hard to check, as you don’t send code that could reproduce your problem (and the included picture is not showing).
Cheers
Renger
Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von Sten Gruener
Gesendet: Mittwoch, 1. Juli 2015 09:54
An: gamsworld@googlegroups.com
Betreff: Ranged sums in GAMS
Hey, I am trying to model the following inequation in GAMS.
so I try something like this:
SETS
T time instants /01000/
J jobs /j1j2/;
ALIAS(T,S);
And then in the equation:
EQ(T) … SUM(J, SUM(S$(s LE t)$(s GE t+1-p(j)), x(j,s)) =L= 1 ;
However, I get a compile error “Dimension different - The symbol is referenced with more/less indices as declared”.
So what is the trick of getting the conditionals work as desired.
Thank you!
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.