|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.extension.Extension net.sf.cpsolver.ifs.extension.MacPropagation net.sf.cpsolver.ifs.dbt.DbtPropagation
public class DbtPropagation
Maintenance of arc consistency in dynamic backtracking.
The difference between MacPropagation
and this DBT propagation is that all not-assigned values
of an assigned variable are marked as nogood. Also, when a dead end is reached, unassignment or failure
takes place.
This IFS solver extension is to be used only in case of dynamic backtracking and it has no parameters.
Field Summary |
---|
Fields inherited from class net.sf.cpsolver.ifs.extension.MacPropagation |
---|
iConstraints, iIteration |
Constructor Summary | |
---|---|
DbtPropagation(Solver solver,
DataProperties properties)
Constructor. |
Method Summary | |
---|---|
void |
afterAssigned(long iteration,
Value value)
Propagation takes place every time a value is assigned to a variable. |
void |
afterUnassigned(long iteration,
Value value)
Undo propagation when a value is unassigned. |
boolean |
neighbourSelected(long iteration,
Neighbour neighbour)
A neighbour was selected |
boolean |
valueSelected(long iteration,
Variable variable,
Value value)
If no value is selected (because of a dead end), make some unassignments. |
boolean |
variableSelected(long iteration,
Variable variable)
If no variable is selected (all variables are assinged), unassign the last assigned variable. |
Methods inherited from class net.sf.cpsolver.ifs.extension.MacPropagation |
---|
addConstraint, beforeAssigned, contains, goodValues, init, isGood, noGood, propagate, propagate, propagate, propagate, setGood, setNoGood, undoPropagate |
Methods inherited from class net.sf.cpsolver.ifs.extension.Extension |
---|
beforeUnassigned, constraintAdded, constraintRemoved, getModel, getProperties, getSolver, isRegistered, register, unregister, useValueExtra, useVariableExtra, variableAdded, variableRemoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DbtPropagation(Solver solver, DataProperties properties)
Method Detail |
---|
public void afterAssigned(long iteration, Value value)
afterAssigned
in interface ModelListener
afterAssigned
in class MacPropagation
iteration
- current iterationvalue
- value to be assignedMacPropagation.propagate(Variable)
public void afterUnassigned(long iteration, Value value)
afterUnassigned
in interface ModelListener
afterUnassigned
in class MacPropagation
iteration
- current iterationvalue
- value to be unassignedMacPropagation.undoPropagate(Variable)
public boolean variableSelected(long iteration, Variable variable)
DbtVariableSelection
):
variableSelected
in interface SolverListener
iteration
- current iterationvariable
- selected variableDbtVariableSelection.selectVariable(Solution)
public boolean valueSelected(long iteration, Variable variable, Value value)
DbtValueSelection
),
valueSelected
in interface SolverListener
iteration
- current iterationvariable
- selected variablevalue
- selected variableDbtVariableSelection.selectVariable(Solution)
public boolean neighbourSelected(long iteration, Neighbour neighbour)
SolverListener
neighbourSelected
in interface SolverListener
iteration
- current iterationneighbour
- neighbour
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |