net.sf.cpsolver.coursett.heuristics
Class LectureSelection

java.lang.Object
  extended by 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):

ParameterTypeComment
Lecture.RouletteWheelSelectionBooleanRoulette wheel selection
Lecture.RandomWalkProbDoubleRandom walk probability
Lecture.DomainSizeWeightDoubleDomain size weight
Lecture.NrAssignmentsWeightDoubleNumber of assignments weight
Lecture.InitialAssignmentWeightDoubleInitial assignment weight
Lecture.NrConstraintsWeightDoubleNumber of constraint weight

Parameters (selection among assigned lectures, when the solution is complete):
ParameterTypeComment
Lecture.HardStudentConflictWeightDoubleHard student conflict weight
Lecture.StudentConflictWeightDoubleStudent conflict weight
Lecture.TimePreferenceWeightDoubleTime preference weight
Lecture.ContrPreferenceWeightDoubleGroup constraint preference weight
Lecture.RoomPreferenceWeightDoubleRoom preference weight
Lecture.UselessSlotWeightDoubleUseless slot weight
Lecture.TooBigRoomWeightDoubleToo big room weight
Lecture.DistanceInstructorPreferenceWeightDoubleDistance (of the rooms of the back-to-back classes) based instructor preferences weight
Lecture.DeptSpreadPenaltyWeightDoubleDepartment balancing penalty (see DepartmentSpreadConstraint)

Parameters (selection among subset of lectures (faster)):
ParameterTypeComment
Lecture.SelectionSubSetBooleanSelection among subset of lectures (faster)
Lecture.SelectionSubSetMinSizeDoubleMinimal subset size
Lecture.SelectionSubSetPartDoubleSubset 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

Constructor Summary
LectureSelection(DataProperties properties)
           
 
Method Summary
 void init(Solver solver)
          Initialization
static Collection parameters()
           
 Variable selectVariable(Solution solution)
          Variable selection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LectureSelection

public LectureSelection(DataProperties properties)
Method Detail

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