|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.ifs.heuristics.StandardNeighbourSelection<V,T>
public class StandardNeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>
Standard neighbour selection criterion.
This criterion is using the provided variable and value selection criteria.
In each step, a variable is selected first using the
VariableSelection
. Then, a value is selected to the selected
variable, using the ValueSelection
. A SimpleNeighbour
containing the selected value is returned.
Note: the use of neighbour select criteria extends the former implementation
of the IFS algorithm which was only able to use variable and value selection
criteria and therefore only one value was assigned in each iteration.
Parameters:
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
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
sLogger
|
Constructor Summary | |
---|---|
StandardNeighbourSelection(DataProperties properties)
Constructor |
Method Summary | |
---|---|
ValueSelection<V,T> |
getValueSelection()
Returns values 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.log4j.Logger sLogger
Constructor Detail |
---|
public StandardNeighbourSelection(DataProperties properties) throws Exception
properties
- configuration
Exception
Method Detail |
---|
public void setValueSelection(ValueSelection<V,T> valueSelection)
public void setVariableSelection(VariableSelection<V,T> variableSelection)
public 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.
init
in interface NeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>
public V selectVariable(Solution<V,T> solution)
public T selectValue(Solution<V,T> solution, V variable)
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |