jopt.csp.spi
Class SolverImpl
java.lang.Object
jopt.csp.CspSolver
jopt.csp.spi.SolverImpl
- public class SolverImpl
- extends jopt.csp.CspSolver
Class that is used to construct and solve CSP problems. The solver can
be based on various different CSP algorithms and searching techniques, but
has default algorithms if the user does not wish to override these options.
- Author:
- Nick Coleman
Methods inherited from class jopt.csp.CspSolver |
createSolver, createSolver, createSolver, createSolver, getLocalSearch, getSearchActions, getSearchGoals, getSearchLimits, getSearchTechniques, getVarFactory, restoreSolution, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, solve, storeSolution |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SolverImpl
public SolverImpl()
createDefaultAlgorithm
public static ChoicePointAlgorithm createDefaultAlgorithm()
- Creates a default AC5 algorithm used when a new solver
is created (initiated) without specifying an algorithm.
getAutoPropagate
public boolean getAutoPropagate()
setAutoPropagate
public void setAutoPropagate(boolean autoPropagate)
propagate
public boolean propagate()
addVariable
public void addVariable(jopt.csp.variable.CspVariable var)
addConstraint
public void addConstraint(jopt.csp.variable.CspConstraint constraint)
throws jopt.csp.variable.PropagationFailureException
- Throws:
jopt.csp.variable.PropagationFailureException
addConstraint
public void addConstraint(jopt.csp.variable.CspConstraint constraint,
boolean keepAfterReset)
throws jopt.csp.variable.PropagationFailureException
- Throws:
jopt.csp.variable.PropagationFailureException
addConstraint
public void addConstraint(jopt.csp.variable.CspBooleanExpr bool)
throws jopt.csp.variable.PropagationFailureException
- Throws:
jopt.csp.variable.PropagationFailureException
addConstraint
public void addConstraint(jopt.csp.variable.CspGenericBooleanExpr bool)
throws jopt.csp.variable.PropagationFailureException
- Throws:
jopt.csp.variable.PropagationFailureException
clear
public void clear()
reset
public void reset()
solve
public boolean solve(jopt.csp.search.Search search,
boolean reset)
solve
public boolean solve(jopt.csp.search.SearchAction action,
jopt.csp.search.SearchGoal goal,
jopt.csp.search.SearchTechnique technique,
boolean continuallyImprove,
boolean reset)
nextSolution
public boolean nextSolution()
storeSolution
public void storeSolution(jopt.csp.solution.SolverSolution solution)
restoreSolution
public void restoreSolution(jopt.csp.solution.SolverSolution solution)
throws jopt.csp.variable.PropagationFailureException
- Throws:
jopt.csp.variable.PropagationFailureException
restoreNeighboringSolution
public void restoreNeighboringSolution(jopt.csp.solution.SolverSolution initial,
jopt.csp.solution.SolverSolution neighbor)
throws jopt.csp.variable.PropagationFailureException
- Throws:
jopt.csp.variable.PropagationFailureException