|
||||||||||
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 net.sf.cpsolver.ifs.heuristics.RoundRobinNeighbourSelection
public class RoundRobinNeighbourSelection
A round robin neighbour selection.
Two or more NeighbourSelection
needs to be registered within the selection.
This selection criterion takes the registered neighbour selections one by one and
performs NeighbourSelection.init(Solver)
and then it is using
NeighbourSelection.selectNeighbour(Solution)
to select a neighbour.
When null is returned by the underlaying selection, next registered neighbour selection
is initialized and used for the following selection(s). If the last registered
selection returns null, the selection is returned to the first registered
neighbour selection (it is initialized before used again).
Constructor Summary | |
---|---|
RoundRobinNeighbourSelection(DataProperties properties)
Constructor |
Method Summary | |
---|---|
void |
changeSelection(Solution solution)
Change selection |
void |
init(Solver solver)
Initialization |
void |
registerSelection(NeighbourSelection selection)
Register a neighbour selection |
Neighbour |
selectNeighbour(Solution solution)
Select neighbour. |
Methods inherited from class net.sf.cpsolver.ifs.heuristics.StandardNeighbourSelection |
---|
getValueSelection, getVariableSelection, selectValue, selectVariable, setValueSelection, setVariableSelection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RoundRobinNeighbourSelection(DataProperties properties) throws Exception
properties
- configuration
Exception
Method Detail |
---|
public void registerSelection(NeighbourSelection selection)
public void init(Solver solver)
init
in interface NeighbourSelection
init
in class StandardNeighbourSelection
public Neighbour selectNeighbour(Solution solution)
selectNeighbour
in interface NeighbourSelection
selectNeighbour
in class StandardNeighbourSelection
solution
- given solution
public void changeSelection(Solution solution)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |