class KUnaryResourceConstraint : public KConstraint¶
This constraint states that some tasks are not overlapping chronologically.
Resources (machines, raw material etc) can be of two different types :
Disjunctive when the resource can process only one task at a time (represented by the class KUnaryResource).
Cumulative when the resource can process several tasks at the same time (represented by the class KDiscreteResource).
Traditional examples of disjunctive resources are Jobshop problems, cumulative resources are heavily used for the Resource-Constrained Project Scheduling Problem (RCPSP). Note that a disjunctive resource is semantically equivalent to a cumulative resource with maximal capacity one and unit resource usage for each task using this resource but this equivalence does not hold in terms of constraint propagation.
The following schema shows an example with three tasks A,B and C executing on a disjunctive resource and on a cumulative resource with resource usage 3 for task A, 1 for task B and 1 for task C :
KUnaryResourceConstraint(const char *name, KIntVarArray &startsp, int propagation = KUnaryResource::Disjunctions | KUnaryResource::TasksIntervals)¶
name – name of this constraint
startsp – array of starts variables
propagation – propagation scheme