|
|||||||||
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.dbt.search.PalmGlobalSearchSolver
public class PalmGlobalSearchSolver
A default solver for Palm. By default, it uses mac-dbt
algorithm (for extension and repairing).
Field Summary | |
---|---|
protected PalmExtend |
extending
Extension algrithm using some branching strategies. |
protected boolean |
feasible
States if the problem is feasible. |
protected boolean |
finished
States if the search is finished. |
protected PalmLearn |
learning
Learning algorithms. |
static int |
LIMIT_NODES
|
static int |
LIMIT_TIME
|
protected PalmRepair |
repairing
Repairing algorithm. |
protected PalmState |
state
Maintains the state of the search (past branching decisions). |
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 | |
---|---|
PalmGlobalSearchSolver(AbstractProblem pb)
Creates a solver for the specified problem. |
Method Summary | |
---|---|
void |
attachPalmBranchings(java.util.List lbr)
Attaches a new list of branching. |
void |
attachPalmExtend(PalmExtend ext)
Attaches a new extension tool. |
void |
attachPalmLearn(PalmLearn ext)
Attache a new learning tool. |
void |
attachPalmRepair(PalmRepair ext)
Attaches a new PalmRepair algorithm. |
void |
attachPalmState(PalmState ext)
Attaches a new PalmState to the solver. |
void |
endTreeSearch()
called before a new search tree is explored |
void |
extend()
Extends the state of the search thanks to the extending algorithm. |
PalmExtend |
getExtending()
Gets the PalmExtend tool. |
PalmLearn |
getLearning()
Gets the PalmLearn tool. |
IGlobalSearchLimit |
getLimit(int i)
|
int |
getNbLimit()
|
int |
getNodeLimit()
|
PalmState |
getState()
Gets the PalmState tool. |
int |
getTimeLimit()
|
boolean |
isFinished()
Chechs if the solver has finished searching a solution. |
void |
newTreeSearch()
called before a new search tree is explored |
void |
recordSolution()
Stores the current solution. |
void |
repair()
Tries to repair the state for finding a consistent state. |
void |
reset()
Resets the solver (statistics and business data). |
void |
run()
Starts solving. |
void |
setFinished(boolean f)
Sets if the solver has finished searching a solution. |
void |
setNodeLimit(int nodeLimit)
|
void |
setTimeLimit(int timeLimit)
|
Methods inherited from class choco.search.AbstractGlobalSearchSolver |
---|
endTreeNode, getEncounteredLimit, incrementalRun, isEncounteredLimit, newTreeNode, nextSolution, popTrace, popTraceUntil, postDynamicCut, printRuntimeStatistics, pushTrace, 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 static final int LIMIT_TIME
public static final int LIMIT_NODES
protected boolean finished
protected boolean feasible
protected PalmState state
protected PalmLearn learning
protected PalmExtend extending
protected PalmRepair repairing
Constructor Detail |
---|
public PalmGlobalSearchSolver(AbstractProblem pb)
pb
- The problem to search.Method Detail |
---|
public void newTreeSearch()
AbstractGlobalSearchSolver
newTreeSearch
in class AbstractGlobalSearchSolver
public void endTreeSearch()
AbstractGlobalSearchSolver
endTreeSearch
in class AbstractGlobalSearchSolver
public void reset()
public void attachPalmState(PalmState ext)
ext
- The PalmState that should be used for maintaining state of the search.public void attachPalmExtend(PalmExtend ext)
public void attachPalmBranchings(java.util.List lbr)
public void attachPalmLearn(PalmLearn ext)
ext
- The learning extension the solver shoudl use.public void attachPalmRepair(PalmRepair ext)
ext
- The new repairing algorithm the solver must use.public boolean isFinished()
public void setFinished(boolean f)
f
- New value.public void recordSolution()
recordSolution
in class AbstractGlobalSearchSolver
public void run()
run
in class AbstractGlobalSearchSolver
public void extend() throws ContradictionException
ContradictionException
public void repair() throws ContradictionException
ContradictionException
public PalmState getState()
public PalmLearn getLearning()
public PalmExtend getExtending()
public int getTimeLimit()
public void setTimeLimit(int timeLimit)
public int getNodeLimit()
public void setNodeLimit(int nodeLimit)
public IGlobalSearchLimit getLimit(int i)
public int getNbLimit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |