Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.constraintsolver.SearchMonitor Class Reference
Inheritance diagram for com.google.ortools.constraintsolver.SearchMonitor:
com.google.ortools.constraintsolver.BaseObject com.google.ortools.constraintsolver.LocalSearchMonitor com.google.ortools.constraintsolver.ObjectiveMonitor com.google.ortools.constraintsolver.PropagationMonitor com.google.ortools.constraintsolver.SearchLimit com.google.ortools.constraintsolver.SearchLog com.google.ortools.constraintsolver.SolutionCollector com.google.ortools.constraintsolver.OptimizeVar com.google.ortools.constraintsolver.ImprovementSearchLimit com.google.ortools.constraintsolver.RegularLimit

Public Member Functions

synchronized void delete ()
 
void swigReleaseOwnership ()
 
void swigTakeOwnership ()
 
void keepAliveDecisionBuilder (DecisionBuilder db)
 
 SearchMonitor (Solver s)
 
void enterSearch ()
 
void restartSearch ()
 
void exitSearch ()
 
void beginNextDecision (DecisionBuilder b)
 
void endNextDecision (DecisionBuilder b, Decision d)
 
void applyDecision (Decision d)
 
void refuteDecision (Decision d)
 
void afterDecision (Decision d, boolean apply)
 
void beginFail ()
 
void endFail ()
 
void beginInitialPropagation ()
 
void endInitialPropagation ()
 
boolean acceptSolution ()
 
boolean atSolution ()
 
void noMoreSolutions ()
 
boolean localOptimum ()
 
boolean acceptDelta (Assignment delta, Assignment deltadelta)
 
void acceptNeighbor ()
 
void AcceptUncheckedNeighbor ()
 
boolean IsUncheckedSolutionLimitReached ()
 
void periodicCheck ()
 
int progressPercent ()
 
void accept (ModelVisitor visitor)
 
void install ()
 
Solver solver ()
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
 BaseObject ()
 
String toString ()
 

Static Public Attributes

static final int kNoProgress = mainJNI.SearchMonitor_kNoProgress_get()
 

