net.sf.cpsolver.ifs.heuristics
Class GeneralValueSelection
java.lang.Object
net.sf.cpsolver.ifs.heuristics.GeneralValueSelection
- All Implemented Interfaces:
- ValueSelection
public class GeneralValueSelection
- extends Object
- implements ValueSelection
General implementation of value selection criterion.
Value selection criterion is based on weighted sum of various criteria. It also allows random walk technique and
tabu search.
Parameters:
Parameter | Type | Comment |
General.MPP | Boolean | if true, MPP is being solved |
Value.MPPLimit | Integer | MPP: limitation of the number of allowed perturbations. If a solution within this limit is gound, it is decreased. |
Value.InitialSelectionProb | Double | MPP: probability of selection of the initial value |
Value.RandomWalkProb | Double | Random Walk: probability of selection of a value randomly among all the values |
Value.Tabu | Integer | Tabu Search: length of the tabu-list |
Value.GoodSelectionProb | Double | In case of MacPropagation , with this probability (1.0 means always), the selection is made only among good values (not removed from the domain). |
Following weights are used in the weighted sum (computed for all values). The value with the lowest weighted sum is selected.
If there are more than one of such values, one of them is selected randomly.
Parameter | Type | Comment |
Value.WeightDeltaInitialAssignments | Double | MPP: Difference in the number of assigned initial values if the value is assigned to the variable (weighted by this Value.WeightDeltaInitialAssignments): -1 if the value is initial, 0 otherwise, increased by the number of initial values assigned to variables with hard conflicts with the value |
Value.WeightWeightedConflicts | Double | When ConflictStatistics is used: weighted number of conflicting variables |
Value.WeightPotentialConflicts | Double | When ConflictStatistics is used: weighted number of potentially conflicting variables |
Value.WeightConflicts | Double | Number of conflicting variables Model.conflictValues(Value) . |
Value.WeightNrAssignments | Double | Number of previous assignments of the value |
Value.WeightValue | Double | Value Value.toDouble() |
- Version:
- IFS 1.1 (Iterative Forward Search)
Copyright (C) 2006 Tomáš Müller
muller@unitime.org
Lazenska 391, 76314 Zlin, Czech Republic
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 2.1 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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- See Also:
VariableSelection
,
Solver
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
iTabuSize
protected int iTabuSize
iTabu
protected ArrayList iTabu
iTabuPos
protected int iTabuPos
GeneralValueSelection
public GeneralValueSelection()
GeneralValueSelection
public GeneralValueSelection(DataProperties properties)
- Constructor
- Parameters:
properties
- input configuration
init
public void init(Solver solver)
- Initialization
- Specified by:
init
in interface ValueSelection
selectValue
public Value selectValue(Solution solution,
Variable selectedVariable)
- Value selecion
- Specified by:
selectValue
in interface ValueSelection
- Parameters:
solution
- current solutionselectedVariable
- selected variable