OR-Tools  9.6
DecisionBuilderabstract

Detailed Description

A DecisionBuilder is responsible for creating the search tree.

The important method is Next(), which returns the next decision to execute.

Definition at line 3363 of file constraint_solver.h.

Public Member Functions

 DecisionBuilder ()
 
 ~DecisionBuilder () override
 
virtual DecisionNext (Solver *const s)=0
 This is the main method of the decision builder class. More...
 
std::string DebugString () const override
 
virtual void AppendMonitors (Solver *const solver, std::vector< SearchMonitor * > *const extras)
 This method will be called at the start of the search. More...
 
virtual void Accept (ModelVisitor *const visitor) const
 
void set_name (const std::string &name)
 
std::string GetName () const
 

Constructor & Destructor Documentation

◆ DecisionBuilder()

DecisionBuilder ( )
inline

Definition at line 3365 of file constraint_solver.h.

◆ ~DecisionBuilder()

~DecisionBuilder ( )
inlineoverride

Definition at line 3366 of file constraint_solver.h.

Member Function Documentation

◆ Accept()

void Accept ( ModelVisitor *const  visitor) const
virtual

Reimplemented in ProfiledDecisionBuilder.

Definition at line 2570 of file constraint_solver.cc.

◆ AppendMonitors()

void AppendMonitors ( Solver *const  solver,
std::vector< SearchMonitor * > *const  extras 
)
virtual

This method will be called at the start of the search.

It asks the decision builder if it wants to append search monitors to the list of active monitors for this search. Please note there are no checks at this point for duplication.

Reimplemented in ProfiledDecisionBuilder.

Definition at line 2567 of file constraint_solver.cc.

◆ DebugString()

std::string DebugString ( ) const
overridevirtual

Reimplemented from BaseObject.

Reimplemented in IntVarFilteredDecisionBuilder, FindOneNeighbor, and ProfiledDecisionBuilder.

Definition at line 2561 of file constraint_solver.cc.

◆ GetName()

std::string GetName ( ) const

Definition at line 2563 of file constraint_solver.cc.

◆ Next()

virtual Decision* Next ( Solver *const  s)
pure virtual

This is the main method of the decision builder class.

It must return a decision (an instance of the class Decision). If it returns nullptr, this means that the decision builder has finished its work.

Implemented in IntVarFilteredDecisionBuilder, FindOneNeighbor, and ProfiledDecisionBuilder.

◆ set_name()

void set_name ( const std::string &  name)
inline

Definition at line 3382 of file constraint_solver.h.


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