C++ Reference
C++ Reference: Routing
Detailed Description
Definition at line 5339 of file constraint_solver.h.
Public Member Functions | |
DisjunctiveConstraint (Solver *const s, const std::vector< IntervalVar * > &intervals, const std::string &name) | |
~DisjunctiveConstraint () override | |
virtual SequenceVar * | MakeSequenceVar ()=0 |
Creates a sequence variable from the constraint. More... | |
void | SetTransitionTime (Solver::IndexEvaluator2 transition_time) |
Add a transition time between intervals. More... | |
int64 | TransitionTime (int before_index, int after_index) |
virtual const std::vector< IntVar * > & | nexts () const =0 |
virtual const std::vector< IntVar * > & | actives () const =0 |
virtual const std::vector< IntVar * > & | time_cumuls () const =0 |
virtual const std::vector< IntVar * > & | time_slacks () const =0 |
virtual void | Post ()=0 |
This method is called when the constraint is processed by the solver. More... | |
virtual void | InitialPropagate ()=0 |
This method performs the initial propagation of the constraint. More... | |
std::string | DebugString () const override |
void | PostAndPropagate () |
Calls Post and then Propagate to initialize the constraints. More... | |
virtual void | Accept (ModelVisitor *const visitor) const |
Accepts the given visitor. More... | |
bool | IsCastConstraint () const |
Is the constraint created by a cast from expression to integer variable? More... | |
virtual IntVar * | Var () |
Creates a Boolean variable representing the status of the constraint (false = constraint is violated, true = constraint is satisfied). More... | |
Solver * | solver () const |
void | FreezeQueue () |
This method freezes the propagation queue. More... | |
void | UnfreezeQueue () |
This method unfreezes the propagation queue. More... | |
void | EnqueueDelayedDemon (Demon *const d) |
This method pushes the demon onto the propagation queue. More... | |
void | EnqueueVar (Demon *const d) |
void | ExecuteAll (const SimpleRevFIFO< Demon * > &demons) |
void | EnqueueAll (const SimpleRevFIFO< Demon * > &demons) |
void | set_action_on_fail (Solver::Action a) |
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... | |
virtual std::string | name () const |
Object naming. More... | |
void | set_name (const std::string &name) |
bool | HasName () const |
Returns whether the object has been named or not. More... | |
virtual std::string | BaseName () const |
Returns a base name for automatic naming. More... | |
Protected Attributes | |
const std::vector< IntervalVar * > | intervals_ |
Solver::IndexEvaluator2 | transition_time_ |
Constructor & Destructor Documentation
◆ DisjunctiveConstraint()
DisjunctiveConstraint | ( | Solver *const | s, |
const std::vector< IntervalVar * > & | intervals, | ||
const std::string & | name | ||
) |
◆ ~DisjunctiveConstraint()
|
override |
Member Function Documentation
◆ Accept()
|
virtualinherited |
Accepts the given visitor.
Reimplemented in Pack.
◆ actives()
|
pure virtual |
◆ BaseName()
|
virtualinherited |
Returns a base name for automatic naming.
Reimplemented in BooleanVar.
◆ DebugString()
|
overridevirtualinherited |
Reimplemented from PropagationBaseObject.
Reimplemented in Pack, and GlobalVehicleBreaksConstraint.
◆ EnqueueAll()
|
inherited |
◆ 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 3192 of file constraint_solver.h.
◆ EnqueueVar()
|
inlineinherited |
Definition at line 3193 of file constraint_solver.h.
◆ ExecuteAll()
|
inherited |
◆ FreezeQueue()
|
inlineinherited |
This method freezes the propagation queue.
It is useful when you need to apply multiple modifications at once.
Definition at line 3183 of file constraint_solver.h.
◆ HasName()
|
inherited |
Returns whether the object has been named or not.
◆ InitialPropagate()
|
pure virtualinherited |
This method performs the initial propagation of the constraint.
It is called just after the post.
Implemented in Pack, GlobalVehicleBreaksConstraint, and TypeRegulationsConstraint.
◆ IsCastConstraint()
|
inherited |
Is the constraint created by a cast from expression to integer variable?
◆ MakeSequenceVar()
|
pure virtual |
Creates a sequence variable from the constraint.
◆ name()
|
virtualinherited |
Object naming.
◆ nexts()
|
pure virtual |
◆ Post()
|
pure virtualinherited |
This method is called when the constraint is processed by the solver.
Its main usage is to attach demons to variables.
Implemented in Pack, GlobalVehicleBreaksConstraint, and TypeRegulationsConstraint.
◆ PostAndPropagate()
|
inherited |
Calls Post and then Propagate to initialize the constraints.
This is usually done in the root node.
◆ reset_action_on_fail()
|
inlineinherited |
This method clears the failure callback.
Definition at line 3206 of file constraint_solver.h.
◆ set_action_on_fail()
|
inlineinherited |
Definition at line 3200 of file constraint_solver.h.
◆ set_name()
|
inherited |
◆ set_variable_to_clean_on_fail()
|
inlineinherited |
Shortcut for variable cleaner.
Definition at line 3209 of file constraint_solver.h.
◆ SetTransitionTime()
void SetTransitionTime | ( | Solver::IndexEvaluator2 | transition_time | ) |
Add a transition time between intervals.
It forces the distance between the end of interval a and start of interval b that follows it to be at least transition_time(a, b). This function must always return a positive or null value.
◆ solver()
|
inlineinherited |
Definition at line 3179 of file constraint_solver.h.
◆ time_cumuls()
|
pure virtual |
◆ time_slacks()
|
pure virtual |
◆ TransitionTime()
|
inline |
Definition at line 5355 of file constraint_solver.h.
◆ UnfreezeQueue()
|
inlineinherited |
This method unfreezes the propagation queue.
All modifications that happened when the queue was frozen will be processed.
Definition at line 3187 of file constraint_solver.h.
◆ Var()
|
virtualinherited |
Creates a Boolean variable representing the status of the constraint (false = constraint is violated, true = constraint is satisfied).
It returns nullptr if the constraint does not support this API.
Member Data Documentation
◆ intervals_
|
protected |
Definition at line 5368 of file constraint_solver.h.
◆ transition_time_
|
protected |
Definition at line 5369 of file constraint_solver.h.
The documentation for this class was generated from the following file: