V
- VariableT
- Valuepublic class SuggestionMove<V extends Variable<V,T>,T extends Value<V,T>> extends RandomSwapMove<V,T>
NeighbourSelectionWithSuggestions
,
the very first found suggestion is returned. The depth is limited by
SuggestionMove.Depth parameter (defaults to 3). Also, instead of using a time limit,
the width of the search is limited by the number of values that are tried for each
variable (parameter SuggestionMove.MaxAttempts, defaults to 10). When used in
HillClimber
, the first suggestion that does not worsen the solution is returned.
RandomSwapMove.SwapNeighbour
Modifier and Type | Field and Description |
---|---|
protected int |
iSuggestionDepth |
protected int |
iTimeLimit |
iHC, iMaxAttempts
Constructor and Description |
---|
SuggestionMove(DataProperties config) |
Modifier and Type | Method and Description |
---|---|
void |
init(Solver<V,T> solver)
Criterion initialization
|
Neighbour<V,T> |
selectNeighbour(Solution<V,T> solution)
select a neighbour of a given solution
|
isTimeLimitReached, resolve, setHcMode
protected int iSuggestionDepth
protected int iTimeLimit
public SuggestionMove(DataProperties config) throws Exception
Exception
public void init(Solver<V,T> solver)
NeighbourSelection
public Neighbour<V,T> selectNeighbour(Solution<V,T> solution)
NeighbourSelection
selectNeighbour
in interface NeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>
selectNeighbour
in class RandomSwapMove<V extends Variable<V,T>,T extends Value<V,T>>
solution
- given solution