public class Offering extends Object
Config
and Course
.
Constructor and Description |
---|
Offering(long id,
String name)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clearReservationCache()
Clear reservation information that was cached on this offering or below
|
void |
clearRestrictionCache()
Clear restriction information that was cached on this offering or below
|
boolean |
equals(Object o) |
Set<Choice> |
getChoices(String instructionalType)
Return the list of all possible choices of the given instructional type
for this offering.
|
List<Config> |
getConfigs()
Possible configurations
|
Course |
getCourse(Student student)
Return course, under which the given student enrolls into this offering.
|
List<Course> |
getCourses()
List of courses.
|
long |
getId()
Offering id
|
Set<String> |
getInstructionalTypes()
Return set of instructional types, union over all configurations.
|
double |
getMaxPenalty()
Maximal penalty from
Config.getMaxPenalty() |
double |
getMinPenalty()
Minimal penalty from
Config.getMinPenalty() |
Model<Request,Enrollment> |
getModel() |
String |
getName()
Offering name
|
List<Reservation> |
getReservations()
Reservations associated with this offering
|
List<Restriction> |
getRestrictions()
Restrictions associated with this offering
|
Section |
getSection(long sectionId)
Return section of the given id, if it is part of one of this offering
configurations.
|
Set<Subpart> |
getSubparts(String instructionalType)
Return list of all subparts of the given isntructional type for this
offering.
|
double |
getTotalUnreservedSpace()
Total space in the offering that is not reserved by any reservation
|
double |
getUnreservedSpace(Assignment<Request,Enrollment> assignment,
Request excludeRequest)
Available space in the offering that is not reserved by any reservation
|
int |
hashCode() |
boolean |
hasReservations()
True if there are reservations for this offering
|
boolean |
hasRestrictions()
True if there are restrictions for this offering
|
boolean |
isDummy()
Dummy courses that should show on the solver dashboard
(e.g., because they are loaded due to an other session unavailability)
|
void |
setDummy(boolean dummy)
Dummy courses that should show on the solver dashboard
(e.g., because they are loaded due to an other session unavailability)
|
void |
setModel(Model<Request,Enrollment> model) |
String |
toString() |
public long getId()
public List<Config> getConfigs()
public List<Course> getCourses()
public Section getSection(long sectionId)
sectionId
- class unique idpublic Course getCourse(Student student)
student
- given studentpublic Set<String> getInstructionalTypes()
public Set<Choice> getChoices(String instructionalType)
instructionalType
- instructional typepublic Set<Subpart> getSubparts(String instructionalType)
instructionalType
- instructional typepublic double getMinPenalty()
Config.getMinPenalty()
public double getMaxPenalty()
Config.getMaxPenalty()
public List<Reservation> getReservations()
public boolean hasReservations()
public List<Restriction> getRestrictions()
public boolean hasRestrictions()
public double getTotalUnreservedSpace()
public double getUnreservedSpace(Assignment<Request,Enrollment> assignment, Request excludeRequest)
assignment
- current requestexcludeRequest
- excluding given request (if not null)public void clearReservationCache()
public void clearRestrictionCache()
public Model<Request,Enrollment> getModel()
public void setModel(Model<Request,Enrollment> model)
public boolean isDummy()
public void setDummy(boolean dummy)