ttsolver
Class TimetableModel

java.lang.Object
  extended by ifs.model.Model
      extended by ttsolver.TimetableModel

public class TimetableModel
extends Model

Timetable model.

Version:
1.0
Author:
Tomáš Müller

Constructor Summary
TimetableModel(DataProperties properties)
           
 
Method Summary
 void addConstraint(Constraint constraint)
          Adds a constraint to the model
 void afterAssigned(long iteration, Value value)
          When a value is assigned to a variable -- update gloval preferences
 void afterUnassigned(long iteration, Value value)
          When a value is unassigned from a variable -- update gloval preferences
 int bestDepartmentSpreadPenalty()
          Overall departmental spread penalty of the best solution ever found
 long bestGlobalGroupConstraintPreference()
          Overall group constraint preference of the best solution ever found
 long bestGlobalRoomPreference()
          Overall room preference of the best solution ever found
 double bestGlobalTimePreference()
          Overall time preference of the best solution ever found
 long bestHardStudentConflicts()
          Overall number of student conflicts between single section classes of the best solution ever found
 long bestInstructorDistancePreference()
          Overall instructor distance preference of the best solution ever found
 int bestTooBigRooms()
          Overall number of too big rooms of the best solution ever found
 long bestUselessSlots()
          Overall number of useless slots of the best solution ever found
 long bestViolatedStudentConflicts()
          Overall number of student conflicts of the best solution ever found
 void checkJenrl()
          Check validity of JENRL constraints from student enrollments
 int countTooBigRooms()
          Overall number of too big rooms (rooms with more than 3/2 seats than needed)
 long countViolatedStudentConflicts()
          Number of student conflicts
 long getBestRoomPreference()
          Overall room preference of the best solution ever found
 double getBestTimePreference()
          Overall time preference of the best solution ever found
 Vector getDepartmentSpreadConstraints()
          The list of all departmental spread constraints
 int getDepartmentSpreadPenalty()
          Overall departmental spread penalty
 long getGlobalGroupConstraintPreference()
          Overall group constraint preference
 Counter getGlobalGroupConstraintPreferenceCounter()
          Overall group constraint preference
 long getGlobalRoomPreference()
          Overall room preference
 double getGlobalTimePreference()
          Overall time preference
 Vector getGroupConstraints()
          The list of all group constraints
 long getHardStudentConflicts()
          Overall hard student conflicts (student conflict between single section classes)
 Hashtable getInfo()
          Global info
 Vector getInstructorConstraints()
          The list of all instructor constraints
 long getInstructorDistancePreference()
          Overall instructor distance (back-to-back) preference
 long getInstructorWorstDistancePreference()
          The worst instructor distance (back-to-back) preference
 Vector getJenrlConstraints()
          The list of all jenrl constraints
static long getMaxCapacity(long nrStudents)
          Max capacity for too big rooms (3/2 of the number of students)
 DataProperties getProperties()
           
 Vector getRoomConstraints()
          The list of all room constraints
 long getStudentDistanceConflicts()
          Overall number of student conflicts caused by distancies (back-to-back classes are too far)
 long getUselessSlots()
          Overall number of useless time slots
 long getViolatedStudentConflicts()
          Number of student conflicts
 Counter getViolatedStudentConflictsCounter()
          Number of student conflicts
 Vector ignoredClasses()
          For MPP generator
 void removeConstraint(Constraint constraint)
          Removes a constraint from the model
 void saveBest()
          Save the current assignment as the best ever found assignment
 void setBestRoomPreference(long bestRoomPreference)
          Sets overall room preference of the best solution ever found
 void setBestTimePreference(double bestTimePreference)
          Sets overall time preference of the best solution ever found
 void switchStudents()
          Student final sectioning (switching students between sections of the same class in order to minimize overall number of student conflicts)
 String toString()
           
 
Methods inherited from class ifs.model.Model
addModelListener, addVariable, assignedVariables, beforeAssigned, beforeUnassigned, bestUnassignedVariables, conflictConstraints, conflictValues, constraints, countConstraints, countVariables, getBestPerturbations, getBestUnassignedVariables, getModelListeners, getTotalValue, init, modelListenerOfType, perturbVariables, removeModelListener, removeVariable, restoreBest, unassignedHardConstraints, unassignedVariables, variables, variablesWithoutInitialValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimetableModel

public TimetableModel(DataProperties properties)
Method Detail

ignoredClasses

public Vector ignoredClasses()
For MPP generator


getProperties

public DataProperties getProperties()

checkJenrl

public void checkJenrl()
Check validity of JENRL constraints from student enrollments


getGlobalRoomPreference

public long getGlobalRoomPreference()
Overall room preference


