Class CumulativeUnary


public class CumulativeUnary extends Cumulative
CumulativeUnary implements the scheduling constraint for unary resources using

overload, not-first-not-last and detectable algorithms based on

Petr Vilim, "O(n log n) Filtering Algorithms for Unary Resource Constraints", Proceedings of CP-AI-OR 2004,

Version:
4.8
  • Field Details

    • doProfile

      private boolean doProfile
    • tvn

      private final TaskView[] tvn
      Local copies of tasks in normal and reserved views
    • tvr

      private final TaskView[] tvr
    • taskIncLctComparator

      private Comparator<TaskView> taskIncLctComparator
    • taskIncLstComparator

      private Comparator<TaskView> taskIncLstComparator
    • taskIncEctComparator

      private Comparator<TaskView> taskIncEctComparator
  • Constructor Details

    • CumulativeUnary

      public CumulativeUnary(IntVar[] starts, IntVar[] durations, IntVar[] resources, IntVar limit)
      It creates a cumulative constraint.
      Parameters:
      starts - variables denoting starts of the tasks.
      durations - variables denoting durations of the tasks.
      resources - variables denoting resource usage of the tasks.
      limit - the overall limit of resources which has to be used.
    • CumulativeUnary

      public CumulativeUnary(IntVar[] starts, IntVar[] durations, IntVar[] resources, IntVar limit, boolean doProfile)
      It creates a cumulative constraint.
      Parameters:
      starts - variables denoting starts of the tasks.
      durations - variables denoting durations of the tasks.
      resources - variables denoting resource usage of the tasks.
      limit - the overall limit of resources which has to be used.
      doProfile - defines whether to do profile-based propagation (true) or not (false); default is false
    • CumulativeUnary

      public CumulativeUnary(List<? extends IntVar> starts, List<? extends IntVar> durations, List<? extends IntVar> resources, IntVar limit)
      It creates a cumulative constraint.
      Parameters:
      starts - variables denoting starts of the tasks.
      durations - variables denoting durations of the tasks.
      resources - variables denoting resource usage of the tasks.
      limit - the overall limit of resources which has to be used.
    • CumulativeUnary

      public CumulativeUnary(List<? extends IntVar> starts, List<? extends IntVar> durations, List<? extends IntVar> resources, IntVar limit, boolean doProfile)
      It creates a cumulative constraint.
      Parameters:
      starts - variables denoting starts of the tasks.
      durations - variables denoting durations of the tasks.
      resources - variables denoting resource usage of the tasks.
      limit - the overall limit of resources which has to be used.
      doProfile - defines whether to do profile-based propagation (true) or not (false); default is false
  • Method Details

    • consistency

      public void consistency(Store store)
      Description copied from class: Constraint
      It is a (most probably incomplete) consistency function which removes the values from variables domains. Only values which do not have any support in a solution space are removed.
      Overrides:
      consistency in class Cumulative
      Parameters:
      store - constraint store within which the constraint consistency is being checked.
    • overload

      private void overload(TaskView[] ts)
    • notFirstNotLast

      private void notFirstNotLast(Store store, TaskView[] tn, TaskView[] tr)
    • notFirstNotLastPhase

      private void notFirstNotLastPhase(Store store, TaskView[] tc)
    • notLast

      private void notLast(Store store, ThetaTree tree, TaskView[] t, TaskView[] q, TaskView[] tc)
    • detectable

      private void detectable(Store store, TaskView[] tn, TaskView[] tr)
    • detectablePhase

      private void detectablePhase(Store store, TaskView[] tc)
    • detectable

      private void detectable(Store store, ThetaTree tree, TaskView[] t, TaskView[] q, TaskView[] to)
    • edgeFind

      private void edgeFind(Store store, TaskView[] tn, TaskView[] tr)
    • edgeFindPhase

      private void edgeFindPhase(Store store, TaskView[] tc)
    • toString

      public String toString()
      Description copied from class: Constraint
      It produces a string representation of a constraint state.
      Overrides:
      toString in class Cumulative