V
- VariableT
- Valuepublic class ViolatedInitials<V extends Variable<V,T>,T extends Value<V,T>> extends Extension<V,T>
Constraint.isConsistent(Value, Value)
to find out what
initial values (of different variables) cannot be assigned when an arbitrary
value is assigned to a variable. This information is computed in advance,
before the solver is executed. It is used for better estimation of
perturbation penalty (see
PerturbationsCounter
) when a value
is to be assigned to a variable.Constructor and Description |
---|
ViolatedInitials(Solver<V,T> solver,
DataProperties properties) |
Modifier and Type | Method and Description |
---|---|
Set<T> |
getViolatedInitials(T value)
Initial values that cannot be assigned when the given value is assigned
|
boolean |
init(Assignment<V,T> assignment)
Compute the violations between any value and all other initial values
|
afterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, constraintAdded, constraintRemoved, getModel, getProperties, getSolver, init, isRegistered, register, unregister, variableAdded, variableRemoved
public ViolatedInitials(Solver<V,T> solver, DataProperties properties)
public boolean init(Assignment<V,T> assignment)
assignment
- current assignmentpublic Set<T> getViolatedInitials(T value)
value
- given value