|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.cpsolver.studentsct.model.Section
public class Section
Representation of a class. Each section contains id, name, scheduling subpart, time/room placement, and a limit.
Optionally, parent-child relation between sections can be defined.
Each student requesting a course needs to be enrolled in a class of each subpart of a selected configuration.
In the case of parent-child relation between classes, if a student is enrolled in a section that has a parent
section defined, he/she has to be enrolled in the parent section as well. If there is a parent-child relation between
two sections, the same relation is defined on their subparts as well, i.e., if section A is a parent section B, subpart
of section A isa parent of subpart of section B.
| Constructor Summary | |
|---|---|
Section(long id,
int limit,
String name,
Subpart subpart,
Placement placement,
String instructorIds,
String instructorNames,
Section parent)
Constructor |
|
| Method Summary | |
|---|---|
void |
assigned(Enrollment enrollment)
Called when an enrollment with this section is assigned to a request |
int |
compareTo(Object o)
Compare two sections, prefer sections with lower penalty and more open space |
Choice |
getChoice()
A (student) choice representing this section. |
Set |
getEnrollments()
Set of assigned enrollments |
double |
getEnrollmentWeight(Request excludeRequest)
Enrollment weight -- weight of all requests which have an enrollment that contains this section, excluding the given one. |
long |
getId()
Section id |
int |
getLimit()
Section limit. |
String |
getLongName()
Long name: subpart name + time long name + room names + instructor names |
double |
getMaxEnrollmentWeight()
Maximal weight of a single enrollment in the section |
double |
getMinEnrollmentWeight()
Minimal weight of a single enrollment in the section |
String |
getName()
Section name |
int |
getNrRooms()
Number of rooms in which the section meet. |
double |
getOnlineSectioningPenalty()
Online sectioning penalty. |
Section |
getParent()
Parent section of this section (can be null). |
double |
getPenalty()
Return penalty which is added to an enrollment that contains this section. |
Placement |
getPlacement()
Time/room placement of the section. |
Vector |
getRooms()
Room placement -- list of RoomLocation |
double |
getSpaceExpected()
Return the amount of space of this section that is expected to be taken by incoming students. |
double |
getSpaceHeld()
Return the amount of space of this section that is held for incoming students. |
Subpart |
getSubpart()
Scheduling subpart to which this section belongs |
TimeLocation |
getTime()
Time placement of the section. |
boolean |
isOverlapping(Assignment assignment)
True, if this section overlaps with the given assignment in time and space |
boolean |
isOverlapping(Set assignments)
True, if this section overlaps with one of the given set of assignments in time and space |
void |
setLimit(int limit)
Set section limit |
void |
setPenalty(double penalty)
Set penalty which is added to an enrollment that contains this section. |
void |
setSpaceExpected(double spaceExpected)
Set the amount of space of this section that is expected to be taken by incoming students. |
void |
setSpaceHeld(double spaceHeld)
Set the amount of space of this section that is held for incoming students. |
String |
toString()
|
void |
unassigned(Enrollment enrollment)
Called when an enrollment with this section is unassigned from a request |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Section(long id,
int limit,
String name,
Subpart subpart,
Placement placement,
String instructorIds,
String instructorNames,
Section parent)
id - section unique idlimit - section limit, i.e., the maximal number of students that can be enrolled in this section at the same timename - section namesubpart - subpart of this sectionplacement - time/room placementinstructorIds - instructor(s) id -- needed for getChoice()instructorNames - instructor(s) name -- needed for getChoice()parent - parent section -- if there is a parent section defined, a student that is enrolled in this
section has to be enrolled in the parent section as well. Also, the same relation needs to be defined between subpart of
this section and the subpart of the parent section| Method Detail |
|---|
public long getId()
public int getLimit()
public void setLimit(int limit)
public String getName()
public Subpart getSubpart()
public Section getParent()
public Placement getPlacement()
public TimeLocation getTime()
getTime in interface Assignmentpublic int getNrRooms()
getNrRooms in interface Assignmentpublic Vector getRooms()
RoomLocation
getRooms in interface AssignmentRoomLocationpublic boolean isOverlapping(Assignment assignment)
isOverlapping in interface Assignmentpublic boolean isOverlapping(Set assignments)
isOverlapping in interface Assignmentpublic void assigned(Enrollment enrollment)
assigned in interface Assignmentpublic void unassigned(Enrollment enrollment)
unassigned in interface Assignmentpublic Set getEnrollments()
getEnrollments in interface Assignmentpublic double getEnrollmentWeight(Request excludeRequest)
Request.getWeight().
public double getMaxEnrollmentWeight()
public double getMinEnrollmentWeight()
public String getLongName()
public String toString()
toString in class Objectpublic Choice getChoice()
public double getPenalty()
public void setPenalty(double penalty)
public int compareTo(Object o)
compareTo in interface Comparablepublic double getSpaceHeld()
public void setSpaceHeld(double spaceHeld)
getSpaceHeld() for more info.
public double getSpaceExpected()
public void setSpaceExpected(double spaceExpected)
getSpaceExpected() for more info.
public double getOnlineSectioningPenalty()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||