SolutionType - solution type of the problems that may be solved using this search, required to extend Solutionpublic abstract class SingleNeighbourhoodSearch<SolutionType extends Solution> extends NeighbourhoodSearch<SolutionType>
| Constructor and Description |
|---|
SingleNeighbourhoodSearch(Problem<SolutionType> problem,
Neighbourhood<? super SolutionType> neighbourhood)
Create a new single neighbourhood search, specifying the problem to be solved and the neighbourhood used to
modify the current solution.
|
SingleNeighbourhoodSearch(String name,
Problem<SolutionType> problem,
Neighbourhood<? super SolutionType> neighbourhood)
Create a new single neighbourhood search, specifying the problem to be solved, the neighbourhood used to
modify the current solution, and a custom search name.
|
| Modifier and Type | Method and Description |
|---|---|
Neighbourhood<? super SolutionType> |
getNeighbourhood()
Get the neighbourhood used to modify the current solution.
|
void |
setNeighbourhood(Neighbourhood<? super SolutionType> neighbourhood)
Sets the neighbourhood used to modify the current solution.
|
accept, evaluate, getBestMove, getNumAcceptedMoves, getNumRejectedMoves, incNumAcceptedMoves, incNumRejectedMoves, init, isImprovement, reject, setEvaluatedMoveCache, updateCurrentSolution, validategenerateRandomInitialSolution, getCurrentSolution, getCurrentSolutionEvaluation, getCurrentSolutionValidation, setCurrentSolution, setCurrentSolution, updateCurrentAndBestSolution, updateCurrentAndBestSolution, updateCurrentSolutionaddSearchListener, addStopCriterion, assertIdle, clearSearchListeners, clearStopCriteria, computeDelta, dispose, getBestSolution, getBestSolutionEvaluation, getBestSolutionValidation, getID, getMinDelta, getName, getProblem, getRandom, getRuntime, getSearchListeners, getStatus, getStatusLock, getSteps, getStepsWithoutImprovement, getTimeWithoutImprovement, removeSearchListener, removeStopCriterion, run, searchDisposed, searchStarted, searchStep, searchStopped, setRandom, setStopCriterionCheckPeriod, start, stop, toString, updateBestSolution, updateBestSolutionpublic SingleNeighbourhoodSearch(Problem<SolutionType> problem, Neighbourhood<? super SolutionType> neighbourhood)
null, else, an exception is thrown.
The search name is set to the default name "SingleNeighbourhoodSearch".problem - problem to be solvedneighbourhood - neighbourhood used to modify the current solutionNullPointerException - if problem or neighbourhood are nullpublic SingleNeighbourhoodSearch(String name, Problem<SolutionType> problem, Neighbourhood<? super SolutionType> neighbourhood)
null,
else, an exception is thrown. The search name may be null in which case it is set to the default
name "SingleNeighbourhoodSearch".name - custom search nameproblem - problem to be solvedneighbourhood - neighbourhood used to modify the current solutionNullPointerException - if problem or neighbourhood are nullpublic Neighbourhood<? super SolutionType> getNeighbourhood()
public void setNeighbourhood(Neighbourhood<? super SolutionType> neighbourhood)
neighbourhood can not be
null and that this method may only be called when the search is idle.neighbourhood - neighbourhood used to modify the current solutionNullPointerException - if neighbourhood is nullSearchException - if the search is currently not idleCopyright © 2016. All rights reserved.