Hello!
I'm new to GAMS and I'm still learning the basics. I have a model to implement in which one of the sets (T) includes the indices t and t'. Am I supposed to define the set normally or is there some particularity? The model has several variables that consider both indices (t and t'). How can I implement a constraint like the following:
A(khptt') = B(pht,t'-1) + k-sum of C(khptt') - k-sum of D(khptt') for all p, h, and t smaller than t'
?
Thanks to whoever can help me!
Network design with GAMS
Re: Network design with GAMS
Please take a look at alias. https://www.gams.com/latest/docs/UG_Set ... mesForASet
set t/t1*t10/;
alias(t, tt);
constraint(k, p, h, t, tt) $(ord(t) < ord(tt)).. A(k,h,p,t,tt) =e= B(p,h,t,tt-1) + ...
Hope this helps.
set t/t1*t10/;
alias(t, tt);
constraint(k, p, h, t, tt) $(ord(t) < ord(tt)).. A(k,h,p,t,tt) =e= B(p,h,t,tt-1) + ...
Hope this helps.