|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.ifs.extension.Extension<V,T>
net.sf.cpsolver.ifs.extension.MacPropagation<V,T>
net.sf.cpsolver.ifs.dbt.DbtPropagation<V,T>
public class DbtPropagation<V extends Variable<V,T>,T extends Value<V,T>>
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<V,T> solver,
DataProperties properties)
Constructor. |
Method Summary | |
---|---|
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. |
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<V,T> solver, DataProperties properties)
Method Detail |
---|
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)
SolverListener
neighbourSelected
in interface SolverListener<V extends Variable<V,T>,T extends Value<V,T>>
iteration
- current iterationneighbour
- neighbour
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |