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, values
addContstraint, 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, softConstraints
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId
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 freepublic 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 double getBound()
public boolean isAllowOverlap()
isAllowOverlap
in interface Assignment
public int compareById(Assignment a)
Request.getId()
compareById
in interface Assignment