Protected Member Functions

 SearchMonitor (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 
void swigDirectorDisconnect ()
 
- Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
 BaseObject (long cPtr, boolean cMemoryOwn)
 

Static Protected Member Functions

static long getCPtr (SearchMonitor obj)
 
static long swigRelease (SearchMonitor obj)
 
- Static Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
static long getCPtr (BaseObject obj)
 
static long swigRelease (BaseObject obj)
 

Additional Inherited Members

- Protected Attributes inherited from com.google.ortools.constraintsolver.BaseObject
transient boolean swigCMemOwn
 

Detailed Description

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

Definition at line 14 of file SearchMonitor.java.

Constructor & Destructor Documentation

◆ SearchMonitor() [1/2]

com.google.ortools.constraintsolver.SearchMonitor.SearchMonitor ( long cPtr,
boolean cMemoryOwn )
protected

Definition at line 17 of file SearchMonitor.java.

◆ SearchMonitor() [2/2]

com.google.ortools.constraintsolver.SearchMonitor.SearchMonitor ( Solver s)

Definition at line 71 of file SearchMonitor.java.

Member Function Documentation

◆ accept()

void com.google.ortools.constraintsolver.SearchMonitor.accept ( ModelVisitor visitor)

Accepts the given model visitor.

Reimplemented in com.google.ortools.constraintsolver.ObjectiveMonitor, and com.google.ortools.constraintsolver.RegularLimit.

Definition at line 249 of file SearchMonitor.java.

◆ acceptDelta()

boolean com.google.ortools.constraintsolver.SearchMonitor.acceptDelta ( Assignment delta,
Assignment deltadelta )

Reimplemented in com.google.ortools.constraintsolver.ObjectiveMonitor.

Definition at line 205 of file SearchMonitor.java.

◆ acceptNeighbor()

void com.google.ortools.constraintsolver.SearchMonitor.acceptNeighbor ( )

After accepting a neighbor during local search.

Definition at line 212 of file SearchMonitor.java.

◆ acceptSolution()

boolean com.google.ortools.constraintsolver.SearchMonitor.acceptSolution ( )

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 com.google.ortools.constraintsolver.OptimizeVar.

Definition at line 174 of file SearchMonitor.java.

◆ AcceptUncheckedNeighbor()

void com.google.ortools.constraintsolver.SearchMonitor.AcceptUncheckedNeighbor ( )

After accepting an unchecked neighbor during local search.

Reimplemented in com.google.ortools.constraintsolver.SearchLog.

Definition at line 219 of file SearchMonitor.java.

◆ afterDecision()

void com.google.ortools.constraintsolver.SearchMonitor.afterDecision ( Decision d,
boolean 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.

Definition at line 137 of file SearchMonitor.java.

◆ applyDecision()

void com.google.ortools.constraintsolver.SearchMonitor.applyDecision ( Decision d)

Before applying the decision.

Reimplemented in com.google.ortools.constraintsolver.SearchLog.

Definition at line 122 of file SearchMonitor.java.

◆ atSolution()

boolean com.google.ortools.constraintsolver.SearchMonitor.atSolution ( )

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 com.google.ortools.constraintsolver.ImprovementSearchLimit, com.google.ortools.constraintsolver.ObjectiveMonitor, com.google.ortools.constraintsolver.OptimizeVar, and com.google.ortools.constraintsolver.SearchLog.

Definition at line 183 of file SearchMonitor.java.

◆ beginFail()

void com.google.ortools.constraintsolver.SearchMonitor.beginFail ( )

Just when the failure occurs.

Reimplemented in com.google.ortools.constraintsolver.SearchLog.

Definition at line 144 of file SearchMonitor.java.

◆ beginInitialPropagation()

void com.google.ortools.constraintsolver.SearchMonitor.beginInitialPropagation ( )

Before the initial propagation.

Reimplemented in com.google.ortools.constraintsolver.SearchLog.

Definition at line 158 of file SearchMonitor.java.

◆ beginNextDecision()

void com.google.ortools.constraintsolver.SearchMonitor.beginNextDecision ( DecisionBuilder b)

Before calling DecisionBuilder::Next.

Reimplemented in com.google.ortools.constraintsolver.OptimizeVar, and com.google.ortools.constraintsolver.SearchLimit.

Definition at line 100 of file SearchMonitor.java.

◆ delete()

◆ endFail()

void com.google.ortools.constraintsolver.SearchMonitor.endFail ( )

After completing the backtrack.

Definition at line 151 of file SearchMonitor.java.

◆ endInitialPropagation()

void com.google.ortools.constraintsolver.SearchMonitor.endInitialPropagation ( )

After the initial propagation.

Reimplemented in com.google.ortools.constraintsolver.SearchLog.

Definition at line 165 of file SearchMonitor.java.

◆ endNextDecision()

void com.google.ortools.constraintsolver.SearchMonitor.endNextDecision ( DecisionBuilder b,
Decision d )

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

Definition at line 111 of file SearchMonitor.java.

◆ enterSearch()

void com.google.ortools.constraintsolver.SearchMonitor.enterSearch ( )

◆ exitSearch()

void com.google.ortools.constraintsolver.SearchMonitor.exitSearch ( )

◆ finalize()

◆ getCPtr()

static long com.google.ortools.constraintsolver.SearchMonitor.getCPtr ( SearchMonitor obj)
staticprotected

Definition at line 22 of file SearchMonitor.java.

◆ install()

void com.google.ortools.constraintsolver.SearchMonitor.install ( )

Registers itself on the solver such that it gets notified of the search
and propagation events. Override to incrementally install listeners for
specific events.

Reimplemented in com.google.ortools.constraintsolver.ImprovementSearchLimit, com.google.ortools.constraintsolver.LocalSearchMonitor, com.google.ortools.constraintsolver.PropagationMonitor, com.google.ortools.constraintsolver.RegularLimit, com.google.ortools.constraintsolver.SearchLimit, and com.google.ortools.constraintsolver.SolutionCollector.

Definition at line 258 of file SearchMonitor.java.

◆ IsUncheckedSolutionLimitReached()

boolean com.google.ortools.constraintsolver.SearchMonitor.IsUncheckedSolutionLimitReached ( )

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

Reimplemented in com.google.ortools.constraintsolver.RegularLimit.

Definition at line 227 of file SearchMonitor.java.

◆ keepAliveDecisionBuilder()

void com.google.ortools.constraintsolver.SearchMonitor.keepAliveDecisionBuilder ( DecisionBuilder db)

◆ localOptimum()

boolean com.google.ortools.constraintsolver.SearchMonitor.localOptimum ( )

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 198 of file SearchMonitor.java.

◆ noMoreSolutions()

void com.google.ortools.constraintsolver.SearchMonitor.noMoreSolutions ( )

When the search tree is finished.

Reimplemented in com.google.ortools.constraintsolver.SearchLog.

Definition at line 190 of file SearchMonitor.java.

◆ periodicCheck()

void com.google.ortools.constraintsolver.SearchMonitor.periodicCheck ( )

Periodic call to check limits in long running methods.

Reimplemented in com.google.ortools.constraintsolver.SearchLimit.

Definition at line 234 of file SearchMonitor.java.

◆ progressPercent()

int com.google.ortools.constraintsolver.SearchMonitor.progressPercent ( )

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

Reimplemented in com.google.ortools.constraintsolver.RegularLimit.

Definition at line 242 of file SearchMonitor.java.

◆ refuteDecision()

void com.google.ortools.constraintsolver.SearchMonitor.refuteDecision ( Decision d)

◆ restartSearch()

void com.google.ortools.constraintsolver.SearchMonitor.restartSearch ( )

Restart the search.

Definition at line 86 of file SearchMonitor.java.

◆ solver()

Solver com.google.ortools.constraintsolver.SearchMonitor.solver ( )

Definition at line 262 of file SearchMonitor.java.

◆ swigDirectorDisconnect()

void com.google.ortools.constraintsolver.SearchMonitor.swigDirectorDisconnect ( )
protected

Definition at line 54 of file SearchMonitor.java.

◆ swigRelease()

static long com.google.ortools.constraintsolver.SearchMonitor.swigRelease ( SearchMonitor obj)
staticprotected

Definition at line 26 of file SearchMonitor.java.

◆ swigReleaseOwnership()

void com.google.ortools.constraintsolver.SearchMonitor.swigReleaseOwnership ( )

Definition at line 59 of file SearchMonitor.java.

◆ swigTakeOwnership()

void com.google.ortools.constraintsolver.SearchMonitor.swigTakeOwnership ( )

Definition at line 64 of file SearchMonitor.java.

Member Data Documentation

◆ kNoProgress

final int com.google.ortools.constraintsolver.SearchMonitor.kNoProgress = mainJNI.SearchMonitor_kNoProgress_get()
static

Definition at line 267 of file SearchMonitor.java.


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