|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.ifs.model.Value<Request,Enrollment>
net.sf.cpsolver.studentsct.model.Enrollment
public class Enrollment
Representation of an enrollment of a student into a course. A student needs
to be enrolled in a section of each subpart of a selected configuration. When
parent-child relation is defined among sections, if a student is enrolled in
a section that has a parent section defined, he/she has be enrolled in the
parent section as well. Also, the selected sections cannot overlap in time.
Field Summary |
---|
Fields inherited from class net.sf.cpsolver.ifs.model.Value |
---|
iValue |
Constructor Summary | |
---|---|
Enrollment(Request request,
int priority,
Config config,
Set<? extends Assignment> assignments)
Constructor |
|
Enrollment(Request request,
int priority,
Course course,
Config config,
Set<? extends Assignment> assignments,
Reservation reservation)
Constructor |
Method Summary | |
---|---|
Set<DistanceConflict.Conflict> |
distanceConflicts()
Distance conflicts, in which this enrollment is involved. |
boolean |
equals(Object o)
By default, comparison is made on unique ids |
String |
getApproval()
Approval of the enrollment (only used by the online student sectioning) |
Set<Assignment> |
getAssignments()
List of assignments (selected sections) |
Config |
getConfig()
Config of the course request |
Course |
getCourse()
Course of the course request |
int |
getLimit()
Enrollment limit, i.e., the number of students that would be able to get into the offering using this enrollment (if all the sections are empty) |
String |
getName()
Enrollment name |
int |
getNrSlots()
Return total number of slots of all sections in the enrollment. |
Offering |
getOffering()
Offering of the course request |
double |
getPenalty()
Enrollment penalty -- sum of section penalties (see Section.getPenalty() ) |
int |
getPriority()
Return enrollment priority |
Request |
getRequest()
Request |
Reservation |
getReservation()
Return reservation used for this enrollment |
Set<Section> |
getSections()
List of sections (only for course request) |
Student |
getStudent()
Student |
Long |
getTimeStamp()
Time stamp of the enrollment |
void |
guessReservation(boolean onlyAvailable)
Guess the reservation based on the enrollment |
boolean |
isAllowOverlap()
True if this enrollment can overlap with other enrollments of the student. |
boolean |
isCourseRequest()
True if the request is course request |
boolean |
isOverlapping(Enrollment enrl)
True when this enrollment is overlapping with the given enrollment |
boolean |
isSelected()
True if all the sections are selected |
boolean |
isWaitlisted()
True if all the sections are wait-listed |
double |
percentInitial()
Percent of sections that are initial |
double |
percentSelected()
Percent of sections that are selected |
double |
percentWaitlisted()
Percent of sections that are wait-listed |
void |
setApproval(String approval)
Approval of the enrollment (only used by the online student sectioning) |
void |
setReservation(Reservation reservation)
Set reservation for this enrollment |
void |
setTimeStamp(Long timeStamp)
Time stamp of the enrollment |
Set<TimeOverlapsCounter.Conflict> |
timeOverlappingConflicts()
Time overlapping conflicts, in which this enrollment is involved. |
double |
toDouble()
Enrollment value |
double |
toDouble(boolean precise)
Enrollment value |
String |
toString()
|
Methods inherited from class net.sf.cpsolver.ifs.model.Value |
---|
assigned, compareTo, conflicts, countAssignments, getDescription, getExtra, getId, hashCode, isConsistent, lastAssignmentIteration, lastUnassignmentIteration, setExtra, setVariable, unassigned, valueEquals, variable |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Enrollment(Request request, int priority, Course course, Config config, Set<? extends Assignment> assignments, Reservation reservation)
request
- course / free time requestpriority
- zero for the course, one for the first alternative, two for the second alternativecourse
- selected courseconfig
- selected configurationassignments
- valid list of sectionspublic Enrollment(Request request, int priority, Config config, Set<? extends Assignment> assignments)
request
- course / free time requestpriority
- zero for the course, one for the first alternative, two for the second alternativeconfig
- selected configurationassignments
- valid list of sectionsMethod Detail |
---|
public void guessReservation(boolean onlyAvailable)
public Student getStudent()
public Request getRequest()
public boolean isCourseRequest()
public Offering getOffering()
public Config getConfig()
public Course getCourse()
public Set<Assignment> getAssignments()
public Set<Section> getSections()
public boolean isOverlapping(Enrollment enrl)
public double percentWaitlisted()
public double percentSelected()
public double percentInitial()
public boolean isWaitlisted()
public boolean isSelected()
public double getPenalty()
Section.getPenalty()
)
public double toDouble()
toDouble
in class Value<Request,Enrollment>
public double toDouble(boolean precise)
precise
- if false, distance conflicts and time overlaps are ignored (i.e., much faster, but less precise computation)public String getName()
getName
in class Value<Request,Enrollment>
public String toString()
toString
in class Value<Request,Enrollment>
public boolean equals(Object o)
Value
equals
in class Value<Request,Enrollment>
public Set<DistanceConflict.Conflict> distanceConflicts()
public Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts()
public int getPriority()
public int getNrSlots()
public Reservation getReservation()
public void setReservation(Reservation reservation)
public Long getTimeStamp()
public void setTimeStamp(Long timeStamp)
public String getApproval()
public void setApproval(String approval)
public boolean isAllowOverlap()
public int getLimit()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |