public class StudentConflict extends Constraint<Request,Enrollment>
iAssignedVariables, iConstraintListeners, iId| Constructor and Description |
|---|
StudentConflict(Student student)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeConflicts(Enrollment enrollment,
Set<Enrollment> conflicts)
A given enrollment is conflicting when the student is enrolled into
another course / free time request that has an assignment that is
overlapping with one or more assignments of the given section.
|
boolean |
inConflict(Enrollment enrollment)
A given enrollment is conflicting when the student is enrolled into
another course / free time request that has an assignment that is
overlapping with one or more assignments of the given section.
|
boolean |
isConsistent(Enrollment e1,
Enrollment e2)
Two enrollments are consistent if they are not overlapping in time
|
String |
toString() |
addConstraintListener, addVariable, assigned, assignedVariables, compareTo, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, getName, hashCode, isHard, removeConstraintListener, removeVariable, setModel, unassigned, variablespublic StudentConflict(Student student)
student - student for which the constraint is createdpublic void computeConflicts(Enrollment enrollment, Set<Enrollment> conflicts)
Enrollment.isOverlapping(Enrollment) for more details. All such
overlapping enrollments are added into the provided set of conflicts.computeConflicts in class Constraint<Request,Enrollment>enrollment - Enrollment that is being consideredconflicts - resultant list of conflicting enrollmentspublic boolean isConsistent(Enrollment e1, Enrollment e2)
isConsistent in class Constraint<Request,Enrollment>public boolean inConflict(Enrollment enrollment)
Enrollment.isOverlapping(Enrollment) for more details.inConflict in class Constraint<Request,Enrollment>enrollment - Enrollment that is being considered