org.cpsolver.ifs.dbt

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

- java.lang.Object
- - org.cpsolver.ifs.dbt.DbtValueSelection<V,T>

- Type Parameters:
    `V` - Variable
    `T` - Value
  All Implemented Interfaces:
    ValueSelection<V,T>

      public class DbtValueSelection<V extends Variable<V,T>,T extends Value<V,T>>
      extends Object
      implements ValueSelection<V,T>

  Selection of a value for dynamic backtracking.
  - Returns null if all values of the selected variable are nogood.
  - Selected the best good value (according to the parameters) of the selected variable.
  It is based on a weighted sum of several criteria.
  This IFS solver value selection heuristics is to be used only in case of dynamic backtracking and it has the following parameters:

  Parameter | Type | Comment
  --- | --- | ---
  General.MPP | `Boolean` | Minimal Perturbation Problem
  Value.MPPLimit | `Integer` | Limit on the number of perturbations (only in case of MPP, i.e., when General.MPP=true). MPP limit is decreased when a complete solution is found. If set to -1, it is no used
  Value.InitialSelectionProb | `Double` | Probability of selection of initial value (only in case of MPP)
  Value.WeightDeltaInitialAssignments | `Double` | Weight of difference in the number of assignments of initial values in case of selection of the value(only in case of MPP)
  Value.RandomWalkProb | `Double` | Probability of random selection of a good value
  Value.WeightNrAssignments | `Double` | Weight of the number of previous assignments of the value
  Value.WeightValue | `Double` | Weight of the value itself (e.g., for minCSP)

  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/.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DbtValueSelection(DataProperties properties)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `init(Solver<V,T> solver)` Heuristics initialization
    `T` | `selectValue(Solution<V,T> solution, V selectedVariable)` Value selection

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

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

- - ### Constructor Detail

    - #### DbtValueSelection

          public DbtValueSelection(DataProperties properties)

  - ### Method Detail

    - #### init

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

      Heuristics initialization
      Specified by:
        `init` in interface `ValueSelection<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `solver` - current solver
      See Also:
        `ValueSelection.init(Solver)`

    - #### selectValue

          public T selectValue(Solution<V,T> solution,
                               V selectedVariable)

      Value selection
      Specified by:
        `selectValue` in interface `ValueSelection<V extends Variable<V,T>,T extends Value<V,T>>`
      Parameters:
        `solution` - current solution
        `selectedVariable` - selected variable
      Returns:
        selected value (of the given variable)
      See Also:
        `ValueSelection.selectValue(Solution, Variable)`