|
|||||||||
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
public abstract class AbstractGlobalSearchSolver
An abstract class for controlling tree search in various ways
Field Summary | |
---|---|
int |
baseWorld
the index of the world where the search started |
int |
currentTraceIndex
index of the current trace in the stack |
static int |
DOWN_BRANCH
|
protected IGlobalSearchLimit |
encounteredLimit
indicates whether a limit was encountered in the alst incremental search |
static int |
INIT_SEARCH
constants for dirving the incremental search algorithm |
java.util.ArrayList |
limits
A set of limits controlling the exploration |
protected int |
loggingMaxDepth
maximal search depth for logging statements |
AbstractIntBranching |
mainGoal
/** the goal that needs be solved to drive the exploration |
int |
nbSolutions
count of the solutions found during search |
int |
nextMove
search controller: a flag storing the next move in the search tree |
static int |
OPEN_NODE
|
boolean |
stopAtFirstSol
indicates whether the control should stop after the first solution is found |
java.util.ArrayList |
traceStack
a data structure storing the stack of choice contexts (for incremental search explorations) |
static int |
UP_BRANCH
|
Fields inherited from class choco.AbstractSolver |
---|
logger, maxNbSolutionStored, solutions |
Fields inherited from class choco.AbstractEntity |
---|
hook, problem |
Constructor Summary | |
---|---|
protected |
AbstractGlobalSearchSolver(AbstractProblem pb)
|
Method Summary | |
---|---|
void |
endTreeNode()
called after a node is expanded in the search tree (choice point creation) |
void |
endTreeSearch()
called before a new search tree is explored |
IGlobalSearchLimit |
getEncounteredLimit()
If a limit has been encounteres, return the involved limit |
void |
incrementalRun()
main entry point: searching for one solution Note: the initial propagation must be done before pushing any world level. |
boolean |
isEncounteredLimit()
Checks if a limit has been encountered |
void |
newTreeNode()
called before a node is expanded in the search tree (choice point creation) |
void |
newTreeSearch()
called before a new search tree is explored |
java.lang.Boolean |
nextSolution()
|
IntBranchingTrace |
popTrace()
|
void |
popTraceUntil(int targetWorld)
|
void |
postDynamicCut()
called before going down into each branch of the choice point |
void |
printRuntimeStatistics()
Print all statistics |
IntBranchingTrace |
pushTrace()
|
void |
recordSolution()
called when a solution is encountered: printing and, if needed, storing the solution |
void |
run()
Deprecated. replaced by incrementalRun |
void |
setLoggingMaxDepth(int loggingMaxDepth)
count of the backtracks made during search |
IntBranchingTrace |
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 static final int INIT_SEARCH
public static final int OPEN_NODE
public static final int UP_BRANCH
public static final int DOWN_BRANCH
public java.util.ArrayList traceStack
public int currentTraceIndex
public int nextMove
public boolean stopAtFirstSol
protected IGlobalSearchLimit encounteredLimit
public int nbSolutions
protected int loggingMaxDepth
public AbstractIntBranching mainGoal
public int baseWorld
public java.util.ArrayList limits
Constructor Detail |
---|
protected AbstractGlobalSearchSolver(AbstractProblem pb)
Method Detail |
---|
public void setLoggingMaxDepth(int loggingMaxDepth)
public void run()
run
in class AbstractSolver
public void incrementalRun()
public void newTreeSearch() throws ContradictionException
ContradictionException
public void endTreeSearch()
public void newTreeNode() throws ContradictionException
ContradictionException
public void endTreeNode() throws ContradictionException
ContradictionException
public void recordSolution()
recordSolution
in class AbstractSolver
public void postDynamicCut() throws ContradictionException
ContradictionException
public IntBranchingTrace pushTrace()
public IntBranchingTrace popTrace()
public IntBranchingTrace topTrace()
public void popTraceUntil(int targetWorld)
public java.lang.Boolean nextSolution()
public void printRuntimeStatistics()
public boolean isEncounteredLimit()
public IGlobalSearchLimit getEncounteredLimit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |