Package org.jacop.constraints.cumulative
Class CumulativeUnary
java.lang.Object
org.jacop.constraints.DecomposedConstraint<Constraint>
org.jacop.constraints.Constraint
org.jacop.constraints.cumulative.CumulativeBasic
org.jacop.constraints.cumulative.Cumulative
org.jacop.constraints.cumulative.CumulativeUnary
CumulativeUnary implements the scheduling constraint for unary resources using
overload, not-first-not-last and detectable algorithms based on
Petr Vilim, "O(n log n) Filtering Algorithms for Unary Resource Constraints", Proceedings of CP-AI-OR 2004,
- Version:
- 4.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate Comparator<TaskView>private Comparator<TaskView>private Comparator<TaskView>private final TaskView[]Local copies of tasks in normal and reserved viewsprivate final TaskView[]Fields inherited from class org.jacop.constraints.cumulative.Cumulative
taskDecLctComparator, taskIncEstComparator, taskReversedFields inherited from class org.jacop.constraints.cumulative.CumulativeBasic
cumulativeForConstants, limit, possibleZeroTasks, taskNormalFields inherited from class org.jacop.constraints.Constraint
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, traceFields inherited from class org.jacop.constraints.DecomposedConstraint
queueIndex -
Constructor Summary
ConstructorsConstructorDescriptionCumulativeUnary(List<? extends IntVar> starts, List<? extends IntVar> durations, List<? extends IntVar> resources, IntVar limit) It creates a cumulative constraint.CumulativeUnary(List<? extends IntVar> starts, List<? extends IntVar> durations, List<? extends IntVar> resources, IntVar limit, boolean doProfile) It creates a cumulative constraint.CumulativeUnary(IntVar[] starts, IntVar[] durations, IntVar[] resources, IntVar limit) It creates a cumulative constraint.CumulativeUnary(IntVar[] starts, IntVar[] durations, IntVar[] resources, IntVar limit, boolean doProfile) It creates a cumulative constraint. -
Method Summary
Modifier and TypeMethodDescriptionvoidconsistency(Store store) It is a (most probably incomplete) consistency function which removes the values from variables domains.private voiddetectable(Store store, TaskView[] tn, TaskView[] tr) private voidprivate voiddetectablePhase(Store store, TaskView[] tc) private voidprivate voidedgeFindPhase(Store store, TaskView[] tc) private voidnotFirstNotLast(Store store, TaskView[] tn, TaskView[] tr) private voidnotFirstNotLastPhase(Store store, TaskView[] tc) private voidprivate voidtoString()It produces a string representation of a constraint state.Methods inherited from class org.jacop.constraints.cumulative.Cumulative
doQuadraticEdgeFind, filterZeroTasks, getDefaultConsistencyPruningEventMethods inherited from class org.jacop.constraints.cumulative.CumulativeBasic
profilePropMethods inherited from class org.jacop.constraints.Constraint
afc, arguments, cleanAfterFailure, decompose, getConsistencyPruningEvent, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, id, impose, impose, imposeDecomposition, increaseWeight, intArrayToString, numberArgs, queueVariable, removeConstraint, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, updateAFC, watchedVariableGroundedMethods inherited from class org.jacop.constraints.DecomposedConstraint
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
-
Field Details
-
doProfile
private boolean doProfile -
tvn
Local copies of tasks in normal and reserved views -
tvr
-
taskIncLctComparator
-
taskIncLstComparator
-
taskIncEctComparator
-
-
Constructor Details
-
CumulativeUnary
It creates a cumulative constraint.- Parameters:
starts- variables denoting starts of the tasks.durations- variables denoting durations of the tasks.resources- variables denoting resource usage of the tasks.limit- the overall limit of resources which has to be used.
-
CumulativeUnary
public CumulativeUnary(IntVar[] starts, IntVar[] durations, IntVar[] resources, IntVar limit, boolean doProfile) It creates a cumulative constraint.- Parameters:
starts- variables denoting starts of the tasks.durations- variables denoting durations of the tasks.resources- variables denoting resource usage of the tasks.limit- the overall limit of resources which has to be used.doProfile- defines whether to do profile-based propagation (true) or not (false); default is false
-
CumulativeUnary
public CumulativeUnary(List<? extends IntVar> starts, List<? extends IntVar> durations, List<? extends IntVar> resources, IntVar limit) It creates a cumulative constraint.- Parameters:
starts- variables denoting starts of the tasks.durations- variables denoting durations of the tasks.resources- variables denoting resource usage of the tasks.limit- the overall limit of resources which has to be used.
-
CumulativeUnary
public CumulativeUnary(List<? extends IntVar> starts, List<? extends IntVar> durations, List<? extends IntVar> resources, IntVar limit, boolean doProfile) It creates a cumulative constraint.- Parameters:
starts- variables denoting starts of the tasks.durations- variables denoting durations of the tasks.resources- variables denoting resource usage of the tasks.limit- the overall limit of resources which has to be used.doProfile- defines whether to do profile-based propagation (true) or not (false); default is false
-
-
Method Details
-
consistency
Description copied from class:ConstraintIt is a (most probably incomplete) consistency function which removes the values from variables domains. Only values which do not have any support in a solution space are removed.- Overrides:
consistencyin classCumulative- Parameters:
store- constraint store within which the constraint consistency is being checked.
-
overload
-
notFirstNotLast
-
notFirstNotLastPhase
-
notLast
-
detectable
-
detectablePhase
-
detectable
-
edgeFind
-
edgeFindPhase
-
toString
Description copied from class:ConstraintIt produces a string representation of a constraint state.- Overrides:
toStringin classCumulative
-