getGlobalTimePreference

public double getGlobalTimePreference()
Overall time preference


getViolatedStudentConflicts

public long getViolatedStudentConflicts()
Number of student conflicts


countViolatedStudentConflicts

public long countViolatedStudentConflicts()
Number of student conflicts


getViolatedStudentConflictsCounter

public Counter getViolatedStudentConflictsCounter()
Number of student conflicts


getGlobalGroupConstraintPreference

public long getGlobalGroupConstraintPreference()
Overall group constraint preference


getGlobalGroupConstraintPreferenceCounter

public Counter getGlobalGroupConstraintPreferenceCounter()
Overall group constraint preference


getBestRoomPreference

public long getBestRoomPreference()
Overall room preference of the best solution ever found


getBestTimePreference

public double getBestTimePreference()
Overall time preference of the best solution ever found


setBestRoomPreference

public void setBestRoomPreference(long bestRoomPreference)
Sets overall room preference of the best solution ever found


setBestTimePreference

public void setBestTimePreference(double bestTimePreference)
Sets overall time preference of the best solution ever found


getInstructorDistancePreference

public long getInstructorDistancePreference()
Overall instructor distance (back-to-back) preference


getInstructorWorstDistancePreference

public long getInstructorWorstDistancePreference()
The worst instructor distance (back-to-back) preference


getUselessSlots

public long getUselessSlots()
Overall number of useless time slots


getStudentDistanceConflicts

public long getStudentDistanceConflicts()
Overall number of student conflicts caused by distancies (back-to-back classes are too far)


getHardStudentConflicts

public long getHardStudentConflicts()
Overall hard student conflicts (student conflict between single section classes)


afterAssigned

public void afterAssigned(long iteration,
                          Value value)
When a value is assigned to a variable -- update gloval preferences

Overrides:
afterAssigned in class Model

afterUnassigned

public void afterUnassigned(long iteration,
                            Value value)
When a value is unassigned from a variable -- update gloval preferences

Overrides:
afterUnassigned in class Model

switchStudents

public void switchStudents()
Student final sectioning (switching students between sections of the same class in order to minimize overall number of student conflicts)


toString

public String toString()
Overrides:
toString in class Model

countTooBigRooms

public int countTooBigRooms()
Overall number of too big rooms (rooms with more than 3/2 seats than needed)


getDepartmentSpreadPenalty

public int getDepartmentSpreadPenalty()
Overall departmental spread penalty


getInfo

public Hashtable getInfo()
Global info

Overrides:
getInfo in class Model

bestTooBigRooms

public int bestTooBigRooms()
Overall number of too big rooms of the best solution ever found


bestUselessSlots

public long bestUselessSlots()
Overall number of useless slots of the best solution ever found


bestGlobalTimePreference

public double bestGlobalTimePreference()
Overall time preference of the best solution ever found


bestGlobalRoomPreference

public long bestGlobalRoomPreference()
Overall room preference of the best solution ever found


bestGlobalGroupConstraintPreference

public long bestGlobalGroupConstraintPreference()
Overall group constraint preference of the best solution ever found


bestViolatedStudentConflicts

public long bestViolatedStudentConflicts()
Overall number of student conflicts of the best solution ever found


bestHardStudentConflicts

public long bestHardStudentConflicts()
Overall number of student conflicts between single section classes of the best solution ever found


bestInstructorDistancePreference

public long bestInstructorDistancePreference()
Overall instructor distance preference of the best solution ever found


bestDepartmentSpreadPenalty

public int bestDepartmentSpreadPenalty()
Overall departmental spread penalty of the best solution ever found


saveBest

public void saveBest()
Description copied from class: Model
Save the current assignment as the best ever found assignment

Overrides:
saveBest in class Model

addConstraint

public void addConstraint(Constraint constraint)
Description copied from class: Model
Adds a constraint to the model

Overrides:
addConstraint in class Model

removeConstraint

public void removeConstraint(Constraint constraint)
Description copied from class: Model
Removes a constraint from the model

Overrides:
removeConstraint in class Model

getInstructorConstraints

public Vector getInstructorConstraints()
The list of all instructor constraints


getGroupConstraints

public Vector getGroupConstraints()
The list of all group constraints


getJenrlConstraints

public Vector getJenrlConstraints()
The list of all jenrl constraints


getRoomConstraints

public Vector getRoomConstraints()
The list of all room constraints


getDepartmentSpreadConstraints

public Vector getDepartmentSpreadConstraints()
The list of all departmental spread constraints


getMaxCapacity

public static long getMaxCapacity(long nrStudents)
Max capacity for too big rooms (3/2 of the number of students)



Copyright © 2005 Tomáš Müller