|
||||||||||
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>
net.sf.cpsolver.ifs.heuristics.RoundRobinNeighbourSelection<V,T>
public class RoundRobinNeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>
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<V,T> solution)
Change selection |
void |
init(Solver<V,T> solver)
Initialization |
void |
registerSelection(NeighbourSelection<V,T> selection)
Register a neighbour selection |
Neighbour<V,T> |
selectNeighbour(Solution<V,T> 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<V,T> selection)
public void init(Solver<V,T> solver)
init
in interface NeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>
init
in class StandardNeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>
public Neighbour<V,T> selectNeighbour(Solution<V,T> solution)
selectNeighbour
in interface NeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>
selectNeighbour
in class StandardNeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>
solution
- given solution
public void changeSelection(Solution<V,T> solution)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |