|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.constraints.impl.search.AbstractSolver
javax.constraints.impl.search.goal.SolverWithGoals
public abstract class SolverWithGoals
| Constructor Summary | |
|---|---|
SolverWithGoals(Problem problem)
|
|
| Method Summary | |
|---|---|
abstract Goal |
and(Goal g1,
Goal g2)
Returns an "AND" Goal. |
boolean |
applySolution(Solution solution)
This method tries to resolve the problem by applying the Solution "solution" to the problem, and returns true if "solution" satisfies all of the posted constraints, false otherwise. |
abstract void |
backtrack()
This method forces a solver to "backtrack". |
Goal |
combineSearchStrategies()
|
boolean |
execute(Goal goal)
This methods is equivalent to execute(goal,ProblemState.DO_NOT_RESTORE); |
abstract boolean |
execute(Goal goal,
ProblemState restoreOrNot)
|
Solution[] |
findAllSolutions()
This method attempts to find all solutions for the Problem. |
Solution |
findOptimalSolutionDichotomize(Objective objective,
Var objectiveVar)
The actual minimization algorithm executes a dichotomized search. |
Solution |
findSolution(ProblemState restoreOrNot)
This method attempts to find a solution of the problem, for which the solver was defined. |
abstract java.lang.Object |
goalThis(Goal goal)
To create a new goal on the javax.constraints level without necessity to go down to the underlying CP solver, one needs to use a goal that will serve as an implementation object. |
Goal |
goalVarEqValue(Var var,
int value)
|
Goal |
goalVarGeValue(Var var,
int value)
|
Goal |
goalVarLeValue(Var var,
int value)
|
Goal |
goalVarNeqValue(Var var,
int value)
|
Goal |
makeGoal(SearchStrategy strategy)
|
SearchStrategy |
newSearchStrategy()
This methods returns a new default search strategy |
abstract Goal |
or(Goal g1,
Goal g2)
Returns an "OR" Goal. |
void |
trace(Var var)
This method forces to trace (to log) all modification events for the variable "var". |
void |
trace(Var[] vars)
This method forces to trace (to log) all modification events for all variables "vars" |
void |
trace(Var[] vars,
PropagationEvent event)
This method forces solver to trace (to log) the modification "event" for all variables "var". |
void |
trace(Var var,
PropagationEvent event)
This method forces to trace (to log) the modification "event" for the variable "var". |
void |
trace(VarSet setVar)
This method forces to trace (to log) all modification events for the variable "setVar". |
void |
trace(VarSet setVar,
PropagationEvent event)
This method forces to trace (to log) the modification "event" for the variable "setVar". |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SolverWithGoals(Problem problem)
| Method Detail |
|---|
public abstract Goal and(Goal g1,
Goal g2)
g1 - the first Goal which is part of the new "AND" Goal.g2 - the other Goal which is part of the new "AND" Goal.
public boolean applySolution(Solution solution)
applySolution in class AbstractSolversolution - the Solution object being tested on the problem.
public abstract void backtrack()
throws java.lang.Exception
java.lang.Exceptionpublic Goal combineSearchStrategies()
public boolean execute(Goal goal)
goal -
public abstract boolean execute(Goal goal,
ProblemState restoreOrNot)
public Solution[] findAllSolutions()
findAllSolutions in interface SolverfindAllSolutions in class AbstractSolver
public Solution findOptimalSolutionDichotomize(Objective objective,
Var objectiveVar)
findOptimalSolutionDichotomize in class AbstractSolverpublic Solution findSolution(ProblemState restoreOrNot)
findSolution in interface SolverfindSolution in class AbstractSolverrestoreOrNot - defines if the problem state should be restored after a solution is found
public abstract java.lang.Object goalThis(Goal goal)
goal -
public Goal goalVarEqValue(Var var,
int value)
public Goal goalVarGeValue(Var var,
int value)
public Goal goalVarLeValue(Var var,
int value)
public Goal goalVarNeqValue(Var var,
int value)
public Goal makeGoal(SearchStrategy strategy)
public SearchStrategy newSearchStrategy()
newSearchStrategy in interface SolvernewSearchStrategy in class AbstractSolver
public abstract Goal or(Goal g1,
Goal g2)
g1 - the first Goal which is part of the new "OR" Goal.g2 - the second Goal which is part of the new "OR" Goal.
public void trace(Var var)
Problem
var - public void trace(Var[] vars)
vars -
public void trace(Var[] vars,
PropagationEvent event)
Problem
vars - event -
public void trace(Var var,
PropagationEvent event)
Problem
var - public void trace(VarSet setVar)
setVar -
public void trace(VarSet setVar,
PropagationEvent event)
Problem
setVar - event -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||