Module org.maxicp

Class Cumulative

java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.seqvar.Cumulative
All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>

public class Cumulative extends AbstractCPConstraint
  • Field Details

  • Constructor Details

    • Cumulative

      public Cumulative(CPSeqVar seqVar, int[] starts, int[] ends, int[] load, int capacity)
      Gives a maximum capacity for a resource over a sequence. A set of activity (i.e. a start and corresponding ending node for an activity) can consume the resource. The resource consumption can never exceed the maximum capacity of the resource.
      Parameters:
      seqVar - sequence over which the constraint is applied.
      starts - start of the activities.
      ends - corresponding end of each activity. ends[i] is the end activity of i, beginning at starts[i].
      load - consumption of each activity.
      capacity - maximum capacity for the resource.
  • Method Details