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
kNoProgress
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn
-
Constructor Summary
ConstructorsConstructorDescriptionImprovementSearchLimit
(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
Modifier and TypeMethodDescriptionboolean
This method is called when a valid solution is found.boolean
Same as Check() but adds the 'offset' value to the current time when time
is considered in the limit.void
copy
(SearchLimit limit) Copy a limit.void
delete()
protected void
finalize()
static long
void
init()
This method is called when the search limit is initialized.void
install()
Registers itself on the solver such that it gets notified of the search
and propagation events.Allocates a clone of the limit.static long
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 Details
-
ImprovementSearchLimit
public ImprovementSearchLimit(long cPtr, boolean cMemoryOwn) -
ImprovementSearchLimit
-
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 Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classSearchLimit
-
delete
public void delete()- Overrides:
delete
in classSearchLimit
-
copy
Description copied from class:SearchLimit
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.- Overrides:
copy
in classSearchLimit
-
makeClone
Description copied from class:SearchLimit
Allocates a clone of the limit.- Overrides:
makeClone
in classSearchLimit
-
CheckWithOffset
Description copied from class:SearchLimit
Same as Check() but adds the 'offset' value to the current time when time
is considered in the limit.- Overrides:
CheckWithOffset
in classSearchLimit
-
atSolution
public boolean atSolution()Description copied from class:SearchMonitor
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.- Overrides:
atSolution
in classSearchMonitor
-
init
public void init()Description copied from class:SearchLimit
This method is called when the search limit is initialized.- Overrides:
init
in classSearchLimit
-
install
public void install()Description copied from class:SearchMonitor
Registers itself on the solver such that it gets notified of the search
and propagation events. Override to incrementally install listeners for
specific events.- Overrides:
install
in classSearchLimit
-