|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.model.Constraint net.sf.cpsolver.studentsct.constraint.Reservation
public abstract class Reservation
Abstract reservation constraint. This constraint allow some section, courses, and other
parts to be reserved to particular group of students. A reservation can be unlimited
(any number of students of that particular group can attend a course, section, etc.) or
with a limit (only given number of seats is reserved to the students of the particular
group).
Field Summary | |
---|---|
static int |
CAN_ENROLL_INSTEAD
Student can be enrolled, however, some other student has to dropped out of the section, course, etc. |
static int |
CAN_ENROLL_NO
Student cannot be enrolled |
static int |
CAN_ENROLL_YES
Student can be enrolled |
Fields inherited from class net.sf.cpsolver.ifs.model.Constraint |
---|
iAssignedVariables, iConstraintListeners, iId |
Constructor Summary | |
---|---|
Reservation()
|
Method Summary | |
---|---|
abstract int |
canEnroll(Student student)
Check, whether a student can be enrolled into the given section, course, etc. |
abstract boolean |
canEnrollInstead(Student student,
Student insteadOfStudent)
Check whether the given student can be enrolled instead of another student |
void |
computeConflicts(Value value,
Set conflicts)
Implementation of the constraint primitives. |
boolean |
inConflict(Value value)
Implementation of the constraint primitives. |
abstract boolean |
isApplicable(Enrollment enrollment)
Check whether the reservation is applicable to the given enrollment. |
Methods inherited from class net.sf.cpsolver.ifs.model.Constraint |
---|
addConstraintListener, addVariable, assigned, assignedVariables, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, getName, hashCode, isConsistent, isHard, removeConstraintListener, removeVariable, setModel, unassigned, variables |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int CAN_ENROLL_NO
public static int CAN_ENROLL_YES
public static int CAN_ENROLL_INSTEAD
Constructor Detail |
---|
public Reservation()
Method Detail |
---|
public abstract int canEnroll(Student student)
student
- given student
CAN_ENROLL_YES
, CAN_ENROLL_NO
, or CAN_ENROLL_INSTEAD
public abstract boolean canEnrollInstead(Student student, Student insteadOfStudent)
student
- student that is to be enrolled in the particular course, section, etc.insteadOfStudent
- student, that is currently enrolled, which is going to be
bumped out of the course, section, etc. in order to enroll given studen
public abstract boolean isApplicable(Enrollment enrollment)
enrollment
- enrollment of a student that is being considered
public void computeConflicts(Value value, Set conflicts)
Constraint.computeConflicts(Value, Set)
for more details.
computeConflicts
in class Constraint
value
- value to be assigned to its varaibleconflicts
- resultant set of conflicting valuespublic boolean inConflict(Value value)
Constraint.inConflict(Value)
for more details.
inConflict
in class Constraint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |