public class FreeTimeRequest extends Request implements SctAssignment
SctAssignment API, with the appropriate free time. | Modifier and Type | Class and Description |
|---|---|
class |
FreeTimeRequest.FreeTimeRequestContext |
Request.RequestContext, Request.RequestPrioritysCacheValuessMaxSize| Constructor and Description |
|---|
FreeTimeRequest(long id,
int priority,
boolean alternative,
Student student,
TimeLocation time)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
assigned(Assignment<Request,Enrollment> assignment,
Enrollment enrollment)
Enrollment with this assignment was assigned to a
Request. |
int |
compareById(SctAssignment a)
Sections first, then by
Request.getId() |
List<Enrollment> |
computeEnrollments(Assignment<Request,Enrollment> assignment)
Create all possible enrollments of this request -- there is only one
possible enrollment:
createEnrollment() |
Request.RequestContext |
createAssignmentContext(Assignment<Request,Enrollment> assignment)
Create a new assignment context for the given assignment.
|
Enrollment |
createEnrollment()
Create enrollment of this request
|
boolean |
equals(Object o) |
double |
getBound()
Estimated bound for this request
|
Set<Enrollment> |
getEnrollments(Assignment<Request,Enrollment> assignment)
Return the list of assigned enrollments that contains this assignment.
|
float |
getMinCredit()
Smallest credit provided by this request
|
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
|
Request.RequestPriority |
getRequestPriority()
Importance of the request.
|
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(SctAssignment assignment)
True, if this assignment is overlapping in time and space with the given
assignment.
|
boolean |
isOverlapping(Set<? extends SctAssignment> assignments)
True, if this assignment is overlapping in time and space with the given
set of assignments.
|
String |
toString() |
void |
unassigned(Assignment<Request,Enrollment> assignment,
Enrollment enrollment)
Enrollment with this assignment was unassigned from a
Request. |
compareTo, getId, getPriority, getStudent, getWeight, hasChildren, hasCourse, hasSelection, isAlternative, isAssigned, isCritical, isMPP, setPriority, setWeight, values, variableAssigned, variableUnassignedgetAssignmentContextReference, getContext, getContext, setAssignmentContextReference, setModeladdContstraint, addVariableListener, assign, constraints, constraintVariables, getAssignment, getAssignment, getAssignments, getBestAssignment, getBestAssignmentIteration, getDescription, getExtra, getIndex, getInitialAssignment, getLastIteration, getModel, getVariableListeners, hardConstraints, hasAssignment, hasAssignment, hasInitialAssignment, hasValues, removeContstraint, removeInitialValue, removeValue, removeVariableListener, setAssignment, setBestAssignment, setExtra, setIndex, setInitialAssignment, setLastIteration, setValues, softConstraints, unassign, valuesclone, 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 SctAssignmentpublic int getNrRooms()
getNrRooms in interface SctAssignmentpublic List<RoomLocation> getRooms()
getRooms in interface SctAssignmentRoomLocationpublic boolean isOverlapping(SctAssignment assignment)
isOverlapping in interface SctAssignmentassignment - another assignmentpublic boolean isOverlapping(Set<? extends SctAssignment> assignments)
isOverlapping in interface SctAssignmentassignments - a set of assignmentspublic Enrollment createEnrollment()
public List<Enrollment> computeEnrollments(Assignment<Request,Enrollment> assignment)
createEnrollment()computeEnrollments in class Requestassignment - current assignmentpublic void assigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)
Request.assigned in interface SctAssignmentassignment - current assignmentenrollment - an enrollment that was just assignedpublic void unassigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)
Request.unassigned in interface SctAssignmentassignment - current assignmentenrollment - an enrollment that was just unassignedpublic Set<Enrollment> getEnrollments(Assignment<Request,Enrollment> assignment)
getEnrollments in interface SctAssignmentassignment - current assignmentspublic String getName()
getName in class Variable<Request,Enrollment>public double getBound()
public boolean isAllowOverlap()
isAllowOverlap in interface SctAssignmentpublic int compareById(SctAssignment a)
Request.getId()compareById in interface SctAssignmenta - another section assignmentpublic Request.RequestContext createAssignmentContext(Assignment<Request,Enrollment> assignment)
HasAssignmentContextcreateAssignmentContext in interface HasAssignmentContext<Request,Enrollment,Request.RequestContext>createAssignmentContext in class Requestassignment - an assignment for which there needs to be an assignment contextpublic float getMinCredit()
RequestgetMinCredit in class Requestpublic Request.RequestPriority getRequestPriority()
RequestgetRequestPriority in class Request