Class CumulativeOptional


public class CumulativeOptional extends Cumulative
  • Field Details

  • Constructor Details

    • CumulativeOptional

      public CumulativeOptional(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.
    • CumulativeOptional

      public CumulativeOptional(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.
  • 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.
    • filterZeroTasks

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

      public int getDefaultConsistencyPruningEvent()
      Overrides:
      getDefaultConsistencyPruningEvent 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 Cumulative