Class KUnaryResourceConstraint

java.lang.Object
com.artelys.kalis.KConstraint
com.artelys.kalis.KUnaryResourceConstraint

public class KUnaryResourceConstraint extends 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 :



Since:
2016.1
  • Constructor Details

    • KUnaryResourceConstraint

      protected KUnaryResourceConstraint(long cPtr, boolean cMemoryOwn)
    • KUnaryResourceConstraint

      public KUnaryResourceConstraint(String name, KIntVarArray startsp, int propagation)
      Constructor

      Parameters:
      name - name of this constraint
      startsp - array of starts variables
      propagation - propagation scheme @see KUnaryResource#PropagationHint
    • KUnaryResourceConstraint

      public KUnaryResourceConstraint(String name, KIntVarArray startsp)
      Constructor

      Parameters:
      name - name of this constraint
      startsp - array of starts variables
      See Also:
      KUnaryResource#PropagationHint
    • KUnaryResourceConstraint

      public KUnaryResourceConstraint(KUnaryResourceConstraint toCopy)
      Copy constructor
  • Method Details

    • getCPtr

      protected static long getCPtr(KUnaryResourceConstraint obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class KConstraint
    • delete

      public void delete()
      Overrides:
      delete in class KConstraint
    • addTask

      public void addTask(com.artelys.kalis.SWIGTYPE_p_KTask_I task)