Originally posted by: PhilippeLaborie
I forgot to add that another way to do that is just to define all interval variables optional and post 'presenceOf' constraints on the present ones:
dvar interval itvJobs[j in JobList] optional;
...
subject to {
forall(j in JobList: j.type=="Pkup") {
presenceOf(itvJobs[j]);
}
};
#DecisionOptimization#OPLusingCPOptimizer