Class SearchLimit
java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.SearchMonitor
com.google.ortools.constraintsolver.SearchLimit
- Direct Known Subclasses:
ImprovementSearchLimit,RegularLimit
Base class of all search limits.
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.SearchMonitor
kNoProgressFields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBefore calling DecisionBuilder::Next.booleancheck()This method is called to check the status of the limit.voidcopy(SearchLimit limit) Copy a limit.booleancrossed()Returns true if the limit has been crossed.voiddelete()voidInternal methods.protected voidfinalize()protected static longgetCPtr(SearchLimit obj) voidinit()This method is called when the search limit is initialized.voidAllocates a clone of the limit.voidPeriodic call to check limits in long running methods.voidBefore refuting the decision.toString()Methods inherited from class com.google.ortools.constraintsolver.SearchMonitor
accept, acceptDelta, acceptNeighbor, acceptSolution, AcceptUncheckedNeighbor, afterDecision, applyDecision, atSolution, beginFail, beginInitialPropagation, endFail, endInitialPropagation, endNextDecision, exitSearch, getCPtr, install, IsUncheckedSolutionLimitReached, localOptimum, noMoreSolutions, progressPercent, restartSearch, solver, swigDirectorDisconnect, swigReleaseOwnership, swigTakeOwnershipMethods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr
-
Constructor Details
-
SearchLimit
protected SearchLimit(long cPtr, boolean cMemoryOwn)
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize()- Overrides:
finalizein classSearchMonitor
-
delete
public void delete()- Overrides:
deletein classSearchMonitor
-
keepAliveDecisionBuilder
- Overrides:
keepAliveDecisionBuilderin classSearchMonitor
-
crossed
public boolean crossed()Returns true if the limit has been crossed. -
check
public boolean check()This method is called to check the status of the limit. A return
value of true indicates that we have indeed crossed the limit. In
that case, this method will not be called again and the remaining
search will be discarded. -
init
public void init()This method is called when the search limit is initialized. -
copy
Copy a limit. Warning: leads to a direct (no check) downcasting of 'limit'
so one needs to be sure both SearchLimits are of the same type. -
makeClone
Allocates a clone of the limit. -
enterSearch
public void enterSearch()Internal methods.- Overrides:
enterSearchin classSearchMonitor
-
beginNextDecision
Description copied from class:SearchMonitorBefore calling DecisionBuilder::Next.- Overrides:
beginNextDecisionin classSearchMonitor
-
periodicCheck
public void periodicCheck()Description copied from class:SearchMonitorPeriodic call to check limits in long running methods.- Overrides:
periodicCheckin classSearchMonitor
-
refuteDecision
Description copied from class:SearchMonitorBefore refuting the decision.- Overrides:
refuteDecisionin classSearchMonitor
-
toString
- Overrides:
toStringin classBaseObject
-