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 SummaryFields inherited from class com.google.ortools.constraintsolver.SearchMonitorkNoProgressFields inherited from class com.google.ortools.constraintsolver.BaseObjectswigCMemOwn
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidBefore calling DecisionBuilder::Next.booleancheck()This method is called to check the status of the limit.booleanSame as Check() but adds the 'offset' value to the current time when time
 is considered in the limit.voidcopy(SearchLimit limit) Copy a limit.booleancrossed()Returns true if the limit has been crossed.voiddelete()voidInternal methods.protected voidfinalize()static longgetCPtr(SearchLimit obj) voidinit()This method is called when the search limit is initialized.voidinstall()Registers itself on the solver such that it gets notified of the search
 and propagation events.voidAllocates a clone of the limit.voidPeriodic call to check limits in long running methods.voidBefore refuting the decision.static longswigRelease(SearchLimit obj) toString()Methods inherited from class com.google.ortools.constraintsolver.SearchMonitoraccept, acceptDelta, acceptNeighbor, acceptSolution, AcceptUncheckedNeighbor, afterDecision, applyDecision, atSolution, beginFail, beginInitialPropagation, endFail, endInitialPropagation, endNextDecision, exitSearch, getCPtr, IsUncheckedSolutionLimitReached, localOptimum, noMoreSolutions, progressPercent, restartSearch, solver, swigDirectorDisconnect, swigRelease, swigReleaseOwnership, swigTakeOwnershipMethods inherited from class com.google.ortools.constraintsolver.BaseObjectgetCPtr, swigRelease
- 
Constructor Details- 
SearchLimitpublic SearchLimit(long cPtr, boolean cMemoryOwn) 
 
- 
- 
Method Details- 
getCPtr
- 
swigRelease
- 
finalizeprotected void finalize()- Overrides:
- finalizein class- SearchMonitor
 
- 
deletepublic void delete()- Overrides:
- deletein class- SearchMonitor
 
- 
keepAliveDecisionBuilder- Overrides:
- keepAliveDecisionBuilderin class- SearchMonitor
 
- 
crossedpublic boolean crossed()Returns true if the limit has been crossed.
- 
checkpublic 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.
- 
CheckWithOffsetSame as Check() but adds the 'offset' value to the current time when time
 is considered in the limit.
- 
initpublic void init()This method is called when the search limit is initialized.
- 
copyCopy 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.
- 
makeCloneAllocates a clone of the limit.
- 
enterSearch
- 
beginNextDecisionDescription copied from class:SearchMonitorBefore calling DecisionBuilder::Next.- Overrides:
- beginNextDecisionin class- SearchMonitor
 
- 
periodicCheckpublic void periodicCheck()Description copied from class:SearchMonitorPeriodic call to check limits in long running methods.- Overrides:
- periodicCheckin class- SearchMonitor
 
- 
refuteDecisionDescription copied from class:SearchMonitorBefore refuting the decision.- Overrides:
- refuteDecisionin class- SearchMonitor
 
- 
toString- Overrides:
- toStringin class- BaseObject
 
- 
installpublic void install()Description copied from class:SearchMonitorRegisters itself on the solver such that it gets notified of the search
 and propagation events. Override to incrementally install listeners for
 specific events.- Overrides:
- installin class- SearchMonitor
 
 
-