|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.AbstractEntity
choco.Solver
public class Solver
This class serves both as a factory and as a handler for AbstractGlobalSearchSolvers:
Field Summary | |
---|---|
protected boolean |
doMaximize
Maximization / Minimization problem |
protected boolean |
firstSolution
do we want to explore one or all solutions (default=one solution) |
protected int |
nodeLimit
|
protected Var |
objective
The variable modelling the objective function |
protected boolean |
restart
Do we want to restart a new search after each solution |
protected AbstractGlobalSearchSolver |
solver
The object controlling the global search exploration |
protected int |
timeLimit
|
protected IValIterator |
valIterator
Value iterator |
protected IValSelector |
valSelector
Value selector |
protected IVarSelector |
varSelector
Variable selector |
Fields inherited from class choco.AbstractEntity |
---|
hook, problem |
Constructor Summary | |
---|---|
Solver(AbstractProblem pb)
|
Method Summary | |
---|---|
void |
addGoal(AbstractIntBranching branching)
|
protected void |
attachGoal(AbstractIntBranching branching)
|
protected void |
generateGoal(AbstractProblem pb)
|
void |
generateSearchSolver(AbstractProblem pb)
|
IGlobalSearchLimit |
getEncounteredLimit()
If a limit has been encounteres, return the involved limit |
boolean |
getFirstSolution()
|
int |
getNbSolutions()
returns the number of solutions encountered during the search |
java.lang.Number |
getOptimumValue()
|
AbstractGlobalSearchSolver |
getSearchSolver()
|
boolean |
isEncounteredLimit()
Checks if a limit has been encountered |
void |
launch()
commands the solver to start |
void |
setDoMaximize(boolean doMaximize)
a boolean indicating if the solver minize or maximize the objective function |
void |
setFirstSolution(boolean firstSolution)
Sets wether only the first solution must be found |
void |
setNodeLimit(int nodeLimit)
Sets the node limit i.e. the maximal number of nodes explored by the search algorithm |
void |
setObjective(Var objective)
Set the variable to optimize |
void |
setRestart(boolean restart)
set the optimization strategy: - restart or not after each solution found |
void |
setTimeLimit(int timeLimit)
Sets the time limit i.e. the maximal time before stopping the search algorithm |
void |
setValIterator(IValIterator valIterator)
Sets the value iterator the search should use |
void |
setValSelector(IValSelector valSelector)
Sets the value selector the search should use |
void |
setVarSelector(IVarSelector varSelector)
Sets the variable selector the search solver should use. |
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 |
---|
protected Var objective
protected boolean doMaximize
protected boolean restart
protected boolean firstSolution
protected AbstractGlobalSearchSolver solver
protected IVarSelector varSelector
protected IValIterator valIterator
protected IValSelector valSelector
protected int timeLimit
protected int nodeLimit
Constructor Detail |
---|
public Solver(AbstractProblem pb)
Method Detail |
---|
public AbstractGlobalSearchSolver getSearchSolver()
public void generateSearchSolver(AbstractProblem pb)
protected void generateGoal(AbstractProblem pb)
protected void attachGoal(AbstractIntBranching branching)
public void addGoal(AbstractIntBranching branching)
public void launch()
public int getNbSolutions()
public void setTimeLimit(int timeLimit)
public void setNodeLimit(int nodeLimit)
public boolean getFirstSolution()
public void setFirstSolution(boolean firstSolution)
public void setVarSelector(IVarSelector varSelector)
public void setValIterator(IValIterator valIterator)
public void setValSelector(IValSelector valSelector)
public void setRestart(boolean restart)
restart
- public void setDoMaximize(boolean doMaximize)
doMaximize
- public void setObjective(Var objective)
objective
- public java.lang.Number getOptimumValue()
public boolean isEncounteredLimit()
public IGlobalSearchLimit getEncounteredLimit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |