|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.ifs.model.Variable<Lecture,Placement>
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,
List<TimeLocation> timeLocations,
List<RoomLocation> roomLocations,
int nrRooms,
Placement initialPlacement,
int minClassLimit,
int maxClassLimit,
double room2limitRatio)
Constructor |
|
Lecture(Long id,
Long solverGroupId,
String name)
|
Method Summary | |
---|---|
Set<JenrlConstraint> |
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<Lecture,Placement> constraint)
Adds a constraint. |
void |
addStudent(Student student)
Add an enrolled student |
boolean |
allowBreakHard()
|
boolean |
areStudentConflictsHard(Lecture other)
|
boolean |
canShareRoom()
|
boolean |
canShareRoom(Lecture other)
|
Set<GroupConstraint> |
canShareRoomConstraints()
|
int |
classLimit()
|
int |
classLimit(Placement assignment,
Set<Placement> conflicts)
|
void |
clearIgnoreStudentConflictsWithCache()
|
void |
clearValueCache()
|
int |
compareTo(Lecture o)
|
List<Placement> |
computeValues(boolean allowBreakHard)
Domain -- all combinations of room and time locations |
List<Lecture> |
conflictLectures(Student student)
Lectures different from this one, where it is student conflict of the given student between this and the lecture |
Set<Student> |
conflictStudents()
List of students of this class which are in conflict with any other assignment |
Set<Student> |
conflictStudents(Placement value)
List of students of this class in conflict with the given assignment |
int |
countCommittedStudentConflicts(Placement value)
|
int |
countCommittedStudentConflictsOfTheSameProblem(Placement value)
|
int |
countDistanceStudentConflicts(Placement value)
|
int |
countDistanceStudentConflictsOfTheSameProblem(Placement value)
|
int |
countHardStudentConflicts(Placement value)
|
int |
countHardStudentConflictsOfTheSameProblem(Placement value)
|
int |
countInitialStudentConflicts()
Number of student conflicts caused by the initial assignment of this lecture |
int |
countStudentConflicts(Placement value)
Number of student conflicts caused by the given assignment of this lecture |
int |
countStudentConflictsOfTheSameProblem(Placement value)
|
boolean |
equals(Object o)
|
int |
getBestRoomPreference()
Best room preference of this lecture |
double |
getBestTimePreference()
|
Lecture |
getChild(Student student,
Long subpartId)
|
List<Lecture> |
getChildren(Long subpartId)
|
Set<Long> |
getChildrenSubpartIds()
|
Long |
getClassId()
Class id |
ClassLimitConstraint |
getClassLimitConstraint()
|
int |
getCommitedConflicts(Placement placement)
|
Configuration |
getConfiguration()
|
Long |
getDepartment()
Controlling Course Offering Department |
DepartmentSpreadConstraint |
getDeptSpreadConstraint()
Departmental spreading constraint |
Set<FlexibleConstraint> |
getFlexibleGroupConstraints()
|
long |
getId()
Class id |
Map<Lecture,Long> |
getInitialStudentConflicts()
Table of student conflicts caused by the initial assignment of this lecture in format (another lecture, number) |
List<InstructorConstraint> |
getInstructorConstraints()
Instructor constraint |
String |
getInstructorName()
|
List<String> |
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<SpreadConstraint> |
getSpreadConstraints()
|
int |
getSpreadPenalty()
|
String |
getValuesString()
|
Set<Constraint<Lecture,Placement>> |
getWeakeningConstraints()
|
Set<GroupConstraint> |
groupConstraints()
|
Set<GroupConstraint> |
hardGroupSoftConstraints()
|
boolean |
hasAnyChildren()
|
boolean |
hasChildren(Long subpartId)
|
int |
hashCode()
|
boolean |
hasParent()
|
boolean |
hasStudent(Student student)
Returns true if the given student is enrolled |
Set<Student> |
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 |
isToIgnoreStudentConflictsWith(Lecture other)
Returns true if there is IgnoreStudentConflictsConstraint between the two lectures. |
boolean |
isValid(Placement placement)
|
JenrlConstraint |
jenrlConstraint(Lecture another)
All JENRL constraints of this lecture |
List<JenrlConstraint> |
jenrlConstraints()
|
int |
maxAchievableClassLimit()
|
int |
maxClassLimit()
|
int |
maxRoomSize()
|
int |
maxRoomUse()
|
int |
minClassLimit()
|
int |
minRoomSize()
|
int |
minRoomUse()
|
int |
nrRoomLocations()
|
int |
nrTimeLocations()
|
int |
nrValues()
|
int |
nrValues(List<RoomLocation> rooms)
|
int |
nrValues(RoomLocation room)
|
int |
nrValues(TimeLocation time)
|
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<Lecture,Placement> constraint)
Removes a constraint. |
void |
removeStudent(Student student)
|
List<RoomLocation> |
roomLocations()
All room locations |
double |
roomToLimitRatio()
|
Set<Student> |
sameStudents(Lecture lecture)
List of students enrolled in this class as well as in the given class |
List<Lecture> |
sameStudentsLectures()
|
List<Lecture> |
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(List<Lecture> sameSubpartLectures)
Set of lectures of the same class (only section is different) |
void |
setScheduler(Long scheduler)
Scheduler (Managing Department) |
Set<Student> |
students()
List of enrolled students |
List<TimeLocation> |
timeLocations()
All time locations |
String |
toString()
|
List<Placement> |
values()
All values |
Methods inherited from class net.sf.cpsolver.ifs.model.Variable |
---|
addVariableListener, assign, 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, unassign |
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, List<TimeLocation> timeLocations, List<RoomLocation> 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<JenrlConstraint> activeJenrls()
public void removeActiveJenrl(JenrlConstraint constr)
public Long getClassId()
public Long getSchedulingSubpartId()
public String getName()
getName
in class Variable<Lecture,Placement>
public long getId()
getId
in class Variable<Lecture,Placement>
public List<String> getInstructorNames()
public String getInstructorName()
public Set<Student> students()
public double nrWeightedStudents()
public void addStudent(Student student)
public void removeStudent(Student student)
public boolean hasStudent(Student student)
public void setSameSubpartLectures(List<Lecture> sameSubpartLectures)
public List<Lecture> sameSubpartLectures()
public Set<Student> sameStudents(Lecture lecture)
public Set<Student> conflictStudents(Placement value)
public Set<Student> conflictStudents()
public List<Lecture> conflictLectures(Student student)
public int isInConflict(Student student)
public List<Placement> computeValues(boolean allowBreakHard)
public void clearValueCache()
public List<Placement> values()
values
in class Variable<Lecture,Placement>
public boolean equals(Object o)
equals
in class Variable<Lecture,Placement>
public double getBestTimePreference()
public int getBestRoomPreference()
public int countStudentConflicts(Placement value)
public int countStudentConflictsOfTheSameProblem(Placement value)
public int countHardStudentConflicts(Placement value)
public int countCommittedStudentConflictsOfTheSameProblem(Placement value)
public int countCommittedStudentConflicts(Placement value)
public int countHardStudentConflictsOfTheSameProblem(Placement value)
public int countDistanceStudentConflicts(Placement value)
public int countDistanceStudentConflictsOfTheSameProblem(Placement value)
public int countInitialStudentConflicts()
public Map<Lecture,Long> getInitialStudentConflicts()
public Set<Student> initialStudentConflicts()
public void addContstraint(Constraint<Lecture,Placement> constraint)
Variable
Model.addConstraint(Constraint)
is called.
addContstraint
in class Variable<Lecture,Placement>
constraint
- added constraintpublic void removeContstraint(Constraint<Lecture,Placement> constraint)
Variable
Model.removeConstraint(Constraint)
is
called.
removeContstraint
in class Variable<Lecture,Placement>
constraint
- added constraintpublic JenrlConstraint jenrlConstraint(Lecture another)
public List<JenrlConstraint> jenrlConstraints()
public int minClassLimit()
public int maxClassLimit()
public int maxAchievableClassLimit()
public int classLimit()
public int classLimit(Placement assignment, Set<Placement> conflicts)
public double roomToLimitRatio()
public int minRoomUse()
public int maxRoomUse()
public String toString()
toString
in class Variable<Lecture,Placement>
public String getValuesString()
public Long getDepartment()
public void setDepartment(Long dept)
public Long getScheduler()
public void setScheduler(Long scheduler)
public DepartmentSpreadConstraint getDeptSpreadConstraint()
public List<InstructorConstraint> getInstructorConstraints()
public ClassLimitConstraint getClassLimitConstraint()
public Set<SpreadConstraint> getSpreadConstraints()
public Set<FlexibleConstraint> getFlexibleGroupConstraints()
public Set<Constraint<Lecture,Placement>> getWeakeningConstraints()
public List<RoomLocation> roomLocations()
public List<TimeLocation> timeLocations()
public int nrTimeLocations()
public int nrRoomLocations()
public int nrValues()
public int nrValues(TimeLocation time)
public int nrValues(RoomLocation room)
public int nrValues(List<RoomLocation> 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 List<Lecture> getChildren(Long subpartId)
public Set<Long> getChildrenSubpartIds()
public boolean isSingleSection()
public List<Lecture> sameStudentsLectures()
public Lecture getChild(Student student, Long subpartId)
public int getCommitedConflicts(Placement placement)
public Set<GroupConstraint> hardGroupSoftConstraints()
public Set<GroupConstraint> groupConstraints()
public int minRoomSize()
public int maxRoomSize()
public boolean canShareRoom()
public boolean canShareRoom(Lecture other)
public Set<GroupConstraint> 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<Lecture,Placement>
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(Lecture o)
compareTo
in interface Comparable<Lecture>
compareTo
in class Variable<Lecture,Placement>
public String getNote()
public void setNote(String note)
public boolean areStudentConflictsHard(Lecture other)
public void clearIgnoreStudentConflictsWithCache()
public boolean isToIgnoreStudentConflictsWith(Lecture other)
IgnoreStudentConflictsConstraint
between the two lectures.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |