Originally posted by: JCPawlowski
Thank you a lot Alex !
That is what I tought but unfortunately I cannot use exactly this version as you can see in my constraint I use my tuple <i,j,c,b> and also <j,i,c,b>, therefore I cannot use the short "a" and have to put the whole tuple !
I also tried to put the whole tuple in my saving command as follow but somehow it doesn't work :
for (<i,j,c,b> in Arcs) {
for (var e in Epochs) {
Duals[<i,j,c,b>][e] = ctLinkCapacity[<i,j,c,b>][e].dual;
}
}
The script doesn't accept it ! Is there a way to do it ? or do i have to change the constraint itself ?
can I slice in the constraint using two arc a1 and a2 ? and setting the tuples like this: item(a1,0) == item(a2,1) and item(a1,1) == item(a2,0) and item(a1,2) == item(a2,2) and item(a1,3) == item(a2,3)
// Temporal capacity constraints
forall (a1 in Arcs, a2 in Arcs, e in Epochs : item(a1,0) == item(a2,1) and item(a1,1) == item(a2,0) and item(a1,2) == item(a2,2) and item(a1,3) == item(a2,3))
ctLinkCapacity:
sum (d in Demands, f in 1 .. d.td : f <= e) d.bw * (dArc[d, a1, (e-f+1)] + dArc[d, a2, (e-f+1)]) <= b;
I remember something about not slicing with decision variables.
Thanks in advance
Regards,
JC
#DecisionOptimization#OPLusingCPLEXOptimizer