Network design with GAMS

Problems with modeling
Post Reply
frsc
User
User
Posts: 1
Joined: 1 month ago

Network design with GAMS

Post by frsc » 1 month ago

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!

abhosekar
Moderator
Moderator
Posts: 190
Joined: 10 months ago

Re: Network design with GAMS

Post by abhosekar » 1 month ago

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.

Post Reply