Class CumulativeUnaryOptional


public class CumulativeUnaryOptional extends CumulativeUnary
  • Field Details

  • Constructor Details

    • CumulativeUnaryOptional

      public CumulativeUnaryOptional(IntVar[] starts, IntVar[] durations, IntVar[] resources, IntVar limit, IntVar[] opt)
      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.
      opt - variables informing whether the tasks is present or not.
    • CumulativeUnaryOptional

      public CumulativeUnaryOptional(IntVar[] starts, IntVar[] durations, IntVar[] resources, IntVar limit, IntVar[] opt, 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.
      opt - variables informing whether the tasks is present or not.
      doProfile - defines whether to do profile-based propagation (true) or not (false); default is false
    • CumulativeUnaryOptional

      public CumulativeUnaryOptional(IntVar[] starts, IntVar[] durations, IntVar[] resources, IntVar limit, IntVar[] opt, boolean doProfile, boolean doEdgeFind)
      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.
      opt - variables informing whether the tasks is present or not.
      doProfile - defines whether to do profile-based propagation (true) or not (false);
      doEdgeFind - defines whether to do edge finding propagation (true) or not (false); default is true
    • CumulativeUnaryOptional

      public CumulativeUnaryOptional(List<? extends IntVar> starts, List<? extends IntVar> durations, List<? extends IntVar> resources, IntVar limit, List<? extends IntVar> opt)
      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.
      opt - variables informing whether the tasks is present or not.
    • CumulativeUnaryOptional

      public CumulativeUnaryOptional(List<? extends IntVar> starts, List<? extends IntVar> durations, List<? extends IntVar> resources, IntVar limit, List<? extends IntVar> opt, 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.
      opt - variables informing whether the tasks is present or not.
      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 CumulativeUnary
      Parameters:
      store - constraint store within which the constraint consistency is being checked.
    • filterZeroTasks

      TaskView[] filterZeroTasks(TaskView[] ts)
      Overrides:
      filterZeroTasks in class Cumulative
    • toString

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