Hi everyone,
I have a set d /NYCHI, NYBOS, NYDC, CHINY, BOSNY, DCNY / which is the set of trips between original points and destinations: NYC to Chicago, NYC to Boston, NYC to DC, and their reverse directions.
I have a variable b which is the budget I need to prepare for my trip. I want to add a constraint that set the budget I need for the trip from NYC to Chicago is equal to the trip from Chicago to NYC; and so on (so basically the direction of the trip doesn’t impact the budget). So I’m doing so in GAMS by using 2 parameters, origin and destination that are defined over set d, (NY is 1, Chicago is 2, Boston is 3, and DC is 4).
Parameter
origin(d) origin of trip
/NYCHI 1, NYBOS 1, NYDC 1, CHINY 2, BOSNY 3, DCNY 4/
destination(d) /NYCHI 2, NYBOS 3, NYDC 4, CHINY 1, BOSNY 1, DCNY 1/;
So my constraint is:
Alias(d,dd);
constraint1(d)$(origin(d)=destination(dd) and origin(dd)=destination(dd)).. b(d) =e= b(dd);
But doing this I got error 149: Uncontrolled set entered as constant. What did I do wrong here? Any help is greatly appreciated! Thank you!