Class ObjectiveMonitor
java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.SearchMonitor
com.google.ortools.constraintsolver.ObjectiveMonitor
- Direct Known Subclasses:
OptimizeVar
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.SearchMonitor
kNoProgressFields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedObjectiveMonitor(long cPtr, boolean cMemoryOwn) ObjectiveMonitor(Solver solver, SWIGTYPE_p_std__vectorT_bool_t maximize, IntVar[] vars, long[] steps) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ModelVisitor visitor) Accepts the given model visitor.booleanacceptDelta(Assignment delta, Assignment deltadelta) booleanThis method is called when a valid solution is found.longBestValue(int index) voiddelete()voidBeginning of the search.protected voidfinalize()protected static longgetCPtr(ObjectiveMonitor obj) booleanMaximize(int index) MinimizationVar(int index) ObjectiveVar(int index) intSize()longStep(int index) protected static longMethods inherited from class com.google.ortools.constraintsolver.SearchMonitor
acceptNeighbor, acceptSolution, AcceptUncheckedNeighbor, afterDecision, applyDecision, beginFail, beginInitialPropagation, beginNextDecision, endFail, endInitialPropagation, endNextDecision, exitSearch, getCPtr, install, IsUncheckedSolutionLimitReached, keepAliveDecisionBuilder, localOptimum, noMoreSolutions, periodicCheck, progressPercent, refuteDecision, restartSearch, solver, swigDirectorDisconnect, swigRelease, swigReleaseOwnership, swigTakeOwnershipMethods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr, swigRelease, toString
-
Constructor Details
-
ObjectiveMonitor
protected ObjectiveMonitor(long cPtr, boolean cMemoryOwn) -
ObjectiveMonitor
public ObjectiveMonitor(Solver solver, SWIGTYPE_p_std__vectorT_bool_t maximize, IntVar[] vars, long[] steps)
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalizein classSearchMonitor
-
delete
public void delete()- Overrides:
deletein classSearchMonitor
-
ObjectiveVar
-
MinimizationVar
-
Step
public long Step(int index) -
Maximize
public boolean Maximize(int index) -
BestValue
public long BestValue(int index) -
Size
public int Size() -
enterSearch
public void enterSearch()Description copied from class:SearchMonitorBeginning of the search.- Overrides:
enterSearchin classSearchMonitor
-
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
-
acceptDelta
- Overrides:
acceptDeltain classSearchMonitor
-
accept
Description copied from class:SearchMonitorAccepts the given model visitor.- Overrides:
acceptin classSearchMonitor
-