net.sf.cpsolver.studentsct.heuristics.selection
Class StandardSelection
java.lang.Object
net.sf.cpsolver.studentsct.heuristics.selection.StandardSelection
- All Implemented Interfaces:
- NeighbourSelection
public class StandardSelection
- extends Object
- implements NeighbourSelection
Use the provided variable and value selection for some time.
The provided variable and value selection is used for the
number of iterations equal to the number of all
variables in the problem. If a complete solution is found,
the neighbour selection is stopped (it returns null).
Parameters:
Parameter | Type | Comment |
Neighbour.StandardIterations | Long | Number of iterations to perform. If -1, number of iterations is set to the number of unassigned variables. |
- Version:
- StudentSct 1.1 (Student Sectioning)
Copyright (C) 2007 Tomáš Müller
muller@unitime.org
Lazenska 391, 76314 Zlin, Czech Republic
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
iNrIterations
protected long iNrIterations
StandardSelection
public StandardSelection(DataProperties properties,
VariableSelection variableSelection,
ValueSelection valueSelection)
- Constructor (variable and value selection are expected to be already initialized).
- Parameters:
properties
- configurationvariableSelection
- variable selectionvalueSelection
- value selection
init
public void init(Solver solver)
- Initialization
- Specified by:
init
in interface NeighbourSelection
selectNeighbour
public Neighbour selectNeighbour(Solution solution)
- Employ the provided
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.
- Specified by:
selectNeighbour
in interface NeighbourSelection
- Parameters:
solution
- given solution
- Returns:
- a neighbour assignment