public class TimetableModel extends ConstantModel<Lecture,Placement>
sPercentageFormat, sTimeFormat
Constructor and Description |
---|
TimetableModel(DataProperties properties) |
Modifier and Type | Method and Description |
---|---|
void |
addConstraint(Constraint<Lecture,Placement> constraint)
Adds a constraint to the model
|
void |
addStudent(Student student) |
Set<Placement> |
conflictValuesSkipWeakeningConstraints(Assignment<Lecture,Placement> assignment,
Placement value)
Returns the set of conflicting variables with this value, if it is
assigned to its variable.
|
Set<Student> |
getAllStudents() |
Map<String,String> |
getBounds(Assignment<Lecture,Placement> assignment) |
List<ClassLimitConstraint> |
getClassLimitConstraints() |
List<DepartmentSpreadConstraint> |
getDepartmentSpreadConstraints()
The list of all departmental spread constraints
|
DistanceMetric |
getDistanceMetric() |
List<FlexibleConstraint> |
getFlexibleConstraints() |
List<GroupConstraint> |
getGroupConstraints()
The list of all group constraints
|
Map<String,String> |
getInfo(Assignment<Lecture,Placement> assignment)
Global info
|
Map<String,String> |
getInfo(Assignment<Lecture,Placement> assignment,
Collection<Lecture> variables)
Returns information about the current solution.
|
List<InstructorConstraint> |
getInstructorConstraints()
The list of all instructor constraints
|
List<JenrlConstraint> |
getJenrlConstraints()
The list of all jenrl constraints
|
static String |
getMem()
Returns amount of allocated memory.
|
DataProperties |
getProperties() |
List<RoomConstraint> |
getRoomConstraints()
The list of all room constraints
|
List<SpreadConstraint> |
getSpreadConstraints() |
StudentSectioning |
getStudentSectioning()
Returns interface to the student sectioning functions needed during course timetabling.
|
double |
getTotalValue(Assignment<Lecture,Placement> assignment)
Value of the current solution.
|
double |
getTotalValue(Assignment<Lecture,Placement> assignment,
Collection<Lecture> variables)
Value of the current solution.
|
List<BitSet> |
getWeeks()
The method creates date patterns (bitsets) which represent the weeks of a
semester.
|
int |
getYear() |
void |
removeConstraint(Constraint<Lecture,Placement> constraint)
Removes a constraint from the model
|
void |
removeStudent(Student student) |
void |
setYear(int year) |
void |
switchStudents(Assignment<Lecture,Placement> assignment)
Student final sectioning (switching students between sections of the same
class in order to minimize overall number of student conflicts)
|
addVariable, afterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, constantVariables, hasConstantVariables, isConstant, removeVariable
addCriterion, addGlobalConstraint, addModelListener, afterAssigned, afterUnassigned, assignedVariables, assignedVariables, beforeAssigned, beforeUnassigned, bestUnassignedVariables, bestUnassignedVariables, clearAssignmentContexts, clearBest, conflictConstraints, conflictValues, conflictValues, constraints, countConstraints, countGlobalConstraints, countVariables, createAssignmentContexts, createInheritedAssignment, createReference, getBestPerturbations, getBestUnassignedVariables, getBestValue, getCriteria, getCriterion, getDefaultAssignment, getEmptyAssignment, getExtendedInfo, getExtendedInfo, getInfo, getInfo, getInfoProviders, getModelListeners, getPerc, getPercRev, getTotalValue, getTotalValue, globalConstraints, inConflict, inConflict, init, invalidateVariablesWithInitialValueCache, modelListenerOfType, nrAssignedVariables, nrAssignedVariables, nrUnassignedVariables, nrUnassignedVariables, perturbVariables, perturbVariables, perturbVariables, perturbVariables, removeCriterion, removeCriterion, removeGlobalConstraint, removeModelListener, removeReference, restoreBest, restoreBest, restoreBest, saveBest, saveBest, setBestValue, setDefaultAssignment, toString, toString, unassignedHardConstraints, unassignedVariables, unassignedVariables, variables, variablesWithInitialValue, weaken
public TimetableModel(DataProperties properties)
public DistanceMetric getDistanceMetric()
public StudentSectioning getStudentSectioning()
DefaultStudentSectioning
, can be changed using the StudentSectioning.Class parameter.public DataProperties getProperties()
public void switchStudents(Assignment<Lecture,Placement> assignment)
assignment
- current assignmentpublic Map<String,String> getInfo(Assignment<Lecture,Placement> assignment, Collection<Lecture> variables)
Model
public void addConstraint(Constraint<Lecture,Placement> constraint)
Model
addConstraint
in class Model<Lecture,Placement>
constraint
- a constraintpublic void removeConstraint(Constraint<Lecture,Placement> constraint)
Model
removeConstraint
in class Model<Lecture,Placement>
constraint
- a constraintpublic List<InstructorConstraint> getInstructorConstraints()
public List<GroupConstraint> getGroupConstraints()
public List<JenrlConstraint> getJenrlConstraints()
public List<RoomConstraint> getRoomConstraints()
public List<DepartmentSpreadConstraint> getDepartmentSpreadConstraints()
public List<SpreadConstraint> getSpreadConstraints()
public List<ClassLimitConstraint> getClassLimitConstraints()
public List<FlexibleConstraint> getFlexibleConstraints()
public double getTotalValue(Assignment<Lecture,Placement> assignment)
Model
Value.toDouble(Assignment)
.getTotalValue
in class Model<Lecture,Placement>
assignment
- current assignmentpublic double getTotalValue(Assignment<Lecture,Placement> assignment, Collection<Lecture> variables)
Model
Value.toDouble(Assignment)
. Only variables from the given set are
considered.getTotalValue
in class Model<Lecture,Placement>
assignment
- current assignmentvariables
- sub-problempublic int getYear()
public void setYear(int year)
public Set<Student> getAllStudents()
public void addStudent(Student student)
public void removeStudent(Student student)
public static String getMem()
public Set<Placement> conflictValuesSkipWeakeningConstraints(Assignment<Lecture,Placement> assignment, Placement value)
WeakeningConstraint
are ignored.assignment
- current assignmentvalue
- placement that is being consideredCopyright © 2016 UniTime LLC. All Rights Reserved.