public class DisabledSections extends GlobalConstraint<Request,Enrollment>
Section.isEnabled()
) is used, unless
there is a reservation allowing for the use of disabled sections
(using Reservation.isAllowDisabled()
).iConstraintListeners, iId
Constructor and Description |
---|
DisabledSections() |
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 section that
is disabled and there is not a matching reservation that would allow for that.
|
boolean |
inConflict(Assignment<Request,Enrollment> assignment,
Enrollment enrollment)
A given enrollment is conflicting, if there is a section that
is disabled and there is not a matching reservation that would allow for that.
|
String |
toString() |
addVariable, assigned, assignedVariables, countAssignedVariables, removeVariable, unassigned, variables
addConstraintListener, compareTo, computeConflictsNoForwardCheck, constraintListeners, countVariables, equals, getDescription, getId, getModel, getName, hashCode, isConsistent, isHard, removeConstraintListener, setModel
public DisabledSections()
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 assignment