net.sf.cpsolver.coursett.heuristics
Class LectureSelection
java.lang.Object
net.sf.cpsolver.coursett.heuristics.LectureSelection
- All Implemented Interfaces:
- VariableSelection
public class LectureSelection
- extends Object
- implements VariableSelection
Lecture (variable) selection.
If there are one or more variables unassigned, the variable selection criterion picks one of them randomly. We have
tried several approaches using domain sizes, number of previous assignments, numbers of constraints in which the
variable participates, etc., but there was no significant improvement in this timetabling problem towards the random
selection of an unassigned variable. The reason is, that it is easy to go back when a wrong variable is picked -
such a variable is unassigned when there is a conflict with it in some of the subsequent iterations.
When all variables are assigned, an evaluation is made for each variable according to the above described weights. The
variable with the worst evaluation is selected. This variable promises the best improvement in optimization.
Parameters (selection among unassigned lectures):
Parameter | Type | Comment |
Lecture.RouletteWheelSelection | Boolean | Roulette wheel selection |
Lecture.RandomWalkProb | Double | Random walk probability |
Lecture.DomainSizeWeight | Double | Domain size weight |
Lecture.NrAssignmentsWeight | Double | Number of assignments weight |
Lecture.InitialAssignmentWeight | Double | Initial assignment weight |
Lecture.NrConstraintsWeight | Double | Number of constraint weight |
Parameters (selection among assigned lectures, when the solution is complete):
Parameter | Type | Comment |
Lecture.HardStudentConflictWeight | Double | Hard student conflict weight |
Lecture.StudentConflictWeight | Double | Student conflict weight |
Lecture.TimePreferenceWeight | Double | Time preference weight |
Lecture.ContrPreferenceWeight | Double | Group constraint preference weight |
Lecture.RoomPreferenceWeight | Double | Room preference weight |
Lecture.UselessSlotWeight | Double | Useless slot weight |
Lecture.TooBigRoomWeight | Double | Too big room weight |
Lecture.DistanceInstructorPreferenceWeight | Double | Distance (of the rooms of the back-to-back classes) based instructor preferences weight |
Lecture.DeptSpreadPenaltyWeight | Double | Department balancing penalty (see DepartmentSpreadConstraint ) |
Parameters (selection among subset of lectures (faster)):
Parameter | Type | Comment |
Lecture.SelectionSubSet | Boolean | Selection among subset of lectures (faster) |
Lecture.SelectionSubSetMinSize | Double | Minimal subset size |
Lecture.SelectionSubSetPart | Double | Subset size in percentage of all lectures available for selection |
- Version:
- CourseTT 1.1 (University Course Timetabling)
Copyright (C) 2006 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
- See Also:
PlacementSelection
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LectureSelection
public LectureSelection(DataProperties properties)
parameters
public static Collection parameters()
init
public void init(Solver solver)
- Description copied from interface:
VariableSelection
- Initialization
- Specified by:
init
in interface VariableSelection
selectVariable
public Variable selectVariable(Solution solution)
- Description copied from interface:
VariableSelection
- Variable selection
- Specified by:
selectVariable
in interface VariableSelection
- Parameters:
solution
- current solution