Java Reference
Java Reference
Detailed Description
Interval variables are often used in scheduling.
The main characteristics of an IntervalVar are the start position, duration, and end date. All these characteristics can be queried and set, and demons can be posted on their modifications. An important aspect is optionality: an IntervalVar can be performed or not. If unperformed, then it simply does not exist, and its characteristics cannot be accessed any more. An interval var is automatically marked as unperformed when it is not consistent anymore (start greater than end, duration < 0...)
Definition at line 14 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
Public Member Functions | |
| synchronized void | delete () |
| long | startMin () |
| These methods query, set, and watch the start position of the interval var. More... | |
| long | startMax () |
| void | setStartMin (long m) |
| void | setStartMax (long m) |
| void | setStartRange (long mi, long ma) |
| long | oldStartMin () |
| long | oldStartMax () |
| void | whenStartRange (Demon d) |
| void | whenStartRange (Runnable closure) |
| void | whenStartBound (Demon d) |
| void | whenStartBound (Runnable closure) |
| long | durationMin () |
| These methods query, set, and watch the duration of the interval var. More... | |
| long | durationMax () |
| void | setDurationMin (long m) |
| void | setDurationMax (long m) |
| void | setDurationRange (long mi, long ma) |
| long | oldDurationMin () |
| long | oldDurationMax () |
| void | whenDurationRange (Demon d) |
| void | whenDurationRange (Runnable closure) |
| void | whenDurationBound (Demon d) |
| void | whenDurationBound (Runnable closure) |
| long | endMin () |
| These methods query, set, and watch the end position of the interval var. More... | |
| long | endMax () |
| void | setEndMin (long m) |
| void | setEndMax (long m) |
| void | setEndRange (long mi, long ma) |
| long | oldEndMin () |
| long | oldEndMax () |
| void | whenEndRange (Demon d) |
| void | whenEndRange (Runnable closure) |
| void | whenEndBound (Demon d) |
| void | whenEndBound (Runnable closure) |
| boolean | mustBePerformed () |
| These methods query, set, and watch the performed status of the interval var. More... | |
| boolean | mayBePerformed () |
| boolean | cannotBePerformed () |
| boolean | isPerformedBound () |
| void | setPerformed (boolean val) |
| boolean | wasPerformedBound () |
| void | whenPerformedBound (Demon d) |
| void | whenPerformedBound (Runnable closure) |
| void | whenAnything (Demon d) |
| Attaches a demon awakened when anything about this interval changes. More... | |
| void | whenAnything (Runnable closure) |
| Attaches a closure awakened when anything about this interval changes. More... | |
| IntExpr | startExpr () |
| These methods create expressions encapsulating the start, end and duration of the interval var. More... | |
| IntExpr | durationExpr () |
| IntExpr | endExpr () |
| IntExpr | performedExpr () |
| IntExpr | safeStartExpr (long unperformed_value) |
| These methods create expressions encapsulating the start, end and duration of the interval var. More... | |
| IntExpr | safeDurationExpr (long unperformed_value) |
| IntExpr | safeEndExpr (long unperformed_value) |
| void | accept (ModelVisitor visitor) |
| Accepts the given visitor. More... | |
| String | toString () |
| Solver | solver () |
| void | freezeQueue () |
| This method freezes the propagation queue. More... | |
| void | unfreezeQueue () |
| This method unfreezes the propagation queue. More... | |
| void | enqueueDelayedDemon (Demon d) |
| This method pushes the demon onto the propagation queue. More... | |
| void | enqueueVar (Demon d) |
| void | reset_action_on_fail () |
| This method clears the failure callback. More... | |
| void | set_variable_to_clean_on_fail (IntVar v) |
| Shortcut for variable cleaner. More... | |
| String | name () |
| Object naming. More... | |
| void | setName (String name) |
| boolean | hasName () |
| Returns whether the object has been named or not. More... | |
| String | baseName () |
| Returns a base name for automatic naming. More... | |
Static Public Member Functions | |
| static long | getKMinValidValue () |
| The smallest acceptable value to be returned by StartMin() More... | |
| static long | getKMaxValidValue () |
| The largest acceptable value to be returned by EndMax() More... | |
Protected Member Functions | |
| IntervalVar (long cPtr, boolean cMemoryOwn) | |
Constructor & Destructor Documentation
◆ IntervalVar()
|
inlineprotected |
Definition at line 17 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
Member Function Documentation
◆ accept()
|
inline |
Accepts the given visitor.
Definition at line 290 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ baseName()
|
inlineinherited |
Returns a base name for automatic naming.
Reimplemented in BooleanVar.
Definition at line 115 of file PropagationBaseObject.java.
◆ cannotBePerformed()
|
inline |
Definition at line 208 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ delete()
|
inline |
Reimplemented from PropagationBaseObject.
Definition at line 31 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ durationExpr()
|
inline |
Definition at line 254 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ durationMax()
|
inline |
Definition at line 110 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ durationMin()
|
inline |
These methods query, set, and watch the duration of the interval var.
Definition at line 106 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ endExpr()
|
inline |
Definition at line 259 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ endMax()
|
inline |
Definition at line 157 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ endMin()
|
inline |
These methods query, set, and watch the end position of the interval var.
Definition at line 153 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ enqueueDelayedDemon()
|
inlineinherited |
This method pushes the demon onto the propagation queue.
It will be processed directly if the queue is empty. It will be enqueued according to its priority otherwise.
Definition at line 72 of file PropagationBaseObject.java.
◆ enqueueVar()
|
inlineinherited |
Definition at line 76 of file PropagationBaseObject.java.
◆ freezeQueue()
|
inlineinherited |
This method freezes the propagation queue.
It is useful when you need to apply multiple modifications at once.
Definition at line 58 of file PropagationBaseObject.java.
◆ getKMaxValidValue()
|
inlinestatic |
The largest acceptable value to be returned by EndMax()
Definition at line 52 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ getKMinValidValue()
|
inlinestatic |
The smallest acceptable value to be returned by StartMin()
Definition at line 45 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ hasName()
|
inlineinherited |
Returns whether the object has been named or not.
Definition at line 108 of file PropagationBaseObject.java.
◆ isPerformedBound()
|
inline |
Definition at line 212 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ mayBePerformed()
|
inline |
Definition at line 204 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ mustBePerformed()
|
inline |
These methods query, set, and watch the performed status of the interval var.
Definition at line 200 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ name()
|
inlineinherited |
Object naming.
Definition at line 97 of file PropagationBaseObject.java.
◆ oldDurationMax()
|
inline |
Definition at line 130 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ oldDurationMin()
|
inline |
Definition at line 126 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ oldEndMax()
|
inline |
Definition at line 177 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ oldEndMin()
|
inline |
Definition at line 173 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ oldStartMax()
|
inline |
Definition at line 83 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ oldStartMin()
|
inline |
Definition at line 79 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ performedExpr()
|
inline |
Definition at line 264 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ reset_action_on_fail()
|
inlineinherited |
This method clears the failure callback.
Definition at line 83 of file PropagationBaseObject.java.
◆ safeDurationExpr()
|
inline |
Definition at line 277 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ safeEndExpr()
|
inline |
Definition at line 282 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ safeStartExpr()
|
inline |
These methods create expressions encapsulating the start, end and duration of the interval var.
If the interval var is unperformed, they will return the unperformed_value.
Definition at line 272 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ set_variable_to_clean_on_fail()
|
inlineinherited |
Shortcut for variable cleaner.
Definition at line 90 of file PropagationBaseObject.java.
◆ setDurationMax()
|
inline |
Definition at line 118 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ setDurationMin()
|
inline |
Definition at line 114 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ setDurationRange()
|
inline |
Definition at line 122 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ setEndMax()
|
inline |
Definition at line 165 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ setEndMin()
|
inline |
Definition at line 161 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ setEndRange()
|
inline |
Definition at line 169 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ setName()
|
inlineinherited |
Definition at line 101 of file PropagationBaseObject.java.
◆ setPerformed()
|
inline |
Definition at line 216 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ setStartMax()
|
inline |
Definition at line 71 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ setStartMin()
|
inline |
Definition at line 67 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ setStartRange()
|
inline |
Definition at line 75 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ solver()
|
inlineinherited |
Definition at line 50 of file PropagationBaseObject.java.
◆ startExpr()
|
inline |
These methods create expressions encapsulating the start, end and duration of the interval var.
Please note that these must not be used if the interval var is unperformed.
Definition at line 249 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ startMax()
|
inline |
Definition at line 63 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ startMin()
|
inline |
These methods query, set, and watch the start position of the interval var.
Definition at line 59 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ toString()
|
inlineinherited |
Reimplemented from BaseObject.
Reimplemented in Assignment, Pack, BooleanVar, Constraint, GlobalVehicleBreaksConstraint, and SequenceVar.
Definition at line 46 of file PropagationBaseObject.java.
◆ unfreezeQueue()
|
inlineinherited |
This method unfreezes the propagation queue.
All modifications that happened when the queue was frozen will be processed.
Definition at line 65 of file PropagationBaseObject.java.
◆ wasPerformedBound()
|
inline |
Definition at line 220 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenAnything() [1/2]
|
inline |
Attaches a demon awakened when anything about this interval changes.
Definition at line 235 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenAnything() [2/2]
|
inline |
Attaches a closure awakened when anything about this interval changes.
Definition at line 242 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenDurationBound() [1/2]
|
inline |
Definition at line 142 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenDurationBound() [2/2]
|
inline |
Definition at line 146 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenDurationRange() [1/2]
|
inline |
Definition at line 134 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenDurationRange() [2/2]
|
inline |
Definition at line 138 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenEndBound() [1/2]
|
inline |
Definition at line 189 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenEndBound() [2/2]
|
inline |
Definition at line 193 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenEndRange() [1/2]
|
inline |
Definition at line 181 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenEndRange() [2/2]
|
inline |
Definition at line 185 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenPerformedBound() [1/2]
|
inline |
Definition at line 224 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenPerformedBound() [2/2]
|
inline |
Definition at line 228 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenStartBound() [1/2]
|
inline |
Definition at line 95 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenStartBound() [2/2]
|
inline |
Definition at line 99 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenStartRange() [1/2]
|
inline |
Definition at line 87 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
◆ whenStartRange() [2/2]
|
inline |
Definition at line 91 of file gen/java/com/google/ortools/constraintsolver/IntervalVar.java.
The documentation for this class was generated from the following file: