Originally posted by: SystemAdmin
Hello.
There's no real difference between the two versions. Note that
return (test==1);
creates a new goal for decision test==1. This goal is executed just after the current goal. Therefore in total, there will be two goals executed. A shortcut is:
solver.solve(IlcGoal(test==1));
This executes only one goal, but otherwise there's no difference.
Note that your search should instantiate all variables, not only variable test.
Best regards, Petr
#CPOptimizer#DecisionOptimization