Originally posted by: SystemAdmin
[dgravot@noos.fr said:]
Hello
Looking at the sched_alloc model in the OPL6 model library, I understand that the model decides on which group of employees each given fixed task is assigned (through the alternative constraint).
Having group[g]>=0 means that we never allow uncovered active tasks of the group g (opttasks) : every interval opttasks that is active from date A to date B must be covered , that is the intervals of the worker of the group (workers[g]) must cover (at least) from A to B
Where I'm a little confused is the constraint : group[g]<=capacity[g]. If it had been <br />sum (w in workers[g]) pulse(worker[w], 1)<=capacity[g]<br />then I would have understood the constraint as : at any time, no more than capacity[g] workers can be active together, but since we substract the cumulative usage of active tasks of the group g, the meaning is less straightforward : cumulFunction group counts at each time point and for each group the number of employees that are not covering the active tasks of this group. So if we have let's say a capacity of 2 with 3 workers, we are still able to cover for instance 3 identical tasks from A to B with the 3 workers without violating the capacity.
Did I miss something in my understanding of the sample ?
Thanks
#DecisionOptimization#OPLusingCPOptimizer