public class SequenceNeighborhood extends Object implements INeighbor
| Modifier and Type | Field and Description |
|---|---|
protected int |
count
number of neighbors declared
|
protected int[] |
counters
Number of time each neighbor succeed in finding a solution
|
protected INeighbor[] |
neighbors
neighbors declared
|
protected int |
who
neighbor currently selected
|
| Constructor and Description |
|---|
SequenceNeighborhood(INeighbor... neighbors) |
| Modifier and Type | Method and Description |
|---|---|
void |
fixSomeVariables(DecisionPath decisionPath)
Freezes some variables in order to have a fast computation.
|
void |
init()
Initialize this neighbor
|
boolean |
isSearchComplete() |
void |
loadFromSolution(Solution solution)
Load a solution and record it
|
protected void |
nextNeighbor() |
void |
recordSolution()
Record values of decision variables to freeze some ones during the next LNS run
|
void |
restrictLess()
Use less restriction at the beginning of a LNS run
in order to get better solutions
Called when no solution was found during a LNS run (trapped into a local optimum)
|
protected int who
protected int count
protected INeighbor[] neighbors
protected int[] counters
public SequenceNeighborhood(INeighbor... neighbors)
public void recordSolution()
INeighborrecordSolution in interface INeighborpublic void loadFromSolution(Solution solution)
INeighborloadFromSolution in interface INeighborsolution - a solution to recordpublic void fixSomeVariables(DecisionPath decisionPath)
INeighborfixSomeVariables in interface INeighbordecisionPath - the decision path in which declaring variable to freezepublic void restrictLess()
INeighborrestrictLess in interface INeighborpublic boolean isSearchComplete()
isSearchComplete in interface INeighborpublic void init()
INeighborprotected void nextNeighbor()
Copyright © 2017. All rights reserved.