Class ObjectiveMonitor
- java.lang.Object
-
- com.google.ortools.constraintsolver.BaseObject
-
- com.google.ortools.constraintsolver.SearchMonitor
-
- com.google.ortools.constraintsolver.ObjectiveMonitor
-
- Direct Known Subclasses:
OptimizeVar
public class ObjectiveMonitor extends SearchMonitor
-
-
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 protectedObjectiveMonitor(long cPtr, boolean cMemoryOwn)ObjectiveMonitor(Solver solver, SWIGTYPE_p_std__vectorT_bool_t maximize, IntVar[] vars, long[] steps)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ModelVisitor visitor)Accepts the given model visitor.booleanacceptDelta(Assignment delta, Assignment deltadelta)booleanatSolution()This method is called when a valid solution is found.longBestValue(int index)voiddelete()voidenterSearch()Beginning of the search.protected voidfinalize()protected static longgetCPtr(ObjectiveMonitor obj)booleanMaximize(int index)IntVarMinimizationVar(int index)IntVarObjectiveVar(int index)intSize()longStep(int index)protected static longswigRelease(ObjectiveMonitor obj)-
Methods 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, swigTakeOwnership
-
Methods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr, swigRelease, toString
-
-
-
-
Constructor Detail
-
ObjectiveMonitor
protected ObjectiveMonitor(long cPtr, boolean cMemoryOwn)
-
ObjectiveMonitor
public ObjectiveMonitor(Solver solver, SWIGTYPE_p_std__vectorT_bool_t maximize, IntVar[] vars, long[] steps)
-
-
Method Detail
-
getCPtr
protected static long getCPtr(ObjectiveMonitor obj)
-
swigRelease
protected static long swigRelease(ObjectiveMonitor obj)
-
finalize
protected void finalize()
- Overrides:
finalizein classSearchMonitor
-
delete
public void delete()
- Overrides:
deletein classSearchMonitor
-
ObjectiveVar
public IntVar ObjectiveVar(int index)
-
MinimizationVar
public IntVar MinimizationVar(int index)
-
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
public boolean acceptDelta(Assignment delta, Assignment deltadelta)
- Overrides:
acceptDeltain classSearchMonitor
-
accept
public void accept(ModelVisitor visitor)
Description copied from class:SearchMonitorAccepts the given model visitor.- Overrides:
acceptin classSearchMonitor
-
-