V
- VariableT
- Valuepublic interface Criterion<V extends Variable<V,T>,T extends Value<V,T>> extends ModelListener<V,T>, ExtendedInfoProvider<V,T>
Modifier and Type | Method and Description |
---|---|
void |
bestRestored(Assignment<V,T> assignment)
Notification that the current solution has been restored from the best.
|
void |
bestSaved(Assignment<V,T> assignment)
Notification that the current solution has been saved to the best.
|
void |
configure(DataProperties properties)
Configure the criterion if needed
|
double |
getBest()
Best value (value of the criterion in the best solution)
|
double[] |
getBounds()
Deprecated.
|
double[] |
getBounds(Assignment<V,T> assignment)
Bounds (minimum and maximum) estimate for the value
|
double[] |
getBounds(Assignment<V,T> assignment,
Collection<V> variables)
Value bounds (minimum and maximum) of the criterion on a part of the problem
|
double[] |
getBounds(Collection<V> variables)
Deprecated.
|
String |
getName()
Criterion name
|
double |
getValue(Assignment<V,T> assignment)
Current value of the criterion (optimization objective)
|
double |
getValue(Assignment<V,T> assignment,
Collection<V> variables)
Value of a part of the problem (given by the collection of variables)
|
double |
getValue(Assignment<V,T> assignment,
T value,
Set<T> conflicts)
Value of a proposed assignment (including hard conflicts)
|
double |
getValue(Collection<V> variables)
Deprecated.
|
double |
getValue(T value,
Set<T> conflicts)
Deprecated.
|
double |
getWeight()
Weight of the criterion
|
double |
getWeightedBest()
Weighted best value of the objective (value in the best solution).
|
double |
getWeightedValue()
Deprecated.
|
double |
getWeightedValue(Assignment<V,T> assignment)
Weighted value of the objectives
|
double |
getWeightedValue(Assignment<V,T> assignment,
Collection<V> variables)
Weighted value of a part of the problem (given by the collection of variables)
|
double |
getWeightedValue(Assignment<V,T> assignment,
T value,
Set<T> conflicts)
Weighted value of a proposed assignment (including hard conflicts)
|
double |
getWeightedValue(Collection<V> variables)
Deprecated.
|
double |
getWeightedValue(T value,
Set<T> conflicts)
Deprecated.
|
void |
inc(Assignment<V,T> assignment,
double value)
Outside update of the criterion (usefull when the criterion is driven by a set of constraints).
|
void |
inc(double value)
Deprecated.
|
void |
setModel(Model<V,T> model)
called when the criterion is added to a model
|
String |
toString(Assignment<V,T> assignment)
Simple text representation of the criterion and its value.
|
afterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, constraintAdded, constraintRemoved, init, variableAdded, variableRemoved
getExtendedInfo
getInfo, getInfo
void setModel(Model<V,T> model)
model
- problem modeldouble getValue(Assignment<V,T> assignment)
assignment
- current assignment@Deprecated double getWeightedValue()
getWeightedValue(Assignment)
instead.double getWeightedValue(Assignment<V,T> assignment)
assignment
- current assignment@Deprecated double[] getBounds()
getBounds(Assignment)
instead.double[] getBounds(Assignment<V,T> assignment)
assignment
- current assignmentdouble getWeightedBest()
double getBest()
double getWeight()
@Deprecated double getWeightedValue(T value, Set<T> conflicts)
getWeightedValue(Assignment, Value, Set)
instead.value
- given valueconflicts
- values conflicting with the given valuedouble getWeightedValue(Assignment<V,T> assignment, T value, Set<T> conflicts)
assignment
- current assignmentvalue
- given valueconflicts
- values conflicting with the given value@Deprecated double getValue(T value, Set<T> conflicts)
getValue(Assignment, Value, Set)
instead.value
- given valueconflicts
- values conflicting with the given valuedouble getValue(Assignment<V,T> assignment, T value, Set<T> conflicts)
assignment
- current assignmentvalue
- given valueconflicts
- values conflicting with the given value@Deprecated double getWeightedValue(Collection<V> variables)
getWeightedValue(Assignment, Collection)
instead.variables
- list of problem variablesdouble getWeightedValue(Assignment<V,T> assignment, Collection<V> variables)
assignment
- current assignmentvariables
- list of problem variables@Deprecated double getValue(Collection<V> variables)
getValue(Assignment, Collection)
instead.variables
- list of problem variablesdouble getValue(Assignment<V,T> assignment, Collection<V> variables)
assignment
- current assignmentvariables
- list of problem variables@Deprecated double[] getBounds(Collection<V> variables)
getBounds(Assignment, Collection)
instead.variables
- list of problem variablesdouble[] getBounds(Assignment<V,T> assignment, Collection<V> variables)
assignment
- current assignmentvariables
- list of problem variables@Deprecated void inc(double value)
inc(Assignment, double)
instead.value
- increment criterion by this valuevoid inc(Assignment<V,T> assignment, double value)
assignment
- current assignmentvalue
- increment criterion by this valuevoid bestSaved(Assignment<V,T> assignment)
assignment
- current assignmentvoid bestRestored(Assignment<V,T> assignment)
assignment
- current assignmentString toString(Assignment<V,T> assignment)
AbstractCriterion.getAbbreviation()
and x is the current value AbstractCriterion.getValue(Assignment)
.assignment
- current assignmentvoid configure(DataProperties properties)
properties
- configuration