Module org.chocosolver.solver
Package org.chocosolver.solver.objective
Interface IObjectiveManager<V extends Variable>
-
- Type Parameters:
V
- type of objective variable
- All Superinterfaces:
IBoundsManager
,ICause
,Serializable
public interface IObjectiveManager<V extends Variable> extends IBoundsManager, ICause
interface to monitor the bounds of the objective variable.- Author:
- Jean-Guillaume Fages, Charles Prud'homme, Arnaud Malapert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description V
getObjective()
void
postDynamicCut()
Prevent the model from computing worse quality solutionsvoid
setCutComputer(Function<Number,Number> cutComputer)
Set a user-defined cut computer to avoid "worse" solutionsvoid
setStrictDynamicCut()
Define a strict cut computer where in the next solution to find should be strictly greater (resp. lesser) than the best solution found so far when maximizing (resp. minimizing) a problem.void
setWalkingDynamicCut()
Define a walking cut computer where in the next solution to find should be greater than (resp. less than) or equal to the best solution found so far when maximizing (resp. minimizing) a problem.boolean
updateBestSolution()
Informs the manager that a new solution has been foundboolean
updateBestSolution(Number n)
Informs the manager that a new solution has been found-
Methods inherited from interface org.chocosolver.solver.objective.IBoundsManager
getBestLB, getBestSolutionValue, getBestUB, getPolicy, isOptimization, resetBestBounds, updateBestLB, updateBestUB
-
Methods inherited from interface org.chocosolver.solver.ICause
explain, forEachIntVar
-
-
-
-
Method Detail
-
getObjective
V getObjective()
- Returns:
- the objective variable
-
updateBestSolution
boolean updateBestSolution(Number n)
Informs the manager that a new solution has been found
-
updateBestSolution
boolean updateBestSolution()
Informs the manager that a new solution has been found
-
setCutComputer
void setCutComputer(Function<Number,Number> cutComputer)
Set a user-defined cut computer to avoid "worse" solutions
-
setStrictDynamicCut
void setStrictDynamicCut()
Define a strict cut computer where in the next solution to find should be strictly greater (resp. lesser) than the best solution found so far when maximizing (resp. minimizing) a problem.
-
setWalkingDynamicCut
void setWalkingDynamicCut()
Define a walking cut computer where in the next solution to find should be greater than (resp. less than) or equal to the best solution found so far when maximizing (resp. minimizing) a problem.
-
postDynamicCut
void postDynamicCut() throws ContradictionException
Prevent the model from computing worse quality solutions- Throws:
ContradictionException
- if posting this cut fails
-
-