|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.model.Model net.sf.cpsolver.ifs.constant.ConstantModel net.sf.cpsolver.coursett.model.TimetableModel
public class TimetableModel
Timetable model.
Field Summary |
---|
Fields inherited from class net.sf.cpsolver.ifs.model.Model |
---|
iAssignedVariables, iPerturbVariables, iUnassignedVariables, sPercentageFormat, sTimeFormat |
Constructor Summary | |
---|---|
TimetableModel(DataProperties properties)
|
Method Summary | |
---|---|
void |
addConstraint(Constraint constraint)
Adds a constraint to the model |
void |
addStudent(Student student)
|
void |
addVariable(Variable variable)
Adds a variable 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 |
bestCommitedStudentConflicts()
|
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 |
bestSpreadPenalty()
|
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 |
int |
countCommitedStudentConflicts()
|
long |
countHardStudentConflicts()
|
long |
countStudentDistanceConflicts()
|
int |
countTooBigRooms()
Overall number of too big rooms (rooms with more than 3/2 seats than needed) |
long |
countViolatedStudentConflicts()
Number of student conflicts |
Set |
getAllStudents()
|
Hashtable |
getBounds()
|
long |
getBrokenTimePatterns()
Overall number of useless time slots |
Vector |
getClassLimitConstraints()
|
int |
getCommitedStudentConflicts()
|
Counter |
getCommittedStudentConflictsCounter()
|
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 |
Hashtable |
getInfo(Vector variables)
Returns information about the current solution. |
Vector |
getInstructorConstraints()
The list of all instructor constraints |
double |
getInstructorDiscouragedLimit()
|
long |
getInstructorDistancePreference()
Overall instructor distance (back-to-back) preference |
double |
getInstructorNoPreferenceLimit()
|
double |
getInstructorProhibitedLimit()
|
long |
getInstructorWorstDistancePreference()
The worst instructor distance (back-to-back) preference |
Vector |
getJenrlConstraints()
The list of all jenrl constraints |
static String |
getMem()
Returns amount of allocated memory. |
PerturbationsCounter |
getPerturbationsCounter()
|
DataProperties |
getProperties()
|
Vector |
getRoomConstraints()
The list of all room constraints |
Vector |
getSpreadConstraints()
|
int |
getSpreadPenalty()
Overall spread penalty |
long |
getStudentDistanceConflicts()
Overall number of student conflicts caused by distancies (back-to-back classes are too far) |
double |
getStudentDistanceLimit()
|
double |
getStudentDistanceLimit75min()
|
TimetableComparator |
getTimetableComparator()
|
double |
getTotalValue()
Max capacity for too big rooms (3/2 of the number of students) |
double |
getTotalValue(Vector variables)
Value of the current solution. |
long |
getUselessHalfHours()
Overall number of useless time slots |
long |
getUselessSlots()
Overall number of useless time slots |
Counter |
getViolatedDistanceStudentConflictsCounter()
|
Counter |
getViolatedHardStudentConflictsCounter()
|
long |
getViolatedStudentConflicts()
Number of student conflicts |
Counter |
getViolatedStudentConflictsCounter()
Number of student conflicts |
int |
getYear()
|
boolean |
init(Solver solver)
Model initialization |
void |
removeConstraint(Constraint constraint)
Removes a constraint from the model |
void |
removeStudent(Student student)
|
void |
removeVariable(Variable variable)
Removes a variable from the model |
void |
saveBest()
Save the current assignment as the best ever found assignment |
void |
setYear(int year)
|
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 net.sf.cpsolver.ifs.constant.ConstantModel |
---|
beforeAssigned, beforeUnassigned, constantVariables, hasConstantVariables, isConstant |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimetableModel(DataProperties properties)
Method Detail |
---|
public double getInstructorNoPreferenceLimit()
public double getInstructorDiscouragedLimit()
public double getInstructorProhibitedLimit()
public double getStudentDistanceLimit()
public double getStudentDistanceLimit75min()
public boolean init(Solver solver)
Model
init
in class Model
public void addVariable(Variable variable)
ConstantModel
addVariable
in class ConstantModel
public void removeVariable(Variable variable)
ConstantModel
removeVariable
in class ConstantModel
public DataProperties getProperties()
public long getGlobalRoomPreference()
public double getGlobalTimePreference()
public long getViolatedStudentConflicts()
public long countViolatedStudentConflicts()
public Counter getViolatedStudentConflictsCounter()
public Counter getViolatedHardStudentConflictsCounter()
public Counter getViolatedDistanceStudentConflictsCounter()
public long getGlobalGroupConstraintPreference()
public Counter getGlobalGroupConstraintPreferenceCounter()
public long getInstructorDistancePreference()
public long getInstructorWorstDistancePreference()
public long getUselessSlots()
public long getUselessHalfHours()
public long getBrokenTimePatterns()
public long getStudentDistanceConflicts()
public long countStudentDistanceConflicts()
public long getHardStudentConflicts()
public long countHardStudentConflicts()
public Counter getCommittedStudentConflictsCounter()
public int getCommitedStudentConflicts()
public int countCommitedStudentConflicts()
public void afterAssigned(long iteration, Value value)
afterAssigned
in class ConstantModel
public void afterUnassigned(long iteration, Value value)
afterUnassigned
in class ConstantModel
public void switchStudents()
public String toString()
toString
in class Model
public int countTooBigRooms()
public int getDepartmentSpreadPenalty()
public int getSpreadPenalty()
public Hashtable getBounds()
public Hashtable getInfo()
getInfo
in class Model
public Hashtable getInfo(Vector variables)
Model
getInfo
in class Model
public int bestTooBigRooms()
public long bestUselessSlots()
public double bestGlobalTimePreference()
public long bestGlobalRoomPreference()
public long bestGlobalGroupConstraintPreference()
public long bestViolatedStudentConflicts()
public long bestHardStudentConflicts()
public long bestInstructorDistancePreference()
public int bestDepartmentSpreadPenalty()
public int bestSpreadPenalty()
public int bestCommitedStudentConflicts()
public void saveBest()
Model
saveBest
in class Model
public void addConstraint(Constraint constraint)
Model
addConstraint
in class Model
public void removeConstraint(Constraint constraint)
Model
removeConstraint
in class Model
public Vector getInstructorConstraints()
public Vector getGroupConstraints()
public Vector getJenrlConstraints()
public Vector getRoomConstraints()
public Vector getDepartmentSpreadConstraints()
public Vector getSpreadConstraints()
public Vector getClassLimitConstraints()
public double getTotalValue()
getTotalValue
in class Model
public double getTotalValue(Vector variables)
Model
Value.toDouble()
.
Only variables from the given set are considered.
getTotalValue
in class Model
public int getYear()
public void setYear(int year)
public TimetableComparator getTimetableComparator()
public PerturbationsCounter getPerturbationsCounter()
public Set getAllStudents()
public void addStudent(Student student)
public void removeStudent(Student student)
public static String getMem()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |