|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.search.AbstractSearchStrategy
choco.kernel.solver.search.AbstractGlobalSearchStrategy
choco.kernel.solver.search.AbstractOptimize
public abstract class AbstractOptimize
Field Summary | |
---|---|
boolean |
doMaximize
a boolean indicating whether we want to maximize (true) or minimize (false) the objective variable |
Var |
objective
the objective variable |
protected IObjectiveManager |
objManager
the bounding object, record objective value and compute target bound. |
Fields inherited from class choco.kernel.solver.search.AbstractGlobalSearchStrategy |
---|
baseWorld, currentTraceIndex, DOWN_BRANCH, encounteredLimit, INIT_SEARCH, initialPropagation, limitManager, mainGoal, nextMove, OPEN_NODE, RESTART, searchLoop, shavingTools, STOP, stopAtFirstSol, traceStack, UP_BRANCH |
Fields inherited from class choco.kernel.solver.search.AbstractSearchStrategy |
---|
LOGGER, nbSolutions, solutionPool, solver |
Constructor Summary | |
---|---|
protected |
AbstractOptimize(Solver solver,
IObjectiveManager bounds,
boolean maximize)
constructor |
Method Summary | |
---|---|
protected void |
advancedInitialPropagation()
|
protected void |
bottomUpSearch()
|
IObjectiveManager |
getObjectiveManager()
|
void |
incrementalRun()
main entry point: searching for one solution Note: the initial propagation must be done before pushing any world level. |
void |
newFeasibleRootState()
called when the root state of the search tree is feasible. |
Boolean |
nextSolution()
|
String |
partialRuntimeStatistics(boolean logOnSolution)
|
void |
postDynamicCut()
we use targetBound data structures for the optimization cuts |
void |
recordSolution()
called when a solution is encountered: printing and, if needed, storing the solution |
void |
restoreBestSolution()
|
String |
runtimeStatistics()
|
void |
writeSolution(Solution sol)
|
Methods inherited from class choco.kernel.solver.search.AbstractGlobalSearchStrategy |
---|
clearTrace, endTreeSearch, getBackTrackCount, getCurrentTraceIndex, getEncounteredLimit, getFailCount, getLimitManager, getNodeCount, getRestartCount, getReusableInitialTrace, getSearchLoop, getShavingTools, getTimeCount, getTrace, getTraceSize, initialPropagation, initialTrace, initMainGoal, isEncounteredLimit, isFeasibleRootState, isTraceEmpty, newTreeSearch, popTrace, pushTrace, setEncounteredLimit, setLimitManager, setSearchLoop, setShavingTools, topDownSearch, topTrace |
Methods inherited from class choco.kernel.solver.search.AbstractSearchStrategy |
---|
existsSolution, getSolutionCount, getSolutionPool, getSolver, getStoredSolutions, resetSolutions, setSolutionPool |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface choco.kernel.solver.search.measure.ISearchMeasures |
---|
getSolutionCount |
Field Detail |
---|
public final boolean doMaximize
public final Var objective
protected final IObjectiveManager objManager
Constructor Detail |
---|
protected AbstractOptimize(Solver solver, IObjectiveManager bounds, boolean maximize)
solver
- the solvermaximize
- maximization or minimization ?configuration
- Method Detail |
---|
public final IObjectiveManager getObjectiveManager()
getObjectiveManager
in class AbstractGlobalSearchStrategy
public void newFeasibleRootState()
AbstractGlobalSearchStrategy
newFeasibleRootState
in class AbstractGlobalSearchStrategy
public void writeSolution(Solution sol)
writeSolution
in class AbstractGlobalSearchStrategy
public void recordSolution()
AbstractGlobalSearchStrategy
recordSolution
in class AbstractGlobalSearchStrategy
public void postDynamicCut() throws ContradictionException
postDynamicCut
in class AbstractGlobalSearchStrategy
ContradictionException
protected void advancedInitialPropagation() throws ContradictionException
advancedInitialPropagation
in class AbstractGlobalSearchStrategy
ContradictionException
public Boolean nextSolution()
nextSolution
in class AbstractGlobalSearchStrategy
protected final void bottomUpSearch()
public void incrementalRun()
AbstractGlobalSearchStrategy
incrementalRun
in class AbstractGlobalSearchStrategy
public String partialRuntimeStatistics(boolean logOnSolution)
partialRuntimeStatistics
in class AbstractGlobalSearchStrategy
public String runtimeStatistics()
runtimeStatistics
in class AbstractGlobalSearchStrategy
public void restoreBestSolution()
restoreBestSolution
in class AbstractSearchStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |