Class ImprovementSearchLimit
java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.SearchMonitor
com.google.ortools.constraintsolver.SearchLimit
com.google.ortools.constraintsolver.ImprovementSearchLimit
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.SearchMonitor
kNoProgressFields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedImprovementSearchLimit(long cPtr, boolean cMemoryOwn) ImprovementSearchLimit(Solver s, IntVar objective_var, boolean maximize, double objective_scaling_factor, double objective_offset, double improvement_rate_coefficient, int improvement_rate_solutions_distance) -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis method is called when a valid solution is found.booleancheck()This method is called to check the status of the limit.voidcopy(SearchLimit limit) Copy a limit.voiddelete()protected voidfinalize()protected static longvoidinit()This method is called when the search limit is initialized.Allocates a clone of the limit.Methods inherited from class com.google.ortools.constraintsolver.SearchLimit
beginNextDecision, crossed, enterSearch, getCPtr, keepAliveDecisionBuilder, periodicCheck, refuteDecision, toStringMethods inherited from class com.google.ortools.constraintsolver.SearchMonitor
accept, acceptDelta, acceptNeighbor, acceptSolution, AcceptUncheckedNeighbor, afterDecision, applyDecision, 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
-
ImprovementSearchLimit
protected ImprovementSearchLimit(long cPtr, boolean cMemoryOwn) -
ImprovementSearchLimit
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize()- Overrides:
finalizein classSearchLimit
-
delete
public void delete()- Overrides:
deletein classSearchLimit
-
copy
Description copied from class:SearchLimitCopy 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.- Overrides:
copyin classSearchLimit
-
makeClone
Description copied from class:SearchLimitAllocates a clone of the limit.- Overrides:
makeClonein classSearchLimit
-
check
public boolean check()Description copied from class:SearchLimitThis 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.- Overrides:
checkin classSearchLimit
-
atSolution
public boolean atSolution()Description copied from class:SearchMonitorThis 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.- Overrides:
atSolutionin classSearchMonitor
-
init
public void init()Description copied from class:SearchLimitThis method is called when the search limit is initialized.- Overrides:
initin classSearchLimit
-