Module org.maxicp

Class Cumulative

java.lang.Object
org.maxicp.modeling.constraints.seqvar.Cumulative
All Implemented Interfaces:
Constraint

public class Cumulative extends Object implements Constraint
  • Field Details

    • seqVar

      public final SeqVar seqVar
    • starts

      public final int[] starts
    • ends

      public final int[] ends
    • load

      public final int[] load
    • capacity

      public final int capacity
  • Constructor Details

    • Cumulative

      public Cumulative(SeqVar seqVar, int[] starts, int[] ends, int[] load, int capacity)
      Links some nodes with start and end of activities, with a corresponding load. Given a capacity for the sequence, ensures that the capacity is never exceeded by the visits of activities
      Parameters:
      seqVar - route where visits of nodes are considered as activities
      starts - start of each activity
      ends - corresponding end of each activity
      load - corresponding load of each activity
      capacity - capacity allowed for the sequence
  • Method Details

    • scope

      public Collection<? extends Expression> scope()
      Description copied from interface: Constraint
      Returns the scope of the constraint, preferably as an immutable, unique collection.
      Specified by:
      scope in interface Constraint
      Returns:
      the scope of the constraint, i.e. all the Expressions it uses. The collection should be immutable.