public class FreeTimeRequest extends Request implements Assignment
Assignment API, with the appropriate free time. sCacheValues| Constructor and Description |
|---|
FreeTimeRequest(long id,
int priority,
boolean alternative,
Student student,
TimeLocation time)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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. |
assign, compareTo, getId, getPriority, getStudent, getWeight, isAlternative, isAssigned, setPriority, setWeight, unassign, valuesaddContstraint, addVariableListener, constraints, constraintVariables, countAssignments, getAssignment, getBestAssignment, getBestAssignmentIteration, getDescription, getExtra, getInitialAssignment, getModel, getVariableListeners, hardConstraints, hasAssignment, hasInitialAssignment, hasValues, lastAssignmentIteration, lastUnassignmentIteration, removeContstraint, removeInitialValue, removeValue, removeVariableListener, setBestAssignment, setExtra, setInitialAssignment, setModel, setValues, softConstraintsclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIdpublic 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 freepublic TimeLocation getTime()
getTime in interface Assignmentpublic int getNrRooms()
getNrRooms in interface Assignmentpublic List<RoomLocation> getRooms()
getRooms in interface AssignmentRoomLocationpublic boolean isOverlapping(Assignment assignment)
isOverlapping in interface Assignmentpublic boolean isOverlapping(Set<? extends Assignment> assignments)
isOverlapping in interface Assignmentpublic Enrollment createEnrollment()
public List<Enrollment> computeEnrollments()
createEnrollment()computeEnrollments in class Requestpublic void assigned(Enrollment enrollment)
Request.assigned in interface Assignmentpublic void unassigned(Enrollment enrollment)
Request.unassigned in interface Assignmentpublic Set<Enrollment> getEnrollments()
getEnrollments in interface Assignmentpublic String getName()
getName in class Variable<Request,Enrollment>public double getBound()
public boolean isAllowOverlap()
isAllowOverlap in interface Assignmentpublic int compareById(Assignment a)
Request.getId()compareById in interface Assignment