V
- VariableT
- Valuepublic class StandardNeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>> extends Object implements NeighbourSelection<V,T>
VariableSelection
. Then, a value is selected to the selected
variable, using the ValueSelection
. A SimpleNeighbour
containing the selected value is returned. Parameter | Type | Comment |
---|---|---|
Value.Class | String |
Fully qualified class name of the value selection criterion (see
ValueSelection , e.g. GeneralValueSelection ) |
Variable.Class | String |
Fully qualified class name of the variable selection criterion (see
VariableSelection , e.g. GeneralVariableSelection ) |
Solver
Modifier and Type | Field and Description |
---|---|
protected Solver<V,T> |
iSolver |
protected ConflictStatistics<V,T> |
iStat |
protected static org.apache.logging.log4j.Logger |
sLogger |
Constructor and Description |
---|
StandardNeighbourSelection(DataProperties properties)
Constructor
|
Modifier and Type | Method and Description |
---|---|
ValueSelection<V,T> |
getValueSelection()
Returns value selection criterion
|
VariableSelection<V,T> |
getVariableSelection()
Returns variable selection criterion
|
void |
init(Solver<V,T> solver)
Initialization -- methods
VariableSelection.init(Solver) and
ValueSelection.init(Solver) are
called. |
Neighbour<V,T> |
selectNeighbour(Solution<V,T> solution)
Select neighbour.
|
T |
selectValue(Solution<V,T> solution,
V variable)
Use the provided value selection criterion to select a value to the
selected variable
|
V |
selectVariable(Solution<V,T> solution)
Use the provided variable selection criterion to select a variable
|
void |
setValueSelection(ValueSelection<V,T> valueSelection)
Sets value selection criterion
|
void |
setVariableSelection(VariableSelection<V,T> variableSelection)
Sets variable selection criterion
|
protected static org.apache.logging.log4j.Logger sLogger
public StandardNeighbourSelection(DataProperties properties) throws Exception
properties
- configurationException
- thrown when initialization failspublic void setValueSelection(ValueSelection<V,T> valueSelection)
valueSelection
- value selection criterionpublic void setVariableSelection(VariableSelection<V,T> variableSelection)
variableSelection
- variable selection criterionpublic ValueSelection<V,T> getValueSelection()
public VariableSelection<V,T> getVariableSelection()
public void init(Solver<V,T> solver)
VariableSelection.init(Solver)
and
ValueSelection.init(Solver)
are
called.public V selectVariable(Solution<V,T> solution)
solution
- current solutionpublic T selectValue(Solution<V,T> solution, V variable)
solution
- current solutionvariable
- selected variablepublic Neighbour<V,T> selectNeighbour(Solution<V,T> solution)
selectNeighbour
in interface NeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>
solution
- given solution