public class DbtPropagation<V extends Variable<V,T>,T extends Value<V,T>> extends MacPropagation<V,T> implements SolverListener<V,T>
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. iConstraints, iIteration| Constructor and Description |
|---|
DbtPropagation(Solver<V,T> solver,
DataProperties properties)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterAssigned(long iteration,
T value)
Propagation takes place every time a value is assigned to a variable.
|
void |
afterUnassigned(long iteration,
T value)
Undo propagation when a value is unassigned.
|
boolean |
neighbourSelected(long iteration,
Neighbour<V,T> neighbour)
A neighbour was selected
|
boolean |
valueSelected(long iteration,
V variable,
T value)
If no value is selected (because of a dead end), make some unassignments.
|
boolean |
variableSelected(long iteration,
V variable)
If no variable is selected (all variables are assinged), unassign the
last assigned variable.
|
addConstraint, beforeAssigned, contains, goodValues, init, isGood, noGood, propagate, propagate, propagate, propagate, setGood, setNoGood, undoPropagatebeforeUnassigned, constraintAdded, constraintRemoved, getModel, getProperties, getSolver, isRegistered, register, unregister, useValueExtra, useVariableExtra, variableAdded, variableRemovedpublic DbtPropagation(Solver<V,T> solver, DataProperties properties)
public void afterAssigned(long iteration, T value)
afterAssigned in interface ModelListener<V extends Variable<V,T>,T extends Value<V,T>>afterAssigned in class MacPropagation<V extends Variable<V,T>,T extends Value<V,T>>iteration - current iterationvalue - value to be assignedMacPropagation.propagate(Variable)public void afterUnassigned(long iteration, T value)
afterUnassigned in interface ModelListener<V extends Variable<V,T>,T extends Value<V,T>>afterUnassigned in class MacPropagation<V extends Variable<V,T>,T extends Value<V,T>>iteration - current iterationvalue - value to be unassignedMacPropagation.undoPropagate(Variable)public boolean variableSelected(long iteration, V variable)
DbtVariableSelection):
variableSelected in interface SolverListener<V extends Variable<V,T>,T extends Value<V,T>>iteration - current iterationvariable - selected variableDbtVariableSelection.selectVariable(Solution)public boolean valueSelected(long iteration, V variable, T value)
DbtValueSelection),
valueSelected in interface SolverListener<V extends Variable<V,T>,T extends Value<V,T>>iteration - current iterationvariable - selected variablevalue - selected variableDbtVariableSelection.selectVariable(Solution)public boolean neighbourSelected(long iteration, Neighbour<V,T> neighbour)
SolverListenerneighbourSelected in interface SolverListener<V extends Variable<V,T>,T extends Value<V,T>>iteration - current iterationneighbour - neighbour