public class GreatDeluge<V extends Variable<V,T>,T extends Value<V,T>> extends NeighbourSearch<V,T>
NeighbourSelection
. By default,
each neighbour selection is selected with the same probability (each has 1 point in
a roulette wheel selection). It can be changed by adding @n at the end
of the name of the class, for example:
GreatDeluge.Neighbours=net.sf.cpsolver.ifs.algorithms.neighbourhoods.RandomMove;net.sf.cpsolver.ifs.algorithms.neighbourhoods.RandomSwapMove@0.1
NeighbourSelector.update(Neighbour, long)
is called
after each iteration (on the selector that was used) and roulette wheel selection
that is using NeighbourSelector.getPoints()
is used to pick a selector in each iteration.
See NeighbourSelector
for more details.
Constructor and Description |
---|
GreatDeluge(DataProperties properties)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(Model<V,T> model,
Neighbour<V,T> neighbour,
double value,
boolean lazy)
Accept the given neighbour if it does not worsen the current solution or when the new solution is below the bound
|
protected void |
activate(Solution<V,T> solution)
Setup the bound
|
void |
bestSaved(Solution<V,T> solution)
Update last improving iteration count
|
String |
getParameterBaseName()
Parameter base name.
|
protected void |
incIteration(Solution<V,T> solution)
Increment iteration count, update bound
|
accept, accept, addNeighbourSelection, bestCleared, bestRestored, canContinue, deactivate, generateMove, getInfo, getInfo, getNeighbours, getTimeMillis, init, logNeibourStatus, nextNeighbourSelection, selectNeighbour, setHCMode, solutionUpdated
public GreatDeluge(DataProperties properties)
NeighbourSelection
NeighbourSelection
NeighbourSelector.getPoints()
weights (roulette wheel selection)
properties
- problem propertiesprotected boolean accept(Model<V,T> model, Neighbour<V,T> neighbour, double value, boolean lazy)
protected void incIteration(Solution<V,T> solution)
incIteration
in class NeighbourSearch<V extends Variable<V,T>,T extends Value<V,T>>
public String getParameterBaseName()
NeighbourSearch
getParameterBaseName
in class NeighbourSearch<V extends Variable<V,T>,T extends Value<V,T>>