public abstract class SubsetNeighbourhood extends Object implements Neighbourhood<SubsetSolution>
Constructor and Description |
---|
SubsetNeighbourhood(Set<Integer> fixedIDs)
Initialize abstract subset neighbourhood with a given set of fixed IDs that are not allowed to
be selected or deselected.
|
Modifier and Type | Method and Description |
---|---|
protected Set<Integer> |
getAddCandidates(SubsetSolution currentSolution)
Infer the set of IDs that may be added to the selection in the given subset solution.
|
protected Set<Integer> |
getRemoveCandidates(SubsetSolution currentSolution)
Infer the set of IDs that may be removed from the selection in the given subset solution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllMoves, getRandomMove, getRandomMove
public SubsetNeighbourhood(Set<Integer> fixedIDs)
fixedIDs
- set of fixed IDs (either null
or empty if no IDs are fixed)protected Set<Integer> getAddCandidates(SubsetSolution currentSolution)
SubsetSolution.getUnselectedIDs()
. Else, it returns a copy of this (immutable)
set from which all fixed IDs have been removed.currentSolution
- current subset solutionprotected Set<Integer> getRemoveCandidates(SubsetSolution currentSolution)
SubsetSolution.getSelectedIDs()
. Else, it returns a copy of this (immutable)
set from which all fixed IDs have been removed.currentSolution
- current subset solutionCopyright © 2016. All rights reserved.