ttsolver.heuristics
Class UniversalPerturbationsCounter

java.lang.Object
  extended by ifs.perturbations.DefaultPerturbationsCounter
      extended by ttsolver.heuristics.UniversalPerturbationsCounter
All Implemented Interfaces:
PerturbationsCounter

public class UniversalPerturbationsCounter
extends DefaultPerturbationsCounter

Perturbation penalty computation.

In practise, the strategy for computing perturbations needs to be extended. For example, a change in time is usually much worse than a movement to a different classroom. The number of enrolled/involved students should also be taken into account. Another factor is whether the solution has already been published or not.
The priorities for evaluating perturbations are as follows. Before publishing timetable:


After publishing the timetable (class time changes are not allowed): In both cases, the number of classes with room change is not significant at all. Before the timetable is published, minimizing the number of classes with time changes is the most important criteria for the MPP as long as it does not create too many additional student conflicts in the process. Therefore, as a compromise, the cost (in equivalent conflicts) of changing the time assigned to a class equals a number like 5% of the students enrolled in that class. Otherwise none of our other criteria would have any importance.

Similar properties apply between other criteria as well. To fulfil all these needs we have crated a function (called perturbations penalty) which can be computed over a partial solution. This is a weighted sum of various perturbations criteria like the number of classes with time changes or the number of additional student conflicts. This perturbation penalty is added as an extra optimization criterion to the solution comparator and to value selection criterion, so we can also setup the weights between this perturbation penalty and other (initial) soft constraints.

Parameters:
ParameterTypeComment
Perturbations.DifferentPlacementDoubleDifferent value than initial is assigned
Perturbations.AffectedStudentWeightDoubleNumber of students which are enrolled in a class which is placed to a different location than initial (a student can be included twice or more)
Perturbations.AffectedInstructorWeightDoubleNumber of instructors which are assigned to classes which are placed to different locations than initial (an instructor can be included twice or more)
Perturbations.DifferentRoomWeightDoubleNumber of classes which are placed to a different room than initial
Perturbations.DifferentBuildingWeightDoubleNumber of classes which are placed to a different building than initial
Perturbations.DifferentTimeWeightDoubleNumber of classes which are placed in a different time than initial
Perturbations.DifferentDayWeightDoubleNumber of classes which are placed in a different days than initial
Perturbations.DifferentHourWeightDoubleNumber of classes which are placed in a different hours than initial
Perturbations.DeltaStudentConflictsWeightDoubleDifference of student conflicts of classes assigned to current placements instead of initial placements. It is a difference between number of students conflicts which are in the initial solution and the current one. Student conflicts created by classes without initial placement are not taken into account
Perturbations.NewStudentConflictsWeightDoubleNew created student conflicts -- particular students are taken into account. Student conflicts created by classes without initial placement are not taken into account
Perturbations.TooFarForInstructorsWeightDoubleNew placement of a class is too far from the intial placement (instructor-wise). It is computed only when the class has an instructor assigned, moreover:
  • 0 < distance(currentPlacement,initialPlacement) <= 5 .. weight is taken once
  • 5 < distance(currentPlacement,initialPlacement) <= 20 .. weight is taken twice
  • 20 < distance(currentPlacement,initialPlacement) .. weight is taken ten times
Perturbations.TooFarForStudentsWeightDoubleNew placement of a class is too far from the intial placement (instructor-student). It is weighted by the number of students enrolled in the class when distance(currentPlacement,initialPlacement) > 67
Perturbations.DeltaInstructorDistancePreferenceWeightDoubleDifference between number of instructor distance preferences of the initial (but maybe inconsistent) solution and the current solution. Instructor distance preferences of classes without initial placement are not taken into account
Perturbations.DeltaRoomPreferenceWeightDoubleDifference between room preferences of the initial and the current solution. Room preferences of classes without initial placement are not taken into account
Perturbations.DeltaTimePreferenceWeightDoubleDifference between time preferences of the initial and the current solution. Time preferences of classes without initial placement are not taken into account
Perturbations.AffectedStudentByTimeWeightDoubleNumber of students which are enrolled in a class which is placed to a different time than initial
Perturbations.AffectedInstructorByTimeWeightDoubleNumber of instructors which are assigned to classes which are placed to different time than initial
Perturbations.AffectedStudentByRoomWeightDoubleNumber of students which are enrolled in a class which is placed to a different room than initial
Perturbations.AffectedInstructorByRoomWeightDoubleNumber of instructors which are assigned to classes which are placed to different room than initial
Perturbations.AffectedStudentByBldgWeightDoubleNumber of students which are enrolled in a class which is placed to a different building than initial
Perturbations.AffectedInstructorByBldgWeightDoubleNumber of instructors which are assigned to classes which are placed to different building than initial

Version:
1.0
Author:
Tomáš Müller

Field Summary
 
Fields inherited from class ifs.perturbations.DefaultPerturbationsCounter
sDoubleFormat
 
Constructor Summary
UniversalPerturbationsCounter(DataProperties properties)
           
 
Method Summary
 Hashtable getCompactInfo(Solution solution, boolean includeZero, boolean weighted)
           
 void getInfo(Dictionary info, Solution solution)
          Some (perturbation) information about the solution might be returned here.
protected  double getPenalty(Value assignedValue, Value initialValue)
          Computes perturbation penalty between assigned and initial value of the same lecture.
static Vector parameters()
           
 
Methods inherited from class ifs.perturbations.DefaultPerturbationsCounter
getPenaltyA, getPenaltyB, getPenaltyC, getPenaltyD, getPerturbationPenalty, getPerturbationPenalty, getViolatedInitials, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniversalPerturbationsCounter

public UniversalPerturbationsCounter(DataProperties properties)
Method Detail

parameters

public static Vector parameters()

getPenalty

protected double getPenalty(Value assignedValue,
                            Value initialValue)
Description copied from class: DefaultPerturbationsCounter
Computes perturbation penalty between assigned and initial value of the same lecture. It is called only when assignedValue is different to initialValue.

Overrides:
getPenalty in class DefaultPerturbationsCounter
Parameters:
assignedValue - value assigned to a varuable (null when variable is unassigned)
initialValue - initial value of the same varaible (always not null)

getInfo

public void getInfo(Dictionary info,
                    Solution solution)
Description copied from interface: PerturbationsCounter
Some (perturbation) information about the solution might be returned here.

Specified by:
getInfo in interface PerturbationsCounter
Overrides:
getInfo in class DefaultPerturbationsCounter
Parameters:
info - resultant info table
solution - current solution

getCompactInfo

public Hashtable getCompactInfo(Solution solution,
                                boolean includeZero,
                                boolean weighted)


Copyright © 2005 Tomáš Müller