C++ Reference: class SearchMonitor

This documentation is automatically generated.

A search monitor is a simple set of callbacks to monitor all search events
Method
Accept

Return type: virtual void

Arguments: ModelVisitor* const visitor

Accepts the given model visitor.

AcceptDelta

Return type: virtual bool

Arguments: Assignment* delta, Assignment* deltadelta

AcceptNeighbor

Return type: virtual void

After accepting a neighbor during local search.

AcceptSolution

Return type: virtual bool

This method is called when a solution is found. It asserts whether the solution is valid. A value of false indicates that the solution should be discarded.

AcceptUncheckedNeighbor

Return type: virtual void

After accepting an unchecked neighbor during local search.

AfterDecision

Return type: virtual void

Arguments: Decision* const d, bool apply

Just after refuting or applying the decision, apply is true after Apply. This is called only if the Apply() or Refute() methods have not failed.

ApplyDecision

Return type: virtual void

Arguments: Decision* const d

Before applying the decision.

AtSolution

Return type: virtual bool

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.

BeginFail

Return type: virtual void

Just when the failure occurs.

BeginInitialPropagation

Return type: virtual void

Before the initial propagation.

BeginNextDecision

Return type: virtual void

Arguments: DecisionBuilder* const b

Before calling DecisionBuilder::Next.

EndFail

Return type: virtual void

After completing the backtrack.

EndInitialPropagation

Return type: virtual void

After the initial propagation.

EndNextDecision

Return type: virtual void

Arguments: DecisionBuilder* const b, Decision* const d

After calling DecisionBuilder::Next, along with the returned decision.

EnterSearch

Return type: virtual void

Beginning of the search.

ExitSearch

Return type: virtual void

End of the search.

Install

Return type: virtual void

Registers itself on the solver such that it gets notified of the search and propagation events.

IsUncheckedSolutionLimitReached

Return type: virtual bool

Returns true if the limit of solutions has been reached including unchecked solutions.

LocalOptimum

Return type: virtual bool

When a local optimum is reached. If 'true' is returned, the last solution is discarded and the search proceeds with the next one.

NoMoreSolutions

Return type: virtual void

When the search tree is finished.

PeriodicCheck

Return type: virtual void

Periodic call to check limits in long running methods.

ProgressPercent

Return type: virtual int

Returns a percentage representing the propress of the search before reaching limits.

RefuteDecision

Return type: virtual void

Arguments: Decision* const d

Before refuting the decision.

RestartSearch

Return type: virtual void

Restart the search.

SearchMonitor

Return type: explicit

Arguments: Solver* const s

~SearchMonitor

solver

Return type: Solver*