public class RequiredReservation extends GlobalConstraint<Request,Enrollment>
Reservation.mustBeUsed() flags are used. That is, an enrollment
is conflicting when there is a reservation for the student that must be used,
but the given enrollment does not use it.iConstraintListeners, iId| Constructor and Description |
|---|
RequiredReservation() |
| Modifier and Type | Method and Description |
|---|---|
void |
computeConflicts(Assignment<Request,Enrollment> assignment,
Enrollment enrollment,
Set<Enrollment> conflicts)
A given enrollment is conflicting, if there is a reservation that
the student must use, but the given enrollment does not use it.
|
boolean |
inConflict(Assignment<Request,Enrollment> assignment,
Enrollment enrollment)
A given enrollment is conflicting, if there is a reservation that
the student must use, but the given enrollment does not use it.
|
String |
toString() |
addVariable, assigned, assignedVariables, countAssignedVariables, getName, removeVariable, unassigned, variablesaddConstraintListener, compareTo, computeConflictsNoForwardCheck, constraintListeners, countVariables, equals, getDescription, getId, getModel, hashCode, isConsistent, isHard, removeConstraintListener, setModelpublic RequiredReservation()
public void computeConflicts(Assignment<Request,Enrollment> assignment, Enrollment enrollment, Set<Enrollment> conflicts)
computeConflicts in class Constraint<Request,Enrollment>enrollment - Enrollment that is being consideredconflicts - all computed conflicting requests are added into this setassignment - current assignmentpublic boolean inConflict(Assignment<Request,Enrollment> assignment, Enrollment enrollment)
inConflict in class Constraint<Request,Enrollment>enrollment - Enrollment that is being consideredassignment - current assignmentpublic String toString()
toString in class GlobalConstraint<Request,Enrollment>