|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.model.Variable net.sf.cpsolver.coursett.model.Lecture
public class Lecture
Lecture (variable).
Field Summary | |
---|---|
boolean |
iCommitted
|
static boolean |
sAllowBreakHard
|
static boolean |
sSaveMemory
|
Fields inherited from class net.sf.cpsolver.ifs.model.Variable |
---|
iId, iValue |
Constructor Summary | |
---|---|
Lecture(Long id,
Long solverGroupId,
Long schedulingSubpartId,
String name,
Vector timeLocations,
Vector roomLocations,
int nrRooms,
Placement initialPlacement,
int minClassLimit,
int maxClassLimit,
double room2limitRatio)
Constructor |
|
Lecture(Long id,
Long solverGroupId,
String name)
|
Method Summary | |
---|---|
Set |
activeJenrls()
Active jenrl constraints (active mean that there is at least one student between its classes) |
void |
addActiveJenrl(JenrlConstraint constr)
Add active jenrl constraint (active mean that there is at least one student between its classes) |
void |
addContstraint(Constraint constraint)
Adds a constraint. |
void |
addStudent(Student student)
Add an enrolled student |
boolean |
allowBreakHard()
|
boolean |
areStudentConflictsHard(Lecture lecture)
|
void |
assign(long iteration,
Value value)
Assign value to this variable. |
boolean |
canShareRoom()
|
boolean |
canShareRoom(Lecture other)
|
Set |
canShareRoomConstraints()
|
int |
classLimit()
|
int |
classLimit(Placement assignment,
Set conflicts)
|
int |
compareTo(Object o)
|
Vector |
computeValues(boolean allowBreakHard)
Domain -- all combinations of room and time locations |
Vector |
conflictLectures(Student student)
Lectures different from this one, where it is student conflict of the given student between this and the lecture |
Set |
conflictStudents()
List of students of this class which are in conflict with any other assignment |
Set |
conflictStudents(Value value)
List of students of this class in conflict with the given assignment |
int |
countDistanceStudentConflicts(Value value)
|
int |
countDistanceStudentConflictsOfTheSameProblem(Value value)
|
int |
countHardStudentConflicts(Value value)
|
int |
countHardStudentConflictsOfTheSameProblem(Value value)
|
int |
countInitialStudentConflicts()
Number of student conflicts caused by the initial assignment of this lecture |
int |
countStudentConflicts(Value value)
Number of student conflicts caused by the given assignment of this lecture |
int |
countStudentConflictsOfTheSameProblem(Value value)
|
boolean |
equals(Object o)
|
int |
getBestRoomPreference()
Best room preference of this lecture |
double |
getBestTimePreference()
|
Lecture |
getChild(Student student,
Long subpartId)
|
Vector |
getChildren(Long subpartId)
|
Enumeration |
getChildrenSubpartIds()
|
Long |
getClassId()
Class id |
ClassLimitConstraint |
getClassLimitConstraint()
|
int |
getCommitedConflicts(Placement placement)
|
Configuration |
getConfiguration()
|
Long |
getDepartment()
Controlling Course Offering Department |
DepartmentSpreadConstraint |
getDeptSpreadConstraint()
Departmental spreading constraint |
long |
getDiscouragedRoomSize()
|
long |
getId()
Class id |
Hashtable |
getInitialStudentConflicts()
Table of student conflicts caused by the initial assignment of this lecture in format (another lecture, number) |
Vector |
getInstructorConstraints()
Instructor constraint |
String |
getInstructorName()
|
Vector |
getInstructorNames()
Instructor name |
int[] |
getMinMaxRoomPreference()
|
double[] |
getMinMaxTimePreference()
|
String |
getName()
Class name |
String |
getNote()
|
String |
getNotValidReason(Placement placement)
|
int |
getNrRooms()
|
int |
getOrd()
|
Lecture |
getParent()
|
Long |
getScheduler()
Scheduler (Managing Department) |
Long |
getSchedulingSubpartId()
|
Long |
getSolverGroupId()
|
Set |
getSpreadConstraints()
|
int |
getSpreadPenalty()
|
long |
getStronglyDiscouragedRoomSize()
|
String |
getValuesString()
|
Set |
getWeakeningConstraints()
|
Set |
groupConstraints()
|
Set |
hardGroupSoftConstraints()
|
boolean |
hasAnyChildren()
|
boolean |
hasChildren(Long subpartId)
|
int |
hashCode()
|
boolean |
hasParent()
|
boolean |
hasStudent(Student student)
Returns true if the given student is enrolled |
Set |
initialStudentConflicts()
List of student conflicts caused by the initial assignment of this lecture |
boolean |
isCommitted()
|
boolean |
isConstant()
True, if the variable is constant. |
int |
isInConflict(Student student)
True if this lecture is in a student conflict with the given student |
boolean |
isSingleSection()
|
boolean |
isSingleton()
|
boolean |
isValid(Placement placement)
|
JenrlConstraint |
jenrlConstraint(Lecture another)
All JENRL constraints of this lecture |
Enumeration |
jenrlConstraints()
|
int |
maxAchievableClassLimit()
|
int |
maxClassLimit()
|
int |
maxRoomSize()
|
int |
maxRoomUse()
|
int |
minClassLimit()
|
int |
minRoomSize()
|
int |
minRoomUse()
|
int |
nrRoomLocations()
|
int |
nrTimeLocations()
|
int |
nrValues()
|
int |
nrValues(RoomLocation room)
|
int |
nrValues(TimeLocation time)
|
int |
nrValues(Vector rooms)
|
double |
nrWeightedStudents()
|
void |
purgeInvalidValues(boolean interactiveMode)
|
void |
removeActiveJenrl(JenrlConstraint constr)
Remove active jenrl constraint (active mean that there is at least one student between its classes) |
void |
removeContstraint(Constraint constraint)
Removes a constraint. |
void |
removeStudent(Student student)
|
Vector |
roomLocations()
All room locations |
double |
roomToLimitRatio()
|
Set |
sameStudents(Lecture lecture)
List of students enrolled in this class as well as in the given class |
Vector |
sameStudentsLectures()
|
Vector |
sameSubpartLectures()
Set of lectures of the same class (only section is different) |
void |
setCommitted(boolean committed)
|
void |
setConfiguration(Configuration configuration)
|
void |
setDepartment(Long dept)
Controlling Course Offering Department |
void |
setNote(String note)
|
void |
setOrd(int ord)
|
void |
setParent(Lecture parent)
|
void |
setSameSubpartLectures(Vector sameSubpartLectures)
Set of lectures of the same class (only section is different) |
void |
setScheduler(Long scheduler)
Scheduler (Managing Department) |
Set |
students()
List of enrolled students |
Vector |
timeLocations()
All time locations |
String |
toString()
|
void |
unassign(long iteration)
Unassign value from this variable. |
Vector |
values()
All values |
Methods inherited from class net.sf.cpsolver.ifs.model.Variable |
---|
addVariableListener, constraints, constraintVariables, countAssignments, getAssignment, getBestAssignment, getBestAssignmentIteration, getDescription, getExtra, getInitialAssignment, getModel, getVariableListeners, hardConstraints, hasAssignment, hasInitialAssignment, hasValues, lastAssignmentIteration, lastUnassignmentIteration, removeInitialValue, removeValue, removeVariableListener, setBestAssignment, setExtra, setInitialAssignment, setModel, setValues, softConstraints |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean iCommitted
public static boolean sSaveMemory
public static boolean sAllowBreakHard
Constructor Detail |
---|
public Lecture(Long id, Long solverGroupId, Long schedulingSubpartId, String name, Vector timeLocations, Vector roomLocations, int nrRooms, Placement initialPlacement, int minClassLimit, int maxClassLimit, double room2limitRatio)
id
- unique identificationname
- class nametimeLocations
- set of time locationsroomLocations
- set of room locationinitialPlacement
- initial placementpublic Lecture(Long id, Long solverGroupId, String name)
Method Detail |
---|
public Long getSolverGroupId()
public void addActiveJenrl(JenrlConstraint constr)
public Set activeJenrls()
public void removeActiveJenrl(JenrlConstraint constr)
public Long getClassId()
public Long getSchedulingSubpartId()
public String getName()
getName
in class Variable
public long getId()
getId
in class Variable
public Vector getInstructorNames()
public String getInstructorName()
public Set students()
public double nrWeightedStudents()
public void addStudent(Student student)
public void removeStudent(Student student)
public boolean hasStudent(Student student)
public void setSameSubpartLectures(Vector sameSubpartLectures)
public Vector sameSubpartLectures()
public Set sameStudents(Lecture lecture)
public Set conflictStudents(Value value)
public Set conflictStudents()
public Vector conflictLectures(Student student)
public int isInConflict(Student student)
public Vector computeValues(boolean allowBreakHard)
public Vector values()
values
in class Variable
public boolean equals(Object o)
equals
in class Variable
public double getBestTimePreference()
public int getBestRoomPreference()
public int countStudentConflicts(Value value)
public int countStudentConflictsOfTheSameProblem(Value value)
public int countHardStudentConflicts(Value value)
public int countHardStudentConflictsOfTheSameProblem(Value value)
public int countDistanceStudentConflicts(Value value)
public int countDistanceStudentConflictsOfTheSameProblem(Value value)
public int countInitialStudentConflicts()
public Hashtable getInitialStudentConflicts()
public Set initialStudentConflicts()
public void addContstraint(Constraint constraint)
Variable
Model.addConstraint(Constraint)
is called.
addContstraint
in class Variable
constraint
- added constraintpublic void removeContstraint(Constraint constraint)
Variable
Model.removeConstraint(Constraint)
is called.
removeContstraint
in class Variable
constraint
- added constraintpublic JenrlConstraint jenrlConstraint(Lecture another)
public Enumeration jenrlConstraints()
public int minClassLimit()
public int maxClassLimit()
public int maxAchievableClassLimit()
public int classLimit()
public int classLimit(Placement assignment, Set conflicts)
public double roomToLimitRatio()
public int minRoomUse()
public int maxRoomUse()
public String toString()
toString
in class Variable
public String getValuesString()
public Long getDepartment()
public void setDepartment(Long dept)
public Long getScheduler()
public void setScheduler(Long scheduler)
public DepartmentSpreadConstraint getDeptSpreadConstraint()
public Vector getInstructorConstraints()
public ClassLimitConstraint getClassLimitConstraint()
public Set getSpreadConstraints()
public Set getWeakeningConstraints()
public Vector roomLocations()
public Vector timeLocations()
public int nrTimeLocations()
public int nrRoomLocations()
public int nrValues()
public int nrValues(TimeLocation time)
public int nrValues(RoomLocation room)
public int nrValues(Vector rooms)
public boolean allowBreakHard()
public int getNrRooms()
public Lecture getParent()
public void setParent(Lecture parent)
public boolean hasParent()
public boolean hasChildren(Long subpartId)
public boolean hasAnyChildren()
public Vector getChildren(Long subpartId)
public Enumeration getChildrenSubpartIds()
public boolean isSingleSection()
public boolean areStudentConflictsHard(Lecture lecture)
public Vector sameStudentsLectures()
public Lecture getChild(Student student, Long subpartId)
public int getCommitedConflicts(Placement placement)
public void assign(long iteration, Value value)
Variable
assign
in class Variable
iteration
- current iterationvalue
- the value to be assignedpublic void unassign(long iteration)
Variable
unassign
in class Variable
iteration
- current iterationpublic Set hardGroupSoftConstraints()
public Set groupConstraints()
public int minRoomSize()
public int maxRoomSize()
public long getDiscouragedRoomSize()
public long getStronglyDiscouragedRoomSize()
public boolean canShareRoom()
public boolean canShareRoom(Lecture other)
public Set canShareRoomConstraints()
public boolean isSingleton()
public boolean isValid(Placement placement)
public String getNotValidReason(Placement placement)
public void purgeInvalidValues(boolean interactiveMode)
public void setCommitted(boolean committed)
public boolean isCommitted()
public boolean isConstant()
ConstantVariable
isConstant
in interface ConstantVariable
public int getSpreadPenalty()
public int hashCode()
hashCode
in class Variable
public Configuration getConfiguration()
public void setConfiguration(Configuration configuration)
public int[] getMinMaxRoomPreference()
public double[] getMinMaxTimePreference()
public void setOrd(int ord)
public int getOrd()
public int compareTo(Object o)
compareTo
in interface Comparable
compareTo
in class Variable
public String getNote()
public void setNote(String note)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |