|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.cpsolver.studentsct.model.Config
public class Config
Representation of a configuration of an offering. A configuration contains
id, name, an offering and a list of subparts.
Each instructional offering (see Offering) contains one or more
configurations. Each configuration contain one or more subparts. Each student
has to take a class of each subpart of one of the possible configurations.
| Constructor Summary | |
|---|---|
Config(long id,
int limit,
String name,
Offering offering)
Constructor |
|
| Method Summary | |
|---|---|
void |
assigned(Enrollment enrollment)
Called when an enrollment with this config is assigned to a request |
void |
clearReservationCache()
Clear reservation information that was cached on this configuration or below |
boolean |
equals(Object o)
|
List<Reservation> |
getConfigReservations()
Get reservations that require this configuration |
Set<Enrollment> |
getEnrollments()
Set of assigned enrollments |
double |
getEnrollmentWeight(Request excludeRequest)
Enrollment weight -- weight of all requests which have an enrollment that contains this config, excluding the given one. |
long |
getId()
Configuration id |
int |
getLimit()
Configuration limit. |
double |
getMaxEnrollmentWeight()
Maximal weight of a single enrollment in the config |
double |
getMaxPenalty()
Average maximal penalty from Subpart.getMaxPenalty() |
double |
getMinEnrollmentWeight()
Minimal weight of a single enrollment in the config |
double |
getMinPenalty()
Average minimal penalty from Subpart.getMinPenalty() |
String |
getName()
Configuration name |
Offering |
getOffering()
Instructional offering to which this configuration belongs. |
List<Reservation> |
getReservations()
Get reservations for this configuration |
List<Subpart> |
getSubparts()
List of subparts |
double |
getTotalUnreservedSpace()
Total space in the configuration that cannot be reserved by any config reservation |
double |
getUnreservedSpace(Request excludeRequest)
Available space in the configuration that is not reserved by any config reservation |
int |
hashCode()
|
void |
setLimit(int limit)
Set configuration limit |
String |
toString()
|
void |
unassigned(Enrollment enrollment)
Called when an enrollment with this config is unassigned from a request |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Config(long id,
int limit,
String name,
Offering offering)
id - instructional offering configuration unique idlimit - configuration limit (-1 for unlimited)name - configuration nameoffering - instructional offering to which this configuration belongs| Method Detail |
|---|
public long getId()
public int getLimit()
public void setLimit(int limit)
public String getName()
public Offering getOffering()
public List<Subpart> getSubparts()
public String toString()
toString in class Objectpublic double getMinPenalty()
Subpart.getMinPenalty()
public double getMaxPenalty()
Subpart.getMaxPenalty()
public void assigned(Enrollment enrollment)
public void unassigned(Enrollment enrollment)
public double getEnrollmentWeight(Request excludeRequest)
Request.getWeight().
public Set<Enrollment> getEnrollments()
public double getMaxEnrollmentWeight()
public double getMinEnrollmentWeight()
public double getUnreservedSpace(Request excludeRequest)
excludeRequest - excluding given request (if not null)public double getTotalUnreservedSpace()
public List<Reservation> getReservations()
public List<Reservation> getConfigReservations()
public void clearReservationCache()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||