Page 1 of 1

Network design with GAMS

Posted: Fri Jun 18, 2021 1:29 pm
by frsc
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!

Re: Network design with GAMS

Posted: Thu Jun 24, 2021 4:53 pm
by abhosekar
Please take a look at alias. ... 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.