public interface ModelListener<V extends Variable<V,T>,T extends Value<V,T>>
Model
Modifier and Type | Method and Description |
---|---|
void |
afterAssigned(long iteration,
T value)
Called after a value is assigned to its variable (
Value.variable() ). |
void |
afterUnassigned(long iteration,
T value)
Called after a value is unassigned from its variable (
Value.variable() ). |
void |
beforeAssigned(long iteration,
T value)
Called before a value is assigned to its variable (
Value.variable() ). |
void |
beforeUnassigned(long iteration,
T value)
Called before a value is unassigned from its variable (
Value.variable() ). |
void |
constraintAdded(Constraint<V,T> constraint)
Constraint is added to the model
|
void |
constraintRemoved(Constraint<V,T> constraint)
Constraint is removed from the model
|
boolean |
init(Solver<V,T> solver)
Notification that the model was initialized by the solver.
|
void |
variableAdded(V variable)
Variable is added to the model
|
void |
variableRemoved(V variable)
Variable is removed from the model
|
void variableAdded(V variable)
variable
- added variablevoid variableRemoved(V variable)
variable
- removed variablevoid constraintAdded(Constraint<V,T> constraint)
constraint
- added constraintvoid constraintRemoved(Constraint<V,T> constraint)
constraint
- removed constraintvoid beforeAssigned(long iteration, T value)
Value.variable()
).iteration
- current iterationvalue
- value to be assignedvoid beforeUnassigned(long iteration, T value)
Value.variable()
).iteration
- current iterationvalue
- value to be unassignedvoid afterAssigned(long iteration, T value)
Value.variable()
).iteration
- current iterationvalue
- value to be assignedvoid afterUnassigned(long iteration, T value)
Value.variable()
).iteration
- current iterationvalue
- value to be unassigned