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
-
public class ImprovementSearchLimit extends SearchLimit
-
-
Field Summary
-
Fields inherited from class com.google.ortools.constraintsolver.SearchMonitor
kNoProgress
-
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedImprovementSearchLimit(long cPtr, boolean cMemoryOwn)ImprovementSearchLimit(Solver solver, IntVar[] objective_vars, SWIGTYPE_p_std__vectorT_bool_t maximize, double[] objective_scaling_factors, double[] objective_offsets, double improvement_rate_coefficient, int improvement_rate_solutions_distance)ImprovementSearchLimit(Solver solver, IntVar objective_var, boolean maximize, double objective_scaling_factor, double objective_offset, double improvement_rate_coefficient, int improvement_rate_solutions_distance)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanatSolution()This method is called when a valid solution is found.booleanCheckWithOffset(SWIGTYPE_p_absl__Duration offset)Same as Check() but adds the 'offset' value to the current time when time
is considered in the limit.voidcopy(SearchLimit limit)Copy a limit.voiddelete()protected voidfinalize()protected static longgetCPtr(ImprovementSearchLimit 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.SearchLimitmakeClone()Allocates a clone of the limit.protected static longswigRelease(ImprovementSearchLimit obj)-
Methods inherited from class com.google.ortools.constraintsolver.SearchLimit
beginNextDecision, check, crossed, enterSearch, getCPtr, keepAliveDecisionBuilder, periodicCheck, refuteDecision, swigRelease, toString
-
Methods inherited from class com.google.ortools.constraintsolver.SearchMonitor
accept, acceptDelta, acceptNeighbor, acceptSolution, AcceptUncheckedNeighbor, afterDecision, applyDecision, beginFail, beginInitialPropagation, endFail, endInitialPropagation, endNextDecision, exitSearch, getCPtr, IsUncheckedSolutionLimitReached, localOptimum, noMoreSolutions, progressPercent, restartSearch, solver, swigDirectorDisconnect, swigRelease, swigReleaseOwnership, swigTakeOwnership
-
Methods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr, swigRelease
-
-
-
-
Constructor Detail
-
ImprovementSearchLimit
protected ImprovementSearchLimit(long cPtr, boolean cMemoryOwn)
-
ImprovementSearchLimit
public ImprovementSearchLimit(Solver solver, IntVar objective_var, boolean maximize, double objective_scaling_factor, double objective_offset, double improvement_rate_coefficient, int improvement_rate_solutions_distance)
-
ImprovementSearchLimit
public ImprovementSearchLimit(Solver solver, IntVar[] objective_vars, SWIGTYPE_p_std__vectorT_bool_t maximize, double[] objective_scaling_factors, double[] objective_offsets, double improvement_rate_coefficient, int improvement_rate_solutions_distance)
-
-
Method Detail
-
getCPtr
protected static long getCPtr(ImprovementSearchLimit obj)
-
swigRelease
protected static long swigRelease(ImprovementSearchLimit obj)
-
finalize
protected void finalize()
- Overrides:
finalizein classSearchLimit
-
delete
public void delete()
- Overrides:
deletein classSearchLimit
-
copy
public void copy(SearchLimit limit)
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
public SearchLimit makeClone()
Description copied from class:SearchLimitAllocates a clone of the limit.- Overrides:
makeClonein classSearchLimit
-
CheckWithOffset
public boolean CheckWithOffset(SWIGTYPE_p_absl__Duration offset)
Description copied from class:SearchLimitSame as Check() but adds the 'offset' value to the current time when time
is considered in the limit.- Overrides:
CheckWithOffsetin 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
-
install
public 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 classSearchLimit
-
-