KUnaryResourceConstraint

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 :

../../_images/resources.png

Since

2016.1

Public Types

enum PropagationLevel

Differents level of propagation for the constraints.

Values:

enumerator FORWARD_CHECKING
enumerator BOUND_CONSISTENCY
enumerator GENERALIZED_ARC_CONSISTENCY
enumerator USING_GCC

Public Functions

KUnaryResourceConstraint(const char *name, KIntVarArray &startsp, int propagation = KUnaryResource::Disjunctions | KUnaryResource::TasksIntervals)

Constructor

See

KUnaryResource::PropagationHint

Parameters
  • name – name of this constraint

  • startsp – array of starts variables

  • propagation – propagation scheme

KUnaryResourceConstraint(const KUnaryResourceConstraint &toCopy)

Copy constructor.