org.cpsolver.ifs.criteria

## Class AbstractCriterion<V extends Variable<V,T>,T extends Value<V,T>>

- java.lang.Object
- - org.cpsolver.ifs.criteria.AbstractCriterion<V,T>

- Type Parameters:
    `V` - Variable
    `T` - Value
  All Implemented Interfaces:
    CanHoldContext, HasAssignmentContext<V,T,AbstractCriterion.ValueContext>, Criterion<V,T>, ExtendedInfoProvider<V,T>, InfoProvider<V,T>, ModelListener<V,T>
  Direct Known Subclasses:
    AssignedValue, ExamCriterion, InstructorSchedulingCriterion, TimetablingCriterion

      public abstract class AbstractCriterion<V extends Variable<V,T>,T extends Value<V,T>>
      extends Object
      implements Criterion<V,T>, HasAssignmentContext<V,T,AbstractCriterion.ValueContext>, CanHoldContext

  Abstract Criterion.
  An optimization objective can be split into several (optimization) criteria and modeled as a weighted sum of these. This makes the implementation of a particular problem more versatile as it allows for an easier modification of the optimization objective.
  This class implements most of the `Criterion` except of the `Criterion.getValue(Assignment, Value, Set)`.
  Version:
    IFS 1.3 (Iterative Forward Search)
    Copyright (C) 2006 - 2014 Tomáš Müller
    muller@unitime.org
    http://muller.unitime.org
    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.
  Author:
    Tomáš Müller

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AbstractCriterion.ValueContext` Assignment context holding current value and the cached bounds.
    `protected static class` | `AbstractCriterion.ValueUpdateType` Defines how the overall value of the criterion should be automatically updated (using `Criterion.getValue(Value, Set)`).

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected double` | `iBest`
    `protected boolean` | `iDebug`
    `protected double` | `iWeight`
    `protected static DecimalFormat` | `sDoubleFormat`
    `protected static DecimalFormat` | `sPercentFormat`

    - ### Fields inherited from interface org.cpsolver.ifs.assignment.context.CanHoldContext

      `sMaxSize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractCriterion()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterAssigned(Assignment<V,T> assignment, long iteration, T value)` Called after a value is assigned to its variable ( `Value.variable()`).
    `void` | `afterUnassigned(Assignment<V,T> assignment, long iteration, T value)` Called after a value is unassigned from its variable ( `Value.variable()`).
    `void` | `beforeAssigned(Assignment<V,T> assignment, long iteration, T value)` Called before a value is assigned to its variable ( `Value.variable()`).
    `void` | `beforeUnassigned(Assignment<V,T> assignment, long iteration, T value)` Called before a value is unassigned from its variable ( `Value.variable()`).
    `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.
    `protected void` | `clearCache()` Clear bounds cache
    `protected double[]` | `computeBounds(Assignment<V,T> assignment)` Compute bounds (bounds are being cached by default).
    `void` | `configure(DataProperties properties)` Configure the criterion if needed
    `void` | `constraintAdded(Constraint<V,T> constraint)` Constraint is added to the model
    `void` | `constraintRemoved(Constraint<V,T> constraint)` Constraint is removed from the model
    `AbstractCriterion.ValueContext` | `createAssignmentContext(Assignment<V,T> assignment)` Create a new assignment context for the given assignment.
    `String` | `getAbbreviation()` Abbreviated name of the criterion for `Object.toString()`.
    `AssignmentContextReference<V,T,AbstractCriterion.ValueContext>` | `getAssignmentContextReference()` Returns an assignment context reference
    `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.
    `AssignmentContext[]` | `getContext()` An array of `CanHoldContext.sMaxSize` assignment contexts
    `AbstractCriterion.ValueContext` | `getContext(Assignment<V,T> assignment)` Returns an assignment context associated with this criterion.
    `void` | `getExtendedInfo(Assignment<V,T> assignment, Map<String,String> info)` Extended information about current solution.
    `void` | `getInfo(Assignment<V,T> assignment, Map<String,String> info)` Adds some information into the table with information about the solution
    `void` | `getInfo(Assignment<V,T> assignment, Map<String,String> info, Collection<V> variables)` Adds some information into the table with information about the solution, only consider variables from the given set
    `Model<V,T>` | `getModel()` Returns current model
    `String` | `getName()` Criterion name
    `protected String` | `getPerc(double value, double min, double max)`
    `String` | `getPercentage(Assignment<V,T> assignment)` Return formatted value of this criterion, as percentage when possible
    `protected String` | `getPercRev(double value, double min, double max)`
    `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(Collection<V> variables)` Deprecated.
    `double` | `getValue(T value, Set<T> conflicts)` Deprecated.
    `AbstractCriterion.ValueUpdateType` | `getValueUpdateType()`
    `double` | `getWeight()` Weight of the criterion
    `double` | `getWeightDefault(DataProperties config)` Defines default weight (when `getWeightName()` parameter is not present in 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.
    `String` | `getWeightName()` Defines weight name (to be used to get the criterion weight from the configuration).
    `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.
    `boolean` | `init(Solver<V,T> solver)` Notification that the model was initialized by the solver.
    `void` | `setAssignmentContextReference(AssignmentContextReference<V,T,AbstractCriterion.ValueContext> reference)` Store an assignment context reference that was given for the class by the `Model.createReference(HasAssignmentContext)`.
    `void` | `setModel(Model<V,T> model)` called when the criterion is added to a model
    `void` | `setValueUpdateType(AbstractCriterion.ValueUpdateType iValueUpdateType)`
    `String` | `toString(Assignment<V,T> assignment)` Simple text representation of the criterion and its value.
    `void` | `variableAdded(V variable)` Variable is added to the model
    `void` | `variableRemoved(V variable)` Variable is removed from the model

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.cpsolver.ifs.criteria.Criterion

      `getValue`

- - ### Field Detail

    - #### iBest

          protected double iBest

    - #### iWeight

          protected double iWeight

    - #### sDoubleFormat

          protected static DecimalFormat sDoubleFormat

    - #### sPercentFormat

          protected static DecimalFormat sPercentFormat

    - #### iDebug

          protected boolean iDebug

  - ### Constructor Detail

    - #### AbstractCriterion

          public AbstractCriterion()

  - ### Method Detail

    - #### getWeightName

          public String getWeightName()

      Defines weight name (to be used to get the criterion weight from the configuration).
      Returns:
        name of the weight associated with this criterion

    - #### getWeightDefault

          public double getWeightDefault(DataProperties config)

      Defines default weight (when `getWeightName()` parameter is not present in the criterion).
      Parameters:
        `config` - solver configuration
      Returns:
        default criterion weight value

    - #### setModel

          public void setModel(Model<V,T> model)

      Description copied from interface: `Criterion`
      called when the criterion is added to a model
      Specified by:
        `setModel` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `model` - problem model

    - #### configure

          public void configure(DataProperties properties)

      Description copied from interface: `Criterion`
      Configure the criterion if needed
      Specified by:
        `configure` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `properties` - configuration

    - #### init

          public boolean init(Solver<V,T> solver)

      Description copied from interface: `ModelListener`
      Notification that the model was initialized by the solver.
      Specified by:
        `init` in interface `ModelListener<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `solver` - IFS solver
      Returns:
        true if successfully initialized

    - #### getModel

          public Model<V,T> getModel()

      Returns current model
      Returns:
        problem model

    - #### getContext

          public AbstractCriterion.ValueContext getContext(Assignment<V,T> assignment)

      Returns an assignment context associated with this criterion. If there is no assignment context associated with this criterion yet, one is created using the `HasAssignmentContext.createAssignmentContext(Assignment)` method. From that time on, this context is kept with the assignment and automatically updated by calling the `AssignmentConstraintContext.assigned(Assignment, Value)` and `AssignmentConstraintContext.unassigned(Assignment, Value)` whenever a variable is changed as given by the `AbstractCriterion.ValueUpdateType`.
      Specified by:
        `getContext` in interface `HasAssignmentContext<V extends Variable<V,T>,T extends Value<V,T>,AbstractCriterion.ValueContext>`
      Parameters:
        `assignment` - given assignment
      Returns:
        assignment context associated with this constraint and the given assignment

    - #### createAssignmentContext

          public AbstractCriterion.ValueContext createAssignmentContext(Assignment<V,T> assignment)

      Description copied from interface: `HasAssignmentContext`
      Create a new assignment context for the given assignment. If there are already some variables assigned in the value, the method should make sure that the context is appropriately initialized.
      Specified by:
        `createAssignmentContext` in interface `HasAssignmentContext<V extends Variable<V,T>,T extends Value<V,T>,AbstractCriterion.ValueContext>`
      Parameters:
        `assignment` - an assignment for which there needs to be an assignment context
      Returns:
        a new instance of the assignment context, filled according to the given assignment

    - #### getAssignmentContextReference

          public AssignmentContextReference<V,T,AbstractCriterion.ValueContext> getAssignmentContextReference()

      Description copied from interface: `HasAssignmentContext`
      Returns an assignment context reference
      Specified by:
        `getAssignmentContextReference` in interface `HasAssignmentContext<V extends Variable<V,T>,T extends Value<V,T>,AbstractCriterion.ValueContext>`
      Returns:
        reference provided by the model by calling `Model.createReference(HasAssignmentContext)` during initialization

    - #### setAssignmentContextReference

          public void setAssignmentContextReference(AssignmentContextReference<V,T,AbstractCriterion.ValueContext> reference)

      Description copied from interface: `HasAssignmentContext`
      Store an assignment context reference that was given for the class by the `Model.createReference(HasAssignmentContext)`.
      Specified by:
        `setAssignmentContextReference` in interface `HasAssignmentContext<V extends Variable<V,T>,T extends Value<V,T>,AbstractCriterion.ValueContext>`
      Parameters:
        `reference` - reference provided by the model by calling `Model.createReference(HasAssignmentContext)` during initialization

    - #### getContext

          public AssignmentContext[] getContext()

      Description copied from interface: `CanHoldContext`
      An array of `CanHoldContext.sMaxSize` assignment contexts
      Specified by:
        `getContext` in interface `CanHoldContext`
      Returns:
        assignment contexts

    - #### getValue

          public double getValue(Assignment<V,T> assignment)

      Description copied from interface: `Criterion`
      Current value of the criterion (optimization objective)
      Specified by:
        `getValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
      Returns:
        value of this criterion

    - #### getBest

          public double getBest()

      Description copied from interface: `Criterion`
      Best value (value of the criterion in the best solution)
      Specified by:
        `getBest` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Returns:
        value of this criterion in the best solution

    - #### getValue

          public double getValue(Assignment<V,T> assignment,
                                 Collection<V> variables)

      Description copied from interface: `Criterion`
      Value of a part of the problem (given by the collection of variables)
      Specified by:
        `getValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `variables` - list of problem variables
      Returns:
        value of the given variables

    - #### getWeight

          public double getWeight()

      Description copied from interface: `Criterion`
      Weight of the criterion
      Specified by:
        `getWeight` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Returns:
        criterion weight

    - #### getWeightedBest

          public double getWeightedBest()

      Description copied from interface: `Criterion`
      Weighted best value of the objective (value in the best solution).
      Specified by:
        `getWeightedBest` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Returns:
        weighted value of this criterion in the best solution

    - #### getWeightedValue

          public double getWeightedValue(Assignment<V,T> assignment)

      Description copied from interface: `Criterion`
      Weighted value of the objectives
      Specified by:
        `getWeightedValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
      Returns:
        weighted value of this criterion

    - #### getWeightedValue

          public double getWeightedValue(Assignment<V,T> assignment,
                                         T value,
                                         Set<T> conflicts)

      Description copied from interface: `Criterion`
      Weighted value of a proposed assignment (including hard conflicts)
      Specified by:
        `getWeightedValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `value` - given value
        `conflicts` - values conflicting with the given value
      Returns:
        weighted change in this criterion value when assigned

    - #### getWeightedValue

          public double getWeightedValue(Assignment<V,T> assignment,
                                         Collection<V> variables)

      Description copied from interface: `Criterion`
      Weighted value of a part of the problem (given by the collection of variables)
      Specified by:
        `getWeightedValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `variables` - list of problem variables
      Returns:
        weighted value of the given variables

    - #### computeBounds

          protected double[] computeBounds(Assignment<V,T> assignment)

      Compute bounds (bounds are being cached by default).
      Parameters:
        `assignment` - current assignment
      Returns:
        minimum and maximum of this criterion's value

    - #### getBounds

          public double[] getBounds(Assignment<V,T> assignment)

      Description copied from interface: `Criterion`
      Bounds (minimum and maximum) estimate for the value
      Specified by:
        `getBounds` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
      Returns:
        minimum and maximum of the criterion value

    - #### getBounds

          public double[] getBounds(Assignment<V,T> assignment,
                                    Collection<V> variables)

      Description copied from interface: `Criterion`
      Value bounds (minimum and maximum) of the criterion on a part of the problem
      Specified by:
        `getBounds` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `variables` - list of problem variables
      Returns:
        minimum and maximum of this criterion for the given sub-problem

    - #### beforeAssigned

          public void beforeAssigned(Assignment<V,T> assignment,
                                     long iteration,
                                     T value)

      Description copied from interface: `ModelListener`
      Called before a value is assigned to its variable ( `Value.variable()`).
      Specified by:
        `beforeAssigned` in interface `ModelListener<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value to be assigned

    - #### afterAssigned

          public void afterAssigned(Assignment<V,T> assignment,
                                    long iteration,
                                    T value)

      Description copied from interface: `ModelListener`
      Called after a value is assigned to its variable ( `Value.variable()`).
      Specified by:
        `afterAssigned` in interface `ModelListener<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value to be assigned

    - #### beforeUnassigned

          public void beforeUnassigned(Assignment<V,T> assignment,
                                       long iteration,
                                       T value)

      Description copied from interface: `ModelListener`
      Called before a value is unassigned from its variable ( `Value.variable()`).
      Specified by:
        `beforeUnassigned` in interface `ModelListener<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value to be unassigned

    - #### afterUnassigned

          public void afterUnassigned(Assignment<V,T> assignment,
                                      long iteration,
                                      T value)

      Description copied from interface: `ModelListener`
      Called after a value is unassigned from its variable ( `Value.variable()`).
      Specified by:
        `afterUnassigned` in interface `ModelListener<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value to be unassigned

    - #### bestSaved

          public void bestSaved(Assignment<V,T> assignment)

      Description copied from interface: `Criterion`
      Notification that the current solution has been saved to the best.
      Specified by:
        `bestSaved` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment

    - #### bestRestored

          public void bestRestored(Assignment<V,T> assignment)

      Description copied from interface: `Criterion`
      Notification that the current solution has been restored from the best.
      Specified by:
        `bestRestored` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment

    - #### inc

          public void inc(Assignment<V,T> assignment,
                          double value)

      Description copied from interface: `Criterion`
      Outside update of the criterion (usefull when the criterion is driven by a set of constraints).
      Specified by:
        `inc` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `value` - increment criterion by this value

    - #### getName

          public String getName()

      Description copied from interface: `Criterion`
      Criterion name
      Specified by:
        `getName` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Returns:
        name

    - #### clearCache

          protected void clearCache()

      Clear bounds cache

    - #### variableAdded

          public void variableAdded(V variable)

      Description copied from interface: `ModelListener`
      Variable is added to the model
      Specified by:
        `variableAdded` in interface `ModelListener<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `variable` - added variable

    - #### variableRemoved

          public void variableRemoved(V variable)

      Description copied from interface: `ModelListener`
      Variable is removed from the model
      Specified by:
        `variableRemoved` in interface `ModelListener<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `variable` - removed variable

    - #### constraintAdded

          public void constraintAdded(Constraint<V,T> constraint)

      Description copied from interface: `ModelListener`
      Constraint is added to the model
      Specified by:
        `constraintAdded` in interface `ModelListener<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `constraint` - added constraint

    - #### constraintRemoved

          public void constraintRemoved(Constraint<V,T> constraint)

      Description copied from interface: `ModelListener`
      Constraint is removed from the model
      Specified by:
        `constraintRemoved` in interface `ModelListener<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `constraint` - removed constraint

    - #### getPerc

          protected String getPerc(double value,
                                   double min,
                                   double max)

    - #### getPercRev

          protected String getPercRev(double value,
                                      double min,
                                      double max)

    - #### getInfo

          public void getInfo(Assignment<V,T> assignment,
                              Map<String,String> info)

      Description copied from interface: `InfoProvider`
      Adds some information into the table with information about the solution
      Specified by:
        `getInfo` in interface `InfoProvider<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `info` - info table

    - #### getInfo

          public void getInfo(Assignment<V,T> assignment,
                              Map<String,String> info,
                              Collection<V> variables)

      Description copied from interface: `InfoProvider`
      Adds some information into the table with information about the solution, only consider variables from the given set
      Specified by:
        `getInfo` in interface `InfoProvider<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `info` - info table
        `variables` - sub-problem

    - #### getPercentage

          public String getPercentage(Assignment<V,T> assignment)

      Return formatted value of this criterion, as percentage when possible
      Parameters:
        `assignment` - current assignment
      Returns:
        formatted value

    - #### getExtendedInfo

          public void getExtendedInfo(Assignment<V,T> assignment,
                                      Map<String,String> info)

      Description copied from interface: `ExtendedInfoProvider`
      Extended information about current solution. Similar to `InfoProvider.getInfo(Assignment, Map)`, but some more information (that is more expensive to compute) might be added.
      Specified by:
        `getExtendedInfo` in interface `ExtendedInfoProvider<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
        `info` - extended info

    - #### getWeightedValue

          @Deprecated
          public double getWeightedValue()

      Deprecated.
      Description copied from interface: `Criterion`
      Weighted value of the objectives. Use `Criterion.getWeightedValue(Assignment)` instead.
      Specified by:
        `getWeightedValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Returns:
        weighted value of this criterion

    - #### getBounds

          @Deprecated
          public double[] getBounds()

      Deprecated.
      Description copied from interface: `Criterion`
      Bounds (minimum and maximum) estimate for the value. Use `Criterion.getBounds(Assignment)` instead.
      Specified by:
        `getBounds` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Returns:
        minimum and maximum of the criterion value

    - #### getWeightedValue

          @Deprecated
          public double getWeightedValue(T value,
                                                     Set<T> conflicts)

      Deprecated.
      Description copied from interface: `Criterion`
      Weighted value of a proposed assignment (including hard conflicts). Use `Criterion.getWeightedValue(Assignment, Value, Set)` instead.
      Specified by:
        `getWeightedValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `value` - given value
        `conflicts` - values conflicting with the given value
      Returns:
        weighted change in this criterion value when assigned

    - #### getValue

          @Deprecated
          public double getValue(T value,
                                             Set<T> conflicts)

      Deprecated.
      Description copied from interface: `Criterion`
      Value of a proposed assignment (including hard conflicts). Use `Criterion.getValue(Assignment, Value, Set)` instead.
      Specified by:
        `getValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `value` - given value
        `conflicts` - values conflicting with the given value
      Returns:
        change in this criterion value when assigned

    - #### getWeightedValue

          @Deprecated
          public double getWeightedValue(Collection<V> variables)

      Deprecated.
      Description copied from interface: `Criterion`
      Weighted value of a part of the problem (given by the collection of variables) Use `Criterion.getWeightedValue(Assignment, Collection)` instead.
      Specified by:
        `getWeightedValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `variables` - list of problem variables
      Returns:
        weighted value of the given variables

    - #### getValue

          @Deprecated
          public double getValue(Collection<V> variables)

      Deprecated.
      Description copied from interface: `Criterion`
      Value of a part of the problem (given by the collection of variables). Use `Criterion.getValue(Assignment, Collection)` instead.
      Specified by:
        `getValue` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `variables` - list of problem variables
      Returns:
        value of the given variables

    - #### getBounds

          @Deprecated
          public double[] getBounds(Collection<V> variables)

      Deprecated.
      Description copied from interface: `Criterion`
      Value bounds (minimum and maximum) of the criterion on a part of the problem. Use `Criterion.getBounds(Assignment, Collection)` instead.
      Specified by:
        `getBounds` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `variables` - list of problem variables
      Returns:
        minimum and maximum of this criterion for the given sub-problem

    - #### inc

          @Deprecated
          public void inc(double value)

      Deprecated.
      Description copied from interface: `Criterion`
      Outside update of the criterion (usefull when the criterion is driven by a set of constraints). Use `Criterion.inc(Assignment, double)` instead.
      Specified by:
        `inc` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `value` - increment criterion by this value

    - #### getAbbreviation

          public String getAbbreviation()

      Abbreviated name of the criterion for `Object.toString()`.
      Returns:
        abbreviated name of the criterion

    - #### toString

          public String toString(Assignment<V,T> assignment)

      Simple text representation of the criterion and its value. E.g., X:x where X is the `getAbbreviation()` and x is the current value `getValue(Assignment)`.
      Specified by:
        `toString` in interface `Criterion<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `assignment` - current assignment
      Returns:
        short string representation (e.g., PP:95% for period preference)

    - #### getValueUpdateType

          public AbstractCriterion.ValueUpdateType getValueUpdateType()

    - #### setValueUpdateType

          public void setValueUpdateType(AbstractCriterion.ValueUpdateType iValueUpdateType)