Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::PropagationBaseObject Class Reference

NOLINT. More...

#include <constraint_solver.h>

Inheritance diagram for operations_research::PropagationBaseObject:
operations_research::BaseObject operations_research::Assignment operations_research::Constraint operations_research::IntExpr operations_research::IntervalVar operations_research::SequenceVar operations_research::CastConstraint operations_research::DisjunctiveConstraint operations_research::LightIntFunctionElementCt< F > operations_research::LightIntIntFunctionElementCt< F > operations_research::Pack operations_research::BaseIntExpr operations_research::IntVar operations_research::IfThenElseCt operations_research::PiecewiseLinearExpr operations_research::BooleanVar

Public Member Functions

 PropagationBaseObject (Solver *const s)
 
 PropagationBaseObject (const PropagationBaseObject &)=delete
 This type is neither copyable nor movable.
 
PropagationBaseObjectoperator= (const PropagationBaseObject &)=delete
 
 ~PropagationBaseObject () override
 
std::string DebugString () const override
 
Solversolver () const
 
void FreezeQueue ()
 
void UnfreezeQueue ()
 
void EnqueueDelayedDemon (Demon *const d)
 
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.
 
void set_variable_to_clean_on_fail (IntVar *v)
 Shortcut for variable cleaner.
 
virtual std::string name () const
 Object naming.
 
void set_name (absl::string_view name)
 
bool HasName () const
 Returns whether the object has been named or not.
 
virtual std::string BaseName () const
 Returns a base name for automatic naming.
 
- Public Member Functions inherited from operations_research::BaseObject
 BaseObject ()
 
 BaseObject (const BaseObject &)=delete
 This type is neither copyable nor movable.
 
BaseObjectoperator= (const BaseObject &)=delete
 
virtual ~BaseObject ()
 

Detailed Description

NOLINT.

The PropagationBaseObject is a subclass of BaseObject that is also friend to the Solver class. It allows accessing methods useful when writing new constraints or new expressions.

Definition at line 3385 of file constraint_solver.h.

Constructor & Destructor Documentation

◆ PropagationBaseObject() [1/2]

operations_research::PropagationBaseObject::PropagationBaseObject ( Solver *const s)
inlineexplicit

Definition at line 3387 of file constraint_solver.h.

◆ PropagationBaseObject() [2/2]

operations_research::PropagationBaseObject::PropagationBaseObject ( const PropagationBaseObject & )
delete

This type is neither copyable nor movable.

◆ ~PropagationBaseObject()

operations_research::PropagationBaseObject::~PropagationBaseObject ( )
inlineoverride

Definition at line 3394 of file constraint_solver.h.

Member Function Documentation

◆ BaseName()

std::string operations_research::PropagationBaseObject::BaseName ( ) const
virtual

Returns a base name for automatic naming.

Reimplemented in operations_research::BooleanVar.

Definition at line 2505 of file constraint_solver.cc.

◆ DebugString()

std::string operations_research::PropagationBaseObject::DebugString ( ) const
inlineoverridevirtual

Reimplemented from operations_research::BaseObject.

Reimplemented in operations_research::SequenceVar.

Definition at line 3396 of file constraint_solver.h.

◆ EnqueueAll()

void operations_research::PropagationBaseObject::EnqueueAll ( const SimpleRevFIFO< Demon * > & demons)

Definition at line 2511 of file constraint_solver.cc.

◆ EnqueueDelayedDemon()

void operations_research::PropagationBaseObject::EnqueueDelayedDemon ( Demon *const d)
inline

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 3416 of file constraint_solver.h.

◆ EnqueueVar()

void operations_research::PropagationBaseObject::EnqueueVar ( Demon *const d)
inline

Definition at line 3417 of file constraint_solver.h.

◆ ExecuteAll()

void operations_research::PropagationBaseObject::ExecuteAll ( const SimpleRevFIFO< Demon * > & demons)

Definition at line 2507 of file constraint_solver.cc.

◆ FreezeQueue()

void operations_research::PropagationBaseObject::FreezeQueue ( )
inline

This method freezes the propagation queue. It is useful when you need to apply multiple modifications at once.

Definition at line 3407 of file constraint_solver.h.

◆ HasName()

bool operations_research::PropagationBaseObject::HasName ( ) const

Returns whether the object has been named or not.

Definition at line 2503 of file constraint_solver.cc.

◆ name()

std::string operations_research::PropagationBaseObject::name ( ) const
virtual

Object naming.

-------— PropagationBaseObject ------—

Reimplemented in operations_research::PiecewiseLinearExpr.

Definition at line 2495 of file constraint_solver.cc.

◆ operator=()

PropagationBaseObject & operations_research::PropagationBaseObject::operator= ( const PropagationBaseObject & )
delete

◆ reset_action_on_fail()

void operations_research::PropagationBaseObject::reset_action_on_fail ( )
inline

This method clears the failure callback.

Definition at line 3430 of file constraint_solver.h.

◆ set_action_on_fail()

void operations_research::PropagationBaseObject::set_action_on_fail ( Solver::Action a)
inline

This method sets a callback that will be called if a failure happens during the propagation of the queue.

Definition at line 3424 of file constraint_solver.h.

◆ set_name()

void operations_research::PropagationBaseObject::set_name ( absl::string_view name)

Definition at line 2499 of file constraint_solver.cc.

◆ set_variable_to_clean_on_fail()

void operations_research::PropagationBaseObject::set_variable_to_clean_on_fail ( IntVar * v)
inline

Shortcut for variable cleaner.

Definition at line 3433 of file constraint_solver.h.

◆ solver()

Solver * operations_research::PropagationBaseObject::solver ( ) const
inline

Definition at line 3403 of file constraint_solver.h.

◆ UnfreezeQueue()

void operations_research::PropagationBaseObject::UnfreezeQueue ( )
inline

This method unfreezes the propagation queue. All modifications that happened when the queue was frozen will be processed.

Definition at line 3411 of file constraint_solver.h.


The documentation for this class was generated from the following files: