|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.heuristics.StandardNeighbourSelection
public class StandardNeighbourSelection
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 Logger |
sLogger
|
Constructor Summary | |
---|---|
StandardNeighbourSelection(DataProperties properties)
Constructor |
Method Summary | |
---|---|
ValueSelection |
getValueSelection()
Returns values selection criterion |
VariableSelection |
getVariableSelection()
Returns variable selection criterion |
void |
init(Solver solver)
Initialization -- methods VariableSelection.init(Solver) and ValueSelection.init(Solver) are called. |
Neighbour |
selectNeighbour(Solution solution)
Select neighbour. |
Value |
selectValue(Solution solution,
Variable variable)
Use the provided value selection criterion to select a value to the selected variable |
Variable |
selectVariable(Solution solution)
Use the provided variable selection criterion to select a variable |
void |
setValueSelection(ValueSelection valueSelection)
Sets value selection criterion |
void |
setVariableSelection(VariableSelection 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 Logger sLogger
Constructor Detail |
---|
public StandardNeighbourSelection(DataProperties properties) throws Exception
properties
- configuration
Exception
Method Detail |
---|
public void setValueSelection(ValueSelection valueSelection)
public void setVariableSelection(VariableSelection variableSelection)
public ValueSelection getValueSelection()
public VariableSelection getVariableSelection()
public void init(Solver solver)
VariableSelection.init(Solver)
and ValueSelection.init(Solver)
are called.
init
in interface NeighbourSelection
public Variable selectVariable(Solution solution)
public Value selectValue(Solution solution, Variable variable)
public Neighbour selectNeighbour(Solution solution)
selectNeighbour
in interface NeighbourSelection
solution
- given solution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |