public class StandardSelection extends Object implements NeighbourSelection<Request,Enrollment>
Parameter | Type | Comment |
---|---|---|
Neighbour.StandardIterations | Long |
Number of iterations to perform. If -1, number of iterations is set to the number of unassigned variables. |
Modifier and Type | Field and Description |
---|---|
protected long |
iNrIterations |
Constructor and Description |
---|
StandardSelection(DataProperties properties,
VariableSelection<Request,Enrollment> variableSelection,
ValueSelection<Request,Enrollment> valueSelection)
Constructor (variable and value selection are expected to be already
initialized).
|
Modifier and Type | Method and Description |
---|---|
void |
init(Solver<Request,Enrollment> solver)
Initialization
|
Neighbour<Request,Enrollment> |
selectNeighbour(Solution<Request,Enrollment> solution)
Employ the provided
VariableSelection and ValueSelection
and return the selected value as SimpleNeighbour . |
protected long iNrIterations
public StandardSelection(DataProperties properties, VariableSelection<Request,Enrollment> variableSelection, ValueSelection<Request,Enrollment> valueSelection)
properties
- configurationvariableSelection
- variable selectionvalueSelection
- value selectionpublic void init(Solver<Request,Enrollment> solver)
init
in interface NeighbourSelection<Request,Enrollment>
public Neighbour<Request,Enrollment> selectNeighbour(Solution<Request,Enrollment> solution)
VariableSelection
and ValueSelection
and return the selected value as SimpleNeighbour
. The selection
is stopped (null is returned) after the number of iterations equal to the
number of variables in the problem or when a complete solution is found.selectNeighbour
in interface NeighbourSelection<Request,Enrollment>
solution
- given solution