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

#include <constraint_solver.h>

Inheritance diagram for operations_research::DecisionBuilder:
operations_research::BaseObject operations_research::FindOneNeighbor operations_research::IntVarFilteredDecisionBuilder operations_research::LocalSearch operations_research::ProfiledDecisionBuilder operations_research::RuinAndRecreateDecisionBuilder

Public Member Functions

 DecisionBuilder ()
 
 DecisionBuilder (const DecisionBuilder &)=delete
 This type is neither copyable nor movable.
 
DecisionBuilderoperator= (const DecisionBuilder &)=delete
 
 ~DecisionBuilder () override
 
virtual DecisionNext (Solver *s)=0
 
std::string DebugString () const override
 -------— Decision Builder -------—
 
virtual void AppendMonitors (Solver *solver, std::vector< SearchMonitor * > *extras)
 
virtual void Accept (ModelVisitor *visitor) const
 
void set_name (absl::string_view name)
 
std::string GetName () const
 
- 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

A DecisionBuilder is responsible for creating the search tree. The important method is Next(), which returns the next decision to execute.

Definition at line 3497 of file constraint_solver.h.

Constructor & Destructor Documentation

◆ DecisionBuilder() [1/2]

operations_research::DecisionBuilder::DecisionBuilder ( )
inline

Definition at line 3499 of file constraint_solver.h.

◆ DecisionBuilder() [2/2]

operations_research::DecisionBuilder::DecisionBuilder ( const DecisionBuilder & )
delete

This type is neither copyable nor movable.

◆ ~DecisionBuilder()

operations_research::DecisionBuilder::~DecisionBuilder ( )
inlineoverride

Definition at line 3506 of file constraint_solver.h.

Member Function Documentation

◆ Accept()

void operations_research::DecisionBuilder::Accept ( ModelVisitor * visitor) const
virtual

◆ AppendMonitors()

void operations_research::DecisionBuilder::AppendMonitors ( Solver * solver,
std::vector< SearchMonitor * > * 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 operations_research::ProfiledDecisionBuilder.

Definition at line 2523 of file constraint_solver.cc.

◆ DebugString()

std::string operations_research::DecisionBuilder::DebugString ( ) const
overridevirtual

◆ GetName()

std::string operations_research::DecisionBuilder::GetName ( ) const

Definition at line 2519 of file constraint_solver.cc.

◆ Next()

virtual Decision * operations_research::DecisionBuilder::Next ( Solver * 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 operations_research::FindOneNeighbor, operations_research::IntVarFilteredDecisionBuilder, operations_research::LocalSearch, operations_research::ProfiledDecisionBuilder, and operations_research::RuinAndRecreateDecisionBuilder.

◆ operator=()

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

◆ set_name()

void operations_research::DecisionBuilder::set_name ( absl::string_view name)
inline

Definition at line 3522 of file constraint_solver.h.


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