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

#include <constraint_solveri.h>

Inheritance diagram for operations_research::SearchLog:
operations_research::SearchMonitor operations_research::BaseObject

Public Member Functions

 SearchLog (Solver *solver, std::vector< IntVar * > vars, std::string vars_name, std::vector< double > scaling_factors, std::vector< double > offsets, std::function< std::string()> display_callback, bool display_on_new_solutions_only, int period)
 -------— Search Log ------—
 
 ~SearchLog () override
 
void EnterSearch () override
 Beginning of the search.
 
void ExitSearch () override
 End of the search.
 
bool AtSolution () override
 
void BeginFail () override
 Just when the failure occurs.
 
void NoMoreSolutions () override
 When the search tree is finished.
 
void AcceptUncheckedNeighbor () override
 After accepting an unchecked neighbor during local search.
 
void ApplyDecision (Decision *decision) override
 Before applying the decision.
 
void RefuteDecision (Decision *decision) override
 Before refuting the decision.
 
void OutputDecision ()
 
void Maintain ()
 
void BeginInitialPropagation () override
 Before the initial propagation.
 
void EndInitialPropagation () override
 After the initial propagation.
 
std::string DebugString () const override
 
- 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 RestartSearch ()
 Restart 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 AfterDecision (Decision *d, bool apply)
 
virtual void EndFail ()
 After completing the backtrack.
 
virtual bool AcceptSolution ()
 
virtual bool LocalOptimum ()
 
virtual bool AcceptDelta (Assignment *delta, Assignment *deltadelta)
 
virtual void AcceptNeighbor ()
 After accepting a 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.
 
virtual void Install ()
 A search monitors adds itself on the active search.
 
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 ()
 

Protected Member Functions

virtual void OutputLine (const std::string &line)
 
- Protected Member Functions inherited from operations_research::SearchMonitor
void ListenToEvent (Solver::MonitorEvent event)
 

Additional Inherited Members

- Static Public Attributes inherited from operations_research::SearchMonitor
static constexpr int kNoProgress = -1
 

Detailed Description

The base class of all search logs that periodically outputs information when the search is running.

Definition at line 2376 of file constraint_solveri.h.

Constructor & Destructor Documentation

◆ SearchLog()

operations_research::SearchLog::SearchLog ( Solver * solver,
std::vector< IntVar * > vars,
std::string vars_name,
std::vector< double > scaling_factors,
std::vector< double > offsets,
std::function< std::string()> display_callback,
bool display_on_new_solutions_only,
int period )

-------— Search Log ------—

Definition at line 59 of file search.cc.

◆ ~SearchLog()

operations_research::SearchLog::~SearchLog ( )
override

Definition at line 82 of file search.cc.

Member Function Documentation

◆ AcceptUncheckedNeighbor()

void operations_research::SearchLog::AcceptUncheckedNeighbor ( )
overridevirtual

After accepting an unchecked neighbor during local search.

Reimplemented from operations_research::SearchMonitor.

Definition at line 197 of file search.cc.

◆ ApplyDecision()

void operations_research::SearchLog::ApplyDecision ( Decision * d)
overridevirtual

Before applying the decision.

Reimplemented from operations_research::SearchMonitor.

Definition at line 221 of file search.cc.

◆ AtSolution()

bool operations_research::SearchLog::AtSolution ( )
overridevirtual

This method is called when a valid solution is found. If the return value is true, then search will resume after. If the result is false, then search will stop there.

Reimplemented from operations_research::SearchMonitor.

Definition at line 109 of file search.cc.

◆ BeginFail()

void operations_research::SearchLog::BeginFail ( )
overridevirtual

Just when the failure occurs.

Reimplemented from operations_research::SearchMonitor.

Definition at line 199 of file search.cc.

◆ BeginInitialPropagation()

void operations_research::SearchLog::BeginInitialPropagation ( )
overridevirtual

Before the initial propagation.

Reimplemented from operations_research::SearchMonitor.

Definition at line 271 of file search.cc.

◆ DebugString()

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

Reimplemented from operations_research::BaseObject.

Definition at line 84 of file search.cc.

◆ EndInitialPropagation()

void operations_research::SearchLog::EndInitialPropagation ( )
overridevirtual

After the initial propagation.

Reimplemented from operations_research::SearchMonitor.

Definition at line 273 of file search.cc.

◆ EnterSearch()

void operations_research::SearchLog::EnterSearch ( )
overridevirtual

Beginning of the search.

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

Reimplemented from operations_research::SearchMonitor.

Definition at line 86 of file search.cc.

◆ ExitSearch()

void operations_research::SearchLog::ExitSearch ( )
overridevirtual

End of the search.

Reimplemented from operations_research::SearchMonitor.

Definition at line 96 of file search.cc.

◆ Maintain()

void operations_research::SearchLog::Maintain ( )

Definition at line 264 of file search.cc.

◆ NoMoreSolutions()

void operations_research::SearchLog::NoMoreSolutions ( )
overridevirtual

When the search tree is finished.

Reimplemented from operations_research::SearchMonitor.

Definition at line 201 of file search.cc.

◆ OutputDecision()

void operations_research::SearchLog::OutputDecision ( )

Definition at line 234 of file search.cc.

◆ OutputLine()

void operations_research::SearchLog::OutputLine ( const std::string & line)
protectedvirtual

Definition at line 281 of file search.cc.

◆ RefuteDecision()

void operations_research::SearchLog::RefuteDecision ( Decision * d)
overridevirtual

Before refuting the decision.

Reimplemented from operations_research::SearchMonitor.

Definition at line 229 of file search.cc.


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