Originally posted by: SystemAdmin
[phlab said:]
Hello,
Is iloStateResource actually an instance of IloStateResource? Looking at the exception, it looks like it could be an IloAltResSet.
By the way, in ILOG CP / ILOG Scheduler, alternative of state resources are not supported. If you want to model alternative of state resources, you need to post constraints on the boolean status of the 'require' constraint. For instance, for an activity requiring either state1 of stateResource1 or state2 of stateResource2, you could do:
IloBoolVar x1(env);
IloBoolVar x2(env);
model.add(x1 == act.requires(stateResource1, state1));
model.add(x2 == act.requires(stateResource2, state2));
model.add(x1 != x2);
Philippe
#CPOptimizer#DecisionOptimization