Package org.jacop.constraints.cumulative
Class CumulativeBasic
- java.lang.Object
-
- org.jacop.constraints.DecomposedConstraint<Constraint>
-
- org.jacop.constraints.Constraint
-
- org.jacop.constraints.cumulative.CumulativeBasic
-
- Direct Known Subclasses:
Cumulative
public class CumulativeBasic extends Constraint
CumulativeBasic implements the cumulative constraint using time tabling algorithm.- Version:
- 4.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classCumulativeBasic.Event
-
Field Summary
Fields Modifier and Type Field Description (package private) CumulativePrimarycumulativeForConstantsprivate static booleandebugprivate static booleandebugNarrprivate java.util.Comparator<CumulativeBasic.Event>eventComparatorprivate static java.util.concurrent.atomic.AtomicIntegeridNumberIntVarlimitIt specifies the limit of the profile of cumulative use of resources.(package private) booleanpossibleZeroTasksIt specifies whether there possibly exist tasks that have duration or resource variable min value equal zero.private static intprofileprivate static intpruneEndprivate static intpruneStart(package private) TaskView[]taskNormalAll tasks of the constraint-
Fields inherited from class org.jacop.constraints.Constraint
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, trace
-
Fields inherited from class org.jacop.constraints.DecomposedConstraint
queueIndex
-
-
Constructor Summary
Constructors Constructor Description CumulativeBasic(java.util.List<? extends IntVar> starts, java.util.List<? extends IntVar> durations, java.util.List<? extends IntVar> resources, IntVar limit)It creates a cumulative constraint.CumulativeBasic(IntVar[] starts, IntVar[] durations, IntVar[] resources, IntVar limit)It creates a cumulative constraint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsistency(Store store)It is a (most probably incomplete) consistency function which removes the values from variables domains.intgetDefaultConsistencyPruningEvent()(package private) voidprofileProp(Store store)private voidsweepPruning(Store store)java.lang.StringtoString()It produces a string representation of a constraint state.private voidupdateTasksRes(Store store)-
Methods 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, watchedVariableGrounded
-
Methods inherited from class org.jacop.constraints.DecomposedConstraint
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
-
-
-
-
Field Detail
-
idNumber
private static final java.util.concurrent.atomic.AtomicInteger idNumber
-
debug
private static final boolean debug
- See Also:
- Constant Field Values
-
debugNarr
private static final boolean debugNarr
- See Also:
- Constant Field Values
-
eventComparator
private java.util.Comparator<CumulativeBasic.Event> eventComparator
-
taskNormal
final TaskView[] taskNormal
All tasks of the constraint
-
limit
public final IntVar limit
It specifies the limit of the profile of cumulative use of resources.
-
possibleZeroTasks
boolean possibleZeroTasks
It specifies whether there possibly exist tasks that have duration or resource variable min value equal zero.
-
cumulativeForConstants
CumulativePrimary cumulativeForConstants
-
profile
private static final int profile
- See Also:
- Constant Field Values
-
pruneStart
private static final int pruneStart
- See Also:
- Constant Field Values
-
pruneEnd
private static final int pruneEnd
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CumulativeBasic
public CumulativeBasic(IntVar[] starts, IntVar[] durations, 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.
-
CumulativeBasic
public CumulativeBasic(java.util.List<? extends IntVar> starts, java.util.List<? extends IntVar> durations, java.util.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.
-
-
Method Detail
-
consistency
public void consistency(Store store)
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.- Specified by:
consistencyin classConstraint- Parameters:
store- constraint store within which the constraint consistency is being checked.
-
profileProp
void profileProp(Store store)
-
getDefaultConsistencyPruningEvent
public int getDefaultConsistencyPruningEvent()
- Specified by:
getDefaultConsistencyPruningEventin classConstraint
-
updateTasksRes
private void updateTasksRes(Store store)
-
toString
public java.lang.String toString()
Description copied from class:ConstraintIt produces a string representation of a constraint state.- Overrides:
toStringin classConstraint
-
sweepPruning
private void sweepPruning(Store store)
-
-