|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.model.Variable 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 assignmnet was assigned to a Request . |
Vector |
computeEnrollments()
Create all possible enrollments of this request -- there is only one possible enrollment: createEnrollment() |
Enrollment |
createEnrollment()
Create enrollment of this request |
double |
getBound()
Estimated bound for this request |
Set |
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 |
Vector |
getRooms()
Assignment API: free time request has no rooms |
TimeLocation |
getTime()
Return requested time to be free |
boolean |
isOverlapping(Assignment assignment)
True, if this assignment is overlapping in time and space with the given assignment. |
boolean |
isOverlapping(Set 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 assignmnet was unassigned from a Request . |
Methods inherited from class net.sf.cpsolver.studentsct.model.Request |
---|
assign, compareTo, getId, getPriority, getStudent, getWeight, isAlternative, setPriority, setWeight, unassign, values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
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 Vector getRooms()
getRooms
in interface Assignment
RoomLocation
public boolean isOverlapping(Assignment assignment)
isOverlapping
in interface Assignment
public boolean isOverlapping(Set assignments)
isOverlapping
in interface Assignment
public Enrollment createEnrollment()
public Vector 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 getEnrollments()
getEnrollments
in interface Assignment
public String getName()
getName
in class Variable
public String toString()
toString
in class Variable
public double getBound()
getBound
in class Request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |