Java Reference

Java Reference

SearchMonitor

Detailed Description

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

Definition at line 14 of file SearchMonitor.java.

Public Member Functions

synchronized void delete ()
 
void swigReleaseOwnership ()
 
void swigTakeOwnership ()
 
 SearchMonitor (Solver s)
 
void enterSearch ()
 Beginning of the search. More...
 
void restartSearch ()
 Restart the search. More...
 
void exitSearch ()
 End of the search. More...
 
void beginNextDecision (DecisionBuilder b)
 Before calling DecisionBuilder::Next. More...
 
void endNextDecision (DecisionBuilder b, Decision d)
 After calling DecisionBuilder::Next, along with the returned decision. More...
 
void applyDecision (Decision d)
 Before applying the decision. More...
 
void refuteDecision (Decision d)
 Before refuting the decision. More...
 
void afterDecision (Decision d, boolean apply)
 Just after refuting or applying the decision, apply is true after Apply. More...
 
void beginFail ()
 Just when the failure occurs. More...
 
void endFail ()
 After completing the backtrack. More...
 
void beginInitialPropagation ()
 Before the initial propagation. More...
 
void endInitialPropagation ()
 After the initial propagation. More...
 
boolean acceptSolution ()
 This method is called when a solution is found. More...
 
boolean atSolution ()
 This method is called when a valid solution is found. More...
 
void noMoreSolutions ()
 When the search tree is finished. More...
 
boolean localOptimum ()
 When a local optimum is reached. More...
 
boolean acceptDelta (Assignment delta, Assignment deltadelta)
 
void acceptNeighbor ()
 After accepting a neighbor during local search. More...
 
void AcceptUncheckedNeighbor ()
 After accepting an unchecked neighbor during local search. More...
 
boolean IsUncheckedSolutionLimitReached ()
 Returns true if the limit of solutions has been reached including unchecked solutions. More...
 
Solver solver ()
 
void periodicCheck ()
 Periodic call to check limits in long running methods. More...
 
int progressPercent ()
 Returns a percentage representing the propress of the search before reaching limits. More...
 
void accept (ModelVisitor visitor)
 Accepts the given model visitor. More...
 
void install ()
 Registers itself on the solver such that it gets notified of the search and propagation events. More...
 
String toString ()
 

Static Public Attributes

static final int kNoProgress = mainJNI.SearchMonitor_kNoProgress_get()
 

Protected Member Functions

 SearchMonitor (long cPtr, boolean cMemoryOwn)
 
void swigDirectorDisconnect ()
 

Constructor & Destructor Documentation

◆ SearchMonitor() [1/2]

SearchMonitor ( long  cPtr,
boolean  cMemoryOwn 
)
inlineprotected

Definition at line 17 of file SearchMonitor.java.

◆ SearchMonitor() [2/2]

SearchMonitor ( Solver  s)
inline

Definition at line 57 of file SearchMonitor.java.

Member Function Documentation

◆ accept()

void accept ( ModelVisitor  visitor)
inline

Accepts the given model visitor.

Reimplemented in RegularLimit, and OptimizeVar.

Definition at line 221 of file SearchMonitor.java.

◆ acceptDelta()

boolean acceptDelta ( Assignment  delta,
Assignment  deltadelta 
)
inline

Reimplemented in OptimizeVar.

Definition at line 174 of file SearchMonitor.java.

◆ acceptNeighbor()

void acceptNeighbor ( )
inline

After accepting a neighbor during local search.

Definition at line 181 of file SearchMonitor.java.

◆ acceptSolution()

boolean acceptSolution ( )
inline

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.

Reimplemented in OptimizeVar.

Definition at line 149 of file SearchMonitor.java.

◆ AcceptUncheckedNeighbor()

void AcceptUncheckedNeighbor ( )
inline

After accepting an unchecked neighbor during local search.

Reimplemented in SearchLog.

Definition at line 188 of file SearchMonitor.java.

◆ afterDecision()

void afterDecision ( Decision  d,
boolean  apply 
)
inline

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.

Definition at line 114 of file SearchMonitor.java.

◆ applyDecision()

void applyDecision ( Decision  d)
inline

Before applying the decision.

Reimplemented in SearchLog.

Definition at line 100 of file SearchMonitor.java.

◆ atSolution()

boolean atSolution ( )
inline

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 in OptimizeVar, and SearchLog.

Definition at line 156 of file SearchMonitor.java.

◆ beginFail()

void beginFail ( )
inline

Just when the failure occurs.

Reimplemented in SearchLog.

Definition at line 121 of file SearchMonitor.java.

◆ beginInitialPropagation()

void beginInitialPropagation ( )
inline

Before the initial propagation.

Reimplemented in SearchLog.

Definition at line 135 of file SearchMonitor.java.

◆ beginNextDecision()

void beginNextDecision ( DecisionBuilder  b)
inline

Before calling DecisionBuilder::Next.

Reimplemented in OptimizeVar, and SearchLimit.

Definition at line 86 of file SearchMonitor.java.

◆ delete()

synchronized void delete ( )
inline

Reimplemented from BaseObject.

Reimplemented in SearchLog, OptimizeVar, RegularLimit, SearchLimit, SolutionCollector, LocalSearchMonitor, and PropagationMonitor.

Definition at line 31 of file SearchMonitor.java.

◆ endFail()

void endFail ( )
inline

After completing the backtrack.

Definition at line 128 of file SearchMonitor.java.

◆ endInitialPropagation()

void endInitialPropagation ( )
inline

After the initial propagation.

Reimplemented in SearchLog.

Definition at line 142 of file SearchMonitor.java.

◆ endNextDecision()

void endNextDecision ( DecisionBuilder  b,
Decision  d 
)
inline

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

Definition at line 93 of file SearchMonitor.java.

◆ enterSearch()

void enterSearch ( )
inline

Beginning of the search.

Reimplemented in SolutionCollector, SearchLimit, OptimizeVar, and SearchLog.

Definition at line 65 of file SearchMonitor.java.

◆ exitSearch()

void exitSearch ( )
inline

End of the search.

Reimplemented in RegularLimit, and SearchLog.

Definition at line 79 of file SearchMonitor.java.

◆ install()

void install ( )
inline

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

Reimplemented in PropagationMonitor, and LocalSearchMonitor.

Definition at line 228 of file SearchMonitor.java.

◆ IsUncheckedSolutionLimitReached()

boolean IsUncheckedSolutionLimitReached ( )
inline

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

Reimplemented in RegularLimit.

Definition at line 195 of file SearchMonitor.java.

◆ localOptimum()

boolean localOptimum ( )
inline

When a local optimum is reached.

If 'true' is returned, the last solution is discarded and the search proceeds with the next one.

Definition at line 170 of file SearchMonitor.java.

◆ noMoreSolutions()

void noMoreSolutions ( )
inline

When the search tree is finished.

Reimplemented in SearchLog.

Definition at line 163 of file SearchMonitor.java.

◆ periodicCheck()

void periodicCheck ( )
inline

Periodic call to check limits in long running methods.

Reimplemented in SearchLimit.

Definition at line 207 of file SearchMonitor.java.

◆ progressPercent()

int progressPercent ( )
inline

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

Reimplemented in RegularLimit.

Definition at line 214 of file SearchMonitor.java.

◆ refuteDecision()

void refuteDecision ( Decision  d)
inline

Before refuting the decision.

Reimplemented in SearchLog, SearchLimit, and OptimizeVar.

Definition at line 107 of file SearchMonitor.java.

◆ restartSearch()

void restartSearch ( )
inline

Restart the search.

Definition at line 72 of file SearchMonitor.java.

◆ solver()

Solver solver ( )
inline

Definition at line 199 of file SearchMonitor.java.

◆ swigDirectorDisconnect()

void swigDirectorDisconnect ( )
inlineprotected

Definition at line 42 of file SearchMonitor.java.

◆ swigReleaseOwnership()

void swigReleaseOwnership ( )
inline

Definition at line 47 of file SearchMonitor.java.

◆ swigTakeOwnership()

void swigTakeOwnership ( )
inline

Definition at line 52 of file SearchMonitor.java.

◆ toString()

Member Data Documentation

◆ kNoProgress

final int kNoProgress = mainJNI.SearchMonitor_kNoProgress_get()
static

Definition at line 232 of file SearchMonitor.java.


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