|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.ifs.model.Variable<Request,Enrollment>
net.sf.cpsolver.studentsct.model.Request
net.sf.cpsolver.studentsct.model.FreeTimeRequest
public class FreeTimeRequest
Representation of a request of a student for free time. This class directly
implements Assignment
API, with the appropriate free time.
Field Summary |
---|
Fields inherited from class net.sf.cpsolver.studentsct.model.Request |
---|
sCacheValues |
Fields inherited from class net.sf.cpsolver.ifs.model.Variable |
---|
iValue |
Constructor Summary | |
---|---|
FreeTimeRequest(long id,
int priority,
boolean alternative,
Student student,
TimeLocation time)
Constructor |
Method Summary | |
---|---|
void |
assigned(Enrollment enrollment)
Enrollment with this assignment was assigned to a Request . |
int |
compareById(Assignment a)
Sections first, then by Request.getId() |
List<Enrollment> |
computeEnrollments()
Create all possible enrollments of this request -- there is only one possible enrollment: createEnrollment() |
Enrollment |
createEnrollment()
Create enrollment of this request |
boolean |
equals(Object o)
|
double |
getBound()
Estimated bound for this request |
Set<Enrollment> |
getEnrollments()
Return the list of assigned enrollments that contains this assignment. |
String |
getName()
Request name: A for alternative, 1 + priority, Free Time, long name of requested time |
int |
getNrRooms()
Assignment API: free time request has no rooms |
List<RoomLocation> |
getRooms()
Assignment API: free time request has no rooms |
TimeLocation |
getTime()
Return requested time to be free |
int |
hashCode()
|
boolean |
isAllowOverlap()
Free time request generally allow overlaps. |
boolean |
isOverlapping(Assignment assignment)
True, if this assignment is overlapping in time and space with the given assignment. |
boolean |
isOverlapping(Set<? extends Assignment> assignments)
True, if this assignment is overlapping in time and space with the given set of assignments. |
String |
toString()
|
void |
unassigned(Enrollment enrollment)
Enrollment with this assignment was unassigned from a Request . |
Methods inherited from class net.sf.cpsolver.studentsct.model.Request |
---|
assign, compareTo, getId, getPriority, getStudent, getWeight, isAlternative, isAssigned, setPriority, setWeight, unassign, values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.cpsolver.studentsct.model.Assignment |
---|
getId |
Constructor Detail |
---|
public FreeTimeRequest(long id, int priority, boolean alternative, Student student, TimeLocation time)
id
- request unique idpriority
- request priorityalternative
- true if the request is alternative (alternative request can be
assigned instead of a non-alternative course requests, if it
is left unassigned)student
- appropriate studenttime
- appropriate time location that is requested to be freeMethod Detail |
---|
public TimeLocation getTime()
getTime
in interface Assignment
public int getNrRooms()
getNrRooms
in interface Assignment
public List<RoomLocation> getRooms()
getRooms
in interface Assignment
RoomLocation
public boolean isOverlapping(Assignment assignment)
isOverlapping
in interface Assignment
public boolean isOverlapping(Set<? extends Assignment> assignments)
isOverlapping
in interface Assignment
public Enrollment createEnrollment()
public List<Enrollment> computeEnrollments()
createEnrollment()
computeEnrollments
in class Request
public void assigned(Enrollment enrollment)
Request
.
assigned
in interface Assignment
public void unassigned(Enrollment enrollment)
Request
.
unassigned
in interface Assignment
public Set<Enrollment> getEnrollments()
getEnrollments
in interface Assignment
public String getName()
getName
in class Variable<Request,Enrollment>
public String toString()
toString
in class Variable<Request,Enrollment>
public double getBound()
getBound
in class Request
public boolean isAllowOverlap()
isAllowOverlap
in interface Assignment
public int compareById(Assignment a)
Request.getId()
compareById
in interface Assignment
public int hashCode()
hashCode
in class Request
public boolean equals(Object o)
equals
in class Request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |