jopt.js
Class JsSolver

java.lang.Object
  extended byjopt.csp.CspSolver
      extended byjopt.csp.spi.SolverImpl
          extended byjopt.js.JsSolver

public abstract class JsSolver
extends jopt.csp.spi.SolverImpl

Class that is used to construct and solve JS problems. The JSSolver is built on top of the CspSolver. The solver can be based on various different CSP algorithms and searching techniques, but it also has default algorithms if the user does not wish to override these options.

Author:
James Boerkoel

Constructor Summary
JsSolver()
           
 
Method Summary
static JsSolver createJsSolver()
          Creates a new solver based upon a default generalized AC5 bounds algorithm with a default search manager
static JsSolver createSolver(JsAlgorithm alg)
          Creates a new solver based upon a specific algorithm with the default search manager
static JsSolver createSolver(JsAlgorithm alg, jopt.csp.search.SearchManager mgr)
          Creates a new solver based upon a given CSP algorithm and search manager
abstract  JsLocalSearch getJsLocalSearch()
          Returns a LocalSearch object that is used to create common objects for use during local neighborhood search operations
abstract  JsSearchActions getJsSearchActions()
          Returns a SearchActions object that is used to create common search operations
abstract  JsSearchGoals getJsSearchGoals()
          Returns a SearchGoals object that is will create common goals for guiding searches
abstract  JsSearchTechniques getJsSearchTechniques()
          Returns a SearchTechniques object that is used to create common techniques for guiding searches such as Breadth First Searching and Depth First Searching
abstract  JsVariableFactory getJsVarFactory()
          Returns the variable factory for the algorithm the solver is based upon
abstract  void problemBuilt()
          This is called once the problem is in a state where any subsequent changes are backtrackable.
 
Methods inherited from class jopt.csp.spi.SolverImpl
addConstraint, addConstraint, addConstraint, addConstraint, addVariable, clear, createDefaultAlgorithm, getAutoPropagate, nextSolution, propagate, reset, restoreNeighboringSolution, restoreSolution, setAutoPropagate, solve, solve, storeSolution
 
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
 

Constructor Detail

JsSolver

public JsSolver()
Method Detail

createJsSolver

public static JsSolver createJsSolver()
Creates a new solver based upon a default generalized AC5 bounds algorithm with a default search manager

Returns:
an instance of an implementation of the JsSolver

createSolver

public static JsSolver createSolver(JsAlgorithm alg,
                                    jopt.csp.search.SearchManager mgr)
Creates a new solver based upon a given CSP algorithm and search manager

Parameters:
alg - Algorithm solver is based upon
mgr - Search manager that will be used to locate solutions by solver
Returns:
an instance of an implementation of the JsSolver

problemBuilt

public abstract void problemBuilt()
This is called once the problem is in a state where any subsequent changes are backtrackable.


createSolver

public static JsSolver createSolver(JsAlgorithm alg)
Creates a new solver based upon a specific algorithm with the default search manager

Parameters:
alg - Algorithm solver is based upon

getJsVarFactory

public abstract JsVariableFactory getJsVarFactory()
Returns the variable factory for the algorithm the solver is based upon

Returns:
JsVariableFactory for the algorithm the solver is based upon

getJsSearchActions

public abstract JsSearchActions getJsSearchActions()
Returns a SearchActions object that is used to create common search operations

Returns:
JsSearchActions that is used to create common search operations

getJsSearchGoals

public abstract JsSearchGoals getJsSearchGoals()
Returns a SearchGoals object that is will create common goals for guiding searches

Returns:
JsSearchGoals that is will create common goals for guiding searches

getJsSearchTechniques

public abstract JsSearchTechniques getJsSearchTechniques()
Returns a SearchTechniques object that is used to create common techniques for guiding searches such as Breadth First Searching and Depth First Searching

Returns:
JsSearchTechniques that is used to create common techniques for guiding searches

getJsLocalSearch

public abstract JsLocalSearch getJsLocalSearch()
Returns a LocalSearch object that is used to create common objects for use during local neighborhood search operations

Returns:
JsLocalSearch is used to create common objects for use during local neighborhood search operations