java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.seqvar.Cumulative
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCumulative(CPSeqVar seqVar, int[] starts, int[] ends, int[] load, int capacity) Gives a maximum capacity for a resource over a sequence. -
Method Summary
Methods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, isActive, isScheduled, registerDelta, setActive, setScheduled, updateDeltas
-
Field Details
-
profile
-
-
Constructor Details
-
Cumulative
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
-
post
public void post()Description copied from interface:CPConstraintInitializes the constraint when it is posted to the solver.- Specified by:
postin interfaceCPConstraint- Overrides:
postin classAbstractCPConstraint
-
propagate
public void propagate()Description copied from interface:CPConstraintPropagates the constraint.- Specified by:
propagatein interfaceCPConstraint- Overrides:
propagatein classAbstractCPConstraint
-
priority
public int priority()- Specified by:
priorityin interfaceCPConstraint- Overrides:
priorityin classAbstractCPConstraint
-