|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.AbstractEntity
choco.AbstractSolver
choco.search.AbstractGlobalSearchSolver
choco.search.Solve
choco.palm.cbj.search.JumpGlobalSearchSolver
choco.palm.benders.search.SubSearchSolver
choco.palm.benders.search.SubOptimizer
public class SubOptimizer
A searchsolver for optimization
Field Summary | |
---|---|
boolean |
doMaximize
a boolean indicating whether we want to maximize (true) or minize (false) the objective variable |
int |
lowerBound
the lower bound of the objective value. |
protected int[] |
msol
Master solution |
ExplainedIntVar |
objective
the variable modelling the objective value |
int |
targetLowerBound
a tentative lower bound |
int |
targetUpperBound
a tentative upper bound |
int |
upperBound
the upper bound of the objective value This value comes from the problem definition; it is strengthened by the search history (solutions found & no-goods) |
Fields inherited from class choco.palm.benders.search.SubSearchSolver |
---|
currentCtx, slave |
Fields inherited from class choco.palm.cbj.search.JumpGlobalSearchSolver |
---|
currentFail |
Fields inherited from class choco.search.AbstractGlobalSearchSolver |
---|
baseWorld, currentTraceIndex, DOWN_BRANCH, encounteredLimit, INIT_SEARCH, limits, loggingMaxDepth, mainGoal, nbSolutions, nextMove, OPEN_NODE, stopAtFirstSol, traceStack, UP_BRANCH |
Fields inherited from class choco.AbstractSolver |
---|
logger, maxNbSolutionStored, solutions |
Fields inherited from class choco.AbstractEntity |
---|
hook, problem |
Constructor Summary | |
---|---|
protected |
SubOptimizer(IntDomainVar obj,
boolean maximize,
boolean slave)
constructor |
Method Summary | |
---|---|
protected void |
changeGoal(AbstractIntBranching branching,
IntDomainVar newObjective)
|
int |
getBestObjectiveValue()
|
int |
getObjectiveTarget()
the target for the objective function: we are searching for a solution at least as good as this (tentative bound) |
int |
getObjectiveValue()
v1.0 accessing the objective value of an optimization problem (note that the objective value may not be instantiated, while all other variables are) |
void |
initBounds()
initialization of the optimization bound data structure |
void |
logIntermediateSol()
|
java.lang.Boolean |
nextOptimalSolution(int masterWorld)
get the next solution of the master problem |
void |
postDynamicCut()
we use targetBound data structures for the optimization cuts |
void |
postKnownBound()
|
void |
postLowerBound(int lb)
|
void |
postTargetBound()
propagating the optimization cuts from the new target bounds |
void |
postUpperBound(int ub)
|
void |
recordSolution()
called when a solution is encountered: printing and, if needed, storing the solution |
void |
restoreBestSolutionBySearch()
|
void |
setBound()
resetting the optimization bounds |
void |
setTargetBound()
resetting the values of the target bounds (bounds for the remaining search) |
protected void |
setTargetLowerBound()
|
protected void |
setTargetUpperBound()
|
void |
solutionFound(IntBranchingTrace ctx)
|
void |
storeMasterSolution()
|
Methods inherited from class choco.palm.benders.search.SubSearchSolver |
---|
changeGoal, fusionGoal, nextSolution, setCurrentFail |
Methods inherited from class choco.search.AbstractGlobalSearchSolver |
---|
endTreeNode, endTreeSearch, getEncounteredLimit, incrementalRun, isEncounteredLimit, newTreeNode, newTreeSearch, popTrace, popTraceUntil, printRuntimeStatistics, pushTrace, run, setLoggingMaxDepth, topTrace |
Methods inherited from class choco.AbstractSolver |
---|
existsSolution, makeSolutionFromCurrentState, restoreBestSolution, showSolution, storeSolution |
Methods inherited from class choco.AbstractEntity |
---|
getProblem, pretty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean doMaximize
public ExplainedIntVar objective
public int lowerBound
public int upperBound
public int targetUpperBound
public int targetLowerBound
protected int[] msol
Constructor Detail |
---|
protected SubOptimizer(IntDomainVar obj, boolean maximize, boolean slave)
obj
- the objective variablemaximize
- maximization or minimization ?Method Detail |
---|
protected void changeGoal(AbstractIntBranching branching, IntDomainVar newObjective)
public java.lang.Boolean nextOptimalSolution(int masterWorld)
SubSearchSolver
nextOptimalSolution
in class SubSearchSolver
public void solutionFound(IntBranchingTrace ctx)
solutionFound
in class SubSearchSolver
public int getObjectiveValue()
public int getBestObjectiveValue()
public int getObjectiveTarget()
public void initBounds()
public void recordSolution()
AbstractGlobalSearchSolver
recordSolution
in class AbstractGlobalSearchSolver
public void setBound()
public void setTargetBound()
protected void setTargetLowerBound()
protected void setTargetUpperBound()
public void postTargetBound() throws ContradictionException
ContradictionException
public void postKnownBound() throws ContradictionException
ContradictionException
public void postLowerBound(int lb) throws ContradictionException
ContradictionException
public void postUpperBound(int ub) throws ContradictionException
ContradictionException
public void postDynamicCut() throws ContradictionException
postDynamicCut
in class AbstractGlobalSearchSolver
ContradictionException
public void storeMasterSolution()
public void restoreBestSolutionBySearch()
public void logIntermediateSol()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |