|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchoco.AbstractModel
choco.AbstractProblem
choco.palm.JumpProblem
choco.palm.PalmProblem
public class PalmProblem
Choco problem extension involving explanations and explanation-based algorithms (mac-dbt, decision-repair...)
| Field Summary |
|---|
| Fields inherited from class choco.palm.JumpProblem |
|---|
contradictionExplanation, displayRelease, erasedCst, indexOfLastInitializedStaticConstraint, logger, maxRelaxLevel |
| Fields inherited from class choco.AbstractProblem |
|---|
environment, feasible, precision, propagationEngine, reduction, solved, solver |
| Fields inherited from class choco.AbstractModel |
|---|
constraints, doMaximize, FALSE, floatVars, intVars, nbConstraint, objective, setVars, TRUE |
| Constructor Summary | |
|---|---|
PalmProblem()
Creates a Palm Problem with the specified environment. |
|
| Method Summary | |
|---|---|
boolean |
checkSolution()
Checks if current solution is still valid. |
protected IntDomainVar |
createIntVar(java.lang.String name,
int[] sortedValues)
|
protected IntDomainVar |
createIntVar(java.lang.String name,
int domainType,
int min,
int max)
|
protected RealVar |
createRealVal(java.lang.String name,
double min,
double max)
|
void |
explainedFail(Explanation exp)
throws a contradiction with the corresponding explanation |
int |
getMaxRelaxLevel()
Returns the maximum level the solver can relax without user interaction. |
ExplainedConstraintPlugin |
makeConstraintPlugin(AbstractConstraint ct)
Factory to create a constraint plugin |
Explanation |
makeExplanation()
Factory to create explanation. |
java.lang.Boolean |
maximize(Var objective,
boolean restart)
Maximize an objective variable with a PalmBranchAndBound |
java.lang.Boolean |
minimize(Var objective,
boolean restart)
Minimize an objective variable with a PalmBranchAndBound |
java.lang.Boolean |
nextSolution()
Tries to find another solution. |
void |
post(Constraint constraint)
Posts a constraints in the problem. |
void |
post(Constraint constraint,
int w)
Posts a constraint with the specified weight. |
void |
post(Constraint constraint,
PalmExplanation expl)
Posts an indirect constraint with an explain. |
void |
postCut(Constraint constraint)
Posts a cut constraint in the problem. |
void |
propagateAllDecisionsConstraints(java.util.List constraints)
Posts and propagates several decision constraints (that is decisions taken by the solver). |
static void |
ReleasePalmDisplay()
Displays release information (date, verions, ...). |
void |
remove(Propagator constraint)
Removes properly a constraint from the problem: the constraint is deactivated and all the depending filtering decisions are undone. |
void |
repair()
Tries to repair the problem after a PalmContradiction thanks to removing a responsible constraint (that is a constraint in the explain of the contradiction). |
java.lang.Boolean |
searchOneSolution()
Deprecated. |
void |
setMaxRelaxLevel(int maxRelaxLevel)
Sets the maximum level the solver can relax without user interaction (default value is 0, that is only decision constraints). |
java.lang.Boolean |
solve()
Tries to search the first solution of the problem. |
java.lang.Boolean |
solve(boolean allSolutions)
Deprecated. |
java.lang.Boolean |
solveAll()
Tries to find all solutions of the problem. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface choco.palm.ExplainedProblem |
|---|
getConstraintNb, setContradictionExplanation |
| Constructor Detail |
|---|
public PalmProblem()
| Method Detail |
|---|
public static final void ReleasePalmDisplay()
public Explanation makeExplanation()
makeExplanation in interface ExplainedProblemmakeExplanation in class JumpProblempublic ExplainedConstraintPlugin makeConstraintPlugin(AbstractConstraint ct)
ExplainedProblem
makeConstraintPlugin in interface ExplainedProblemmakeConstraintPlugin in class JumpProblem
public void explainedFail(Explanation exp)
throws ContradictionException
ExplainedProblem
explainedFail in interface ExplainedProblemexplainedFail in class JumpProblemContradictionExceptionpublic java.lang.Boolean searchOneSolution()
public java.lang.Boolean solve(boolean allSolutions)
solve in class JumpProblemallSolutions - If true, all the solutions are searched.public java.lang.Boolean solve()
solve in class AbstractProblempublic java.lang.Boolean nextSolution()
nextSolution in class AbstractProblempublic boolean checkSolution()
public java.lang.Boolean solveAll()
solveAll in class AbstractProblem
public java.lang.Boolean maximize(Var objective,
boolean restart)
maximize in class AbstractProblemobjective - The variable modelling the optimization criterionrestart - If true, then a new search is restarted from scratch
after each solution is found;
otherwise a single branch-and-bound search is performed
public java.lang.Boolean minimize(Var objective,
boolean restart)
minimize in class AbstractProblemobjective - The variable modelling the optimization criterionrestart - If true, then a new search is restarted from scratch
after each solution is found;
otherwise a single branch-and-bound search is performedpublic void post(Constraint constraint)
post in class JumpProblemconstraint - The constraint to post.public void postCut(Constraint constraint)
JumpProblem
postCut in class JumpProblemconstraint - The constraint to post.
public void post(Constraint constraint,
int w)
constraint - The constraint to post.w - The weight associated to the constraint.
public void post(Constraint constraint,
PalmExplanation expl)
constraint - The constraint to post.expl - The set of constraint this posted constraint depends on.
public void propagateAllDecisionsConstraints(java.util.List constraints)
throws ContradictionException
constraints - The constraints to post.
ContradictionException
public void repair()
throws ContradictionException
ContradictionExceptionpublic void remove(Propagator constraint)
constraint - The constraint to remove.public int getMaxRelaxLevel()
public void setMaxRelaxLevel(int maxRelaxLevel)
maxRelaxLevel - the new level
protected RealVar createRealVal(java.lang.String name,
double min,
double max)
createRealVal in class JumpProblem
protected IntDomainVar createIntVar(java.lang.String name,
int domainType,
int min,
int max)
createIntVar in class JumpProblem
protected IntDomainVar createIntVar(java.lang.String name,
int[] sortedValues)
createIntVar in class JumpProblem
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||