Originally posted by: jako123
Hi, I wonder if anybody could help with this:
I declare a number of interval variables that are optional in the solution
dvar interval job[s in Calls][c in Cabins] optional size duration[s];
At least 3 must be present in any solution:
(Constraint 1) forall(s in Calls, c in Cabins)
sum(s in Calls, c in Cabins) presenceOf(job[s][c]) == nbCalls;
To order them I use a sequence variable
dvar sequence assignment[c in Cabins] in all(s in Calls, c in Cabins) job[s][c];
First question: what does all mean here: does it enforce the sequence to take all job intervals or can it still be a subset of the jobs?
Furthermore, I am struggling with various unbound expression, e.g. in this constraint:
forall(s1,s2 in Calls, c1,c2 in Cabins)
if(presenceOf(job[s1][c1]) && presenceOf(job[s2][c2]) && s1==s2 ){
c1==c2;
}
Anybody an idea why the solver would not pick some job[s][c] and evaluate the presence of it?
many thanks in advance
#ConstraintProgramming-General#DecisionOptimization