java.lang.Object
org.maxicp.modeling.constraints.seqvar.Cumulative
- All Implemented Interfaces:
Constraint
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCumulative(SeqVar seqVar, int[] starts, int[] ends, int[] load, int capacity) Links some nodes with start and end of activities, with a corresponding load. -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends Expression> scope()Returns the scope of the constraint, preferably as an immutable, unique collection.
-
Field Details
-
seqVar
-
starts
public final int[] starts -
ends
public final int[] ends -
load
public final int[] load -
capacity
public final int capacity
-
-
Constructor Details
-
Cumulative
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 activitiesstarts- start of each activityends- corresponding end of each activityload- corresponding load of each activitycapacity- capacity allowed for the sequence
-
-
Method Details
-
scope
Description copied from interface:ConstraintReturns the scope of the constraint, preferably as an immutable, unique collection.- Specified by:
scopein interfaceConstraint- Returns:
- the scope of the constraint, i.e. all the Expressions it uses. The collection should be immutable.
-