Module org.maxicp
Class GeneralizedCumulativeSweepMin
java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.scheduling.GeneralizedCumulativeSweepMin
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
Sweep-line filtering algorithm for the Generalized Cumulative constraint enforcing a minimum capacity bound.
Supports optional activities, variable durations, and positive or negative resource heights.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classclassstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionGeneralizedCumulativeSweepMin(List<Activity> activities, int minCapacity) Creates a generalized cumulative sweep constraint enforcing that the cumulative profile stays at or aboveminCapacitywhenever at least one activity is active.GeneralizedCumulativeSweepMin(Activity[] activities, int minCapacity) Creates a generalized cumulative sweep constraint enforcing that the cumulative profile stays at or aboveminCapacitywhenever at least one activity is active. -
Method Summary
Methods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, isActive, isScheduled, registerDelta, setActive, setScheduled, updateDeltas
-
Constructor Details
-
GeneralizedCumulativeSweepMin
Creates a generalized cumulative sweep constraint enforcing that the cumulative profile stays at or aboveminCapacitywhenever at least one activity is active.- Parameters:
activities- the list of activities contributing to the profileminCapacity- the minimum required capacity (must be>= 0)
-
GeneralizedCumulativeSweepMin
Creates a generalized cumulative sweep constraint enforcing that the cumulative profile stays at or aboveminCapacitywhenever at least one activity is active.- Parameters:
activities- the array of activities contributing to the profileminCapacity- the minimum required capacity (must be>= 0)
-
-
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
-
priority
public int priority()- Specified by:
priorityin interfaceCPConstraint- Overrides:
priorityin classAbstractCPConstraint
-
propagate
public void propagate()Description copied from interface:CPConstraintPropagates the constraint.- Specified by:
propagatein interfaceCPConstraint- Overrides:
propagatein classAbstractCPConstraint
-