Originally posted by: lisaz
Hello,
I have another question on one constraint of my model. Most probably, it's easy for to answer, but I just don't understand how to formulate it correctly.
I have the following constraint:
//Cons08: Departuring Flights to Ireland and Northern Ireland need to be assigned to gates: 2, 5, 16, 19, 20, 23, 25, 26, 27, 28
Cons08: forall(f in Flights) forall(g in {2,5,16,19,20,23,25,26,27,28})
if ((Type[f]==0) && (Destination[f]>=1)) {
assignment[f][g] ==1 ;}
and I have another constraint which says:
//Cons02: each flight is assigned to only one gate
Cons02: forall(f in Flights)
sum (g in Gates) assignment[f][g] ==1;
I attached my mod. file.
Whenever I run the model it doesn't find a solution and I think Constraint 8 and 2 are "contradicting" each other. Without constraint 8, a solution is found.
How can I properly formulate the "forall(g in {2,5,16,19,20,23,25,26,27,28})"? --> These numbers all belong to the set "Gates". The reasoning of Cons08 is that certain flights (e.g. to Ireland (--> indicated by "if...")) can only be assigned to the gates "2, 5, 16, 19,..." but not to other gates like "1,3,4,..."
Thank you so much for your help!!!
Regards, Lisa
#DecisionOptimization#OPLusingCPOptimizer