public static enum GroupConstraint.ConstraintType extends Enum<GroupConstraint.ConstraintType>
Enum Constant and Description |
---|
BTB
Back-To-Back & Same Room: Classes must be offered in adjacent time segments and must be placed in the same room.
|
BTB_DAY
Back-To-Back Day: Classes must be offered on adjacent days and may be placed in different rooms.
|
BTB_PRECEDENCE
Back-To-Back Precedence: Given classes have to be taught in the given order, on the same days,
and in adjacent time segments.
|
BTB_TIME
Back-To-Back: Classes must be offered in adjacent time segments but may be placed in different rooms.
|
CAN_SHARE_ROOM
Can Share Room: Given classes can share the room (use the room in the same time) if the room is big enough.
|
CH_NOTOVERLAP
Children Cannot Overlap: If parent classes do not overlap in time, children classes can not overlap in time as well.
|
DIFF_TIME
Different Time: Given classes cannot overlap in time.
|
EVERY_OTHER_DAY
Two Days After: The second class has to be placed two days after the first class (Monday → Wednesday, Tuesday →
Thurday, Wednesday → Friday, Thursday → Monday, Friday → Tuesday).
|
FOLLOWING_DAY
Next Day: The second class has to be placed on the following day of the first class (if the first class is on Friday,
second class have to be on Monday).
|
LINKED_SECTIONS
Classes (of different courses) are to be attended by the same students.
|
MAX_HRS_DAY_5
At Most 5 Hours A Day: Classes are to be placed in a way that there is no more than five hours in any day.
|
MAX_HRS_DAY_6
At Most 6 Hours A Day: Classes are to be placed in a way that there is no more than six hours in any day.
|
MAX_HRS_DAY_7
At Most 7 Hours A Day: Classes are to be placed in a way that there is no more than seven hours in any day.
|
MAX_HRS_DAY_8
At Most 8 Hours A Day: Classes are to be placed in a way that there is no more than eight hours in any day.
|
MEET_WITH
Meet Together: Given classes are meeting together (same as if the given classes require constraints Can Share Room,
Same Room, Same Time and Same Days all together).
|
NDB_GT_1
More Than 1 Day Between: Given classes must have two or more days in between.
|
NHB_1
1 Hour Between: Given classes must have exactly 1 hour in between the end of one and the beginning of another.
|
NHB_1_5
1.5 Hour Between: Given classes must have exactly 90 minutes in between the end of one and the beginning of another.
|
NHB_2
2 Hours Between: Given classes must have exactly 2 hours in between the end of one and the beginning of another.
|
NHB_3
3 Hours Between: Given classes must have exactly 3 hours in between the end of one and the beginning of another.
|
NHB_4
4 Hours Between: Given classes must have exactly 4 hours in between the end of one and the beginning of another.
|
NHB_4_5
4.5 Hours Between: Given classes must have exactly 4.5 hours in between the end of one and the beginning of another.
|
NHB_5
5 Hours Between: Given classes must have exactly 5 hours in between the end of one and the beginning of another.
|
NHB_6
6 Hours Between: Given classes must have exactly 6 hours in between the end of one and the beginning of another.
|
NHB_7
7 Hours Between: Given classes must have exactly 7 hours in between the end of one and the beginning of another.
|
NHB_8
8 Hours Between: Given classes must have exactly 8 hours in between the end of one and the beginning of another.
|
NHB_GTE_1
At Least 1 Hour Between: Given classes have to have 1 hour or more in between.
|
NHB_LT_6
Less Than 6 Hours Between: Given classes must have less than 6 hours from end of first class to the beginning of
the next.
|
PRECEDENCE
Precedence: Given classes have to be taught in the given order (the first meeting of the first class has to end before
the first meeting of the second class etc.)
|
SAME_DAYS
Same Days: Given classes must be taught on the same days.
|
SAME_DAYS_ROOM_TIME
Same Days-Room-Time: Given classes must be taught at the same time of day, on the same days and in the same room.
|
SAME_DAYS_TIME
Same Days-Time: Given classes must be taught at the same time of day and on the same days.
|
SAME_INSTR
Same Instructor: Given classes are treated as they are taught by the same instructor, i.e., they cannot overlap in time
and if they are back-to-back the assigned rooms cannot be too far (instructor limit is used).
|
SAME_ROOM
Same Room: Given classes must be taught in the same room.
|
SAME_START
Same Start Time: Given classes must start during the same half-hour period of a day (independent of the actual
day the classes meet).
|
SAME_STUDENTS
Same Students: Given classes are treated as they are attended by the same students, i.e., they cannot overlap in time
and if they are back-to-back the assigned rooms cannot be too far (student limit is used).
|
SAME_TIME
Same Time: Given classes must be taught at the same time of day (independent of the actual day the classes meet).
|
SAME_WEEKS
Given classes must be taught during the same weeks (i.e., must have the same date pattern).
|
Modifier and Type | Method and Description |
---|---|
static GroupConstraint.ConstraintType |
get(String reference)
Constraint type from reference
|
int |
getMax()
Maximum (gap, hours a day) parameter
|
int |
getMin()
Minimum (gap) parameter
|
String |
getName()
Constraint name
|
boolean |
is(GroupConstraint.Flag f)
Flag check (true if contains given flag)
|
boolean |
isSatisfied(GroupConstraint gc,
Placement plc1,
Placement plc2)
True if a required or preferred constraint is satisfied between a pair of placements
|
boolean |
isViolated(GroupConstraint gc,
Placement plc1,
Placement plc2)
True if a prohibited or discouraged constraint is satisfied between a pair of placements
|
String |
reference()
Constraint reference
|
static GroupConstraint.ConstraintType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GroupConstraint.ConstraintType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GroupConstraint.ConstraintType SAME_TIME
public static final GroupConstraint.ConstraintType SAME_DAYS
public static final GroupConstraint.ConstraintType BTB
public static final GroupConstraint.ConstraintType BTB_TIME
public static final GroupConstraint.ConstraintType DIFF_TIME
public static final GroupConstraint.ConstraintType NHB_1
public static final GroupConstraint.ConstraintType NHB_2
public static final GroupConstraint.ConstraintType NHB_3
public static final GroupConstraint.ConstraintType NHB_4
public static final GroupConstraint.ConstraintType NHB_5
public static final GroupConstraint.ConstraintType NHB_6
public static final GroupConstraint.ConstraintType NHB_7
public static final GroupConstraint.ConstraintType NHB_8
public static final GroupConstraint.ConstraintType SAME_START
public static final GroupConstraint.ConstraintType SAME_ROOM
public static final GroupConstraint.ConstraintType NHB_GTE_1
public static final GroupConstraint.ConstraintType NHB_LT_6
public static final GroupConstraint.ConstraintType NHB_1_5
public static final GroupConstraint.ConstraintType NHB_4_5
public static final GroupConstraint.ConstraintType SAME_STUDENTS
public static final GroupConstraint.ConstraintType SAME_INSTR
public static final GroupConstraint.ConstraintType CAN_SHARE_ROOM
public static final GroupConstraint.ConstraintType PRECEDENCE
public static final GroupConstraint.ConstraintType BTB_DAY
public static final GroupConstraint.ConstraintType MEET_WITH
public static final GroupConstraint.ConstraintType NDB_GT_1
public static final GroupConstraint.ConstraintType CH_NOTOVERLAP
public static final GroupConstraint.ConstraintType FOLLOWING_DAY
public static final GroupConstraint.ConstraintType EVERY_OTHER_DAY
public static final GroupConstraint.ConstraintType MAX_HRS_DAY_5
public static final GroupConstraint.ConstraintType MAX_HRS_DAY_6
public static final GroupConstraint.ConstraintType MAX_HRS_DAY_7
public static final GroupConstraint.ConstraintType MAX_HRS_DAY_8
public static final GroupConstraint.ConstraintType SAME_WEEKS
public static final GroupConstraint.ConstraintType LINKED_SECTIONS
public static final GroupConstraint.ConstraintType BTB_PRECEDENCE
public static final GroupConstraint.ConstraintType SAME_DAYS_TIME
public static final GroupConstraint.ConstraintType SAME_DAYS_ROOM_TIME
public static GroupConstraint.ConstraintType[] values()
for (GroupConstraint.ConstraintType c : GroupConstraint.ConstraintType.values()) System.out.println(c);
public static GroupConstraint.ConstraintType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getMin()
public int getMax()
public boolean is(GroupConstraint.Flag f)
public static GroupConstraint.ConstraintType get(String reference)
public boolean isSatisfied(GroupConstraint gc, Placement plc1, Placement plc2)
public boolean isViolated(GroupConstraint gc, Placement plc1, Placement plc2)