XXXXXXXXXXXXXXXXxxxx
// Beginning of the search. virtual void EnterSearch();
// Restart the search. virtual void RestartSearch();
// End of the search. virtual void ExitSearch();
// Before calling DecisionBuilder::Next virtual void BeginNextDecision(DecisionBuilder* const b);
// After calling DecisionBuilder::Next, along with the returned decision. virtual void EndNextDecision(DecisionBuilder* const b, Decision* const d);
// Before applying the decision virtual void ApplyDecision(Decision* const d);
// Before refuting the Decision virtual void RefuteDecision(Decision* const d);
// 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. virtual void AfterDecision(Decision* const d, bool apply);
// Just when the failure occurs. virtual void BeginFail();
// After completing the backtrack. virtual void EndFail();
// Before the initial propagation. virtual void BeginInitialPropagation();
// After the initial propagation. virtual void EndInitialPropagation();
// This method is called when a solution is found. It asserts of the // solution is valid. A value of false indicate that the solution // should be discarded. virtual bool AcceptSolution();
// 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. virtual bool AtSolution();
// When the search tree is finished. virtual void NoMoreSolutions();
// When a local optimum is reached. If ‘true’ is returned, the last solution // is discarded and the search proceeds with the next one. virtual bool LocalOptimum();
// virtual bool AcceptDelta(Assignment* delta, Assignment* deltadelta);
// After accepting a neighbor during local search. virtual void AcceptNeighbor();
Solver* solver() const
// Tells the solver to kill the current search. void FinishCurrentSearch();
// Tells the solver to restart the current search. void RestartCurrentSearch();
// Periodic call to check limits in long running methods. virtual void PeriodicCheck();
// Returns a percentage representing the propress of the search before // reaching limits. virtual int ProgressPercent() { return kNoProgress; }
// Accepts the given model visitor. virtual void Accept(ModelVisitor* const visitor) const;
// Registers itself on the solver such that it gets notified of the search // and propagation events. virtual void Install();