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

#include <constraint_solveri.h>

Inheritance diagram for operations_research::LocalSearchMonitor:
operations_research::SearchMonitor operations_research::BaseObject operations_research::LocalSearchMonitorPrimary operations_research::LocalSearchProfiler

Public Member Functions

 LocalSearchMonitor (Solver *solver)
 -------— Local Search Monitor --------—
 
 ~LocalSearchMonitor () override
 
std::string DebugString () const override
 
virtual void BeginOperatorStart ()=0
 Local search operator events.
 
virtual void EndOperatorStart ()=0
 
virtual void BeginMakeNextNeighbor (const LocalSearchOperator *op)=0
 
virtual void EndMakeNextNeighbor (const LocalSearchOperator *op, bool neighbor_found, const Assignment *delta, const Assignment *deltadelta)=0
 
virtual void BeginFilterNeighbor (const LocalSearchOperator *op)=0
 
virtual void EndFilterNeighbor (const LocalSearchOperator *op, bool neighbor_found)=0
 
virtual void BeginAcceptNeighbor (const LocalSearchOperator *op)=0
 
virtual void EndAcceptNeighbor (const LocalSearchOperator *op, bool neighbor_found)=0
 
virtual void BeginFiltering (const LocalSearchFilter *filter)=0
 
virtual void EndFiltering (const LocalSearchFilter *filter, bool reject)=0
 
virtual bool IsActive () const =0
 
void Install () override
 Install itself on the solver.
 
- Public Member Functions inherited from operations_research::SearchMonitor
 SearchMonitor (Solver *const s)
 
 SearchMonitor (const SearchMonitor &)=delete
 This type is neither copyable nor movable.
 
SearchMonitoroperator= (const SearchMonitor &)=delete
 
 ~SearchMonitor () override
 
virtual void EnterSearch ()
 Beginning of the search.
 
virtual void RestartSearch ()
 Restart the search.
 
virtual void ExitSearch ()
 End of the search.
 
virtual void BeginNextDecision (DecisionBuilder *b)
 Before calling DecisionBuilder::Next.
 
virtual void EndNextDecision (DecisionBuilder *b, Decision *d)
 After calling DecisionBuilder::Next, along with the returned decision.
 
virtual void ApplyDecision (Decision *d)
 Before applying the decision.
 
virtual void RefuteDecision (Decision *d)
 Before refuting the decision.
 
virtual void AfterDecision (Decision *d, bool apply)
 
virtual void BeginFail ()
 Just when the failure occurs.
 
virtual void EndFail ()
 After completing the backtrack.
 
virtual void BeginInitialPropagation ()
 Before the initial propagation.
 
virtual void EndInitialPropagation ()
 After the initial propagation.
 
virtual bool AcceptSolution ()
 
virtual bool AtSolution ()
 
virtual void NoMoreSolutions ()
 When the search tree is finished.
 
virtual bool LocalOptimum ()
 
virtual bool AcceptDelta (Assignment *delta, Assignment *deltadelta)
 
virtual void AcceptNeighbor ()
 After accepting a neighbor during local search.
 
virtual void AcceptUncheckedNeighbor ()
 After accepting an unchecked neighbor during local search.
 
virtual bool IsUncheckedSolutionLimitReached ()
 
virtual void PeriodicCheck ()
 Periodic call to check limits in long running methods.
 
virtual int ProgressPercent ()
 
virtual void Accept (ModelVisitor *visitor) const
 Accepts the given model visitor.
 
Solversolver () 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 ()
 

Additional Inherited Members

- Static Public Attributes inherited from operations_research::SearchMonitor
static constexpr int kNoProgress = -1
 
- Protected Member Functions inherited from operations_research::SearchMonitor
void ListenToEvent (Solver::MonitorEvent event)
 

Detailed Description

Definition at line 2267 of file constraint_solveri.h.

Constructor & Destructor Documentation

◆ LocalSearchMonitor()

operations_research::LocalSearchMonitor::LocalSearchMonitor ( Solver * solver)
explicit

-------— Local Search Monitor --------—

Todo
(user): Add monitoring of local search filters.

Definition at line 2931 of file constraint_solver.cc.

◆ ~LocalSearchMonitor()

operations_research::LocalSearchMonitor::~LocalSearchMonitor ( )
override

Definition at line 2934 of file constraint_solver.cc.

Member Function Documentation

◆ BeginAcceptNeighbor()

virtual void operations_research::LocalSearchMonitor::BeginAcceptNeighbor ( const LocalSearchOperator * op)
pure virtual

◆ BeginFiltering()

virtual void operations_research::LocalSearchMonitor::BeginFiltering ( const LocalSearchFilter * filter)
pure virtual

◆ BeginFilterNeighbor()

virtual void operations_research::LocalSearchMonitor::BeginFilterNeighbor ( const LocalSearchOperator * op)
pure virtual

◆ BeginMakeNextNeighbor()

virtual void operations_research::LocalSearchMonitor::BeginMakeNextNeighbor ( const LocalSearchOperator * op)
pure virtual

◆ BeginOperatorStart()

virtual void operations_research::LocalSearchMonitor::BeginOperatorStart ( )
pure virtual

◆ DebugString()

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

◆ EndAcceptNeighbor()

virtual void operations_research::LocalSearchMonitor::EndAcceptNeighbor ( const LocalSearchOperator * op,
bool neighbor_found )
pure virtual

◆ EndFiltering()

virtual void operations_research::LocalSearchMonitor::EndFiltering ( const LocalSearchFilter * filter,
bool reject )
pure virtual

◆ EndFilterNeighbor()

virtual void operations_research::LocalSearchMonitor::EndFilterNeighbor ( const LocalSearchOperator * op,
bool neighbor_found )
pure virtual

◆ EndMakeNextNeighbor()

virtual void operations_research::LocalSearchMonitor::EndMakeNextNeighbor ( const LocalSearchOperator * op,
bool neighbor_found,
const Assignment * delta,
const Assignment * deltadelta )
pure virtual

◆ EndOperatorStart()

virtual void operations_research::LocalSearchMonitor::EndOperatorStart ( )
pure virtual

◆ Install()

void operations_research::LocalSearchMonitor::Install ( )
overridevirtual

Install itself on the solver.

A local search monitor listens to search events as well as local search events.

Reimplemented from operations_research::SearchMonitor.

Reimplemented in operations_research::LocalSearchMonitorPrimary, and operations_research::LocalSearchProfiler.

Definition at line 2938 of file constraint_solver.cc.

◆ IsActive()

virtual bool operations_research::LocalSearchMonitor::IsActive ( ) const
pure virtual

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