|
| ConstraintEncoder (Timetabler *) |
| Constructs the ConstraintEncoder object. More...
|
|
Clauses | hasSameFieldTypeAndValue (int, int, FieldType) |
| Gives Clauses that represent that a pair of courses have the same field value for a given FieldType. More...
|
|
Clauses | hasSameFieldTypeNotSameValue (int, int, FieldType) |
| Gives Clauses that represent that a pair of courses do not have the same field value for a given FieldType. More...
|
|
Clauses | notIntersectingTime (int, int) |
| Gives Clauses that represent that a pair of courses cannot have an intersecting schedule. More...
|
|
Clauses | notIntersectingTimeField (int, int, FieldType) |
| Gives Clauses that represent that a pair of courses cannot have an intersecting value for a given FieldType, where the FieldType is of a time field, which is either a Segment or a Slot. More...
|
|
Clauses | hasExactlyOneFieldValueTrue (int, FieldType) |
| Gives Clauses that represent that a Course can have exactly one field value of a given FieldType to be True. More...
|
|
Clauses | hasAtLeastOneFieldValueTrue (int, FieldType) |
| Gives Clauses that represent that a Course can have at least one field value of a given FieldType to be True. More...
|
|
Clauses | hasAtMostOneFieldValueTrue (int, FieldType) |
| Gives Clauses that represent that a Course can have at most one field value of a given FieldType to be True. More...
|
|
Clauses | hasCommonProgram (int, int) |
| Gives Clauses that represent that a pair of courses are core for a given Program. More...
|
|
Clauses | hasNoCommonCoreProgram (int, int) |
| Gives Clauses that represent that at least one out of a pair of courses is not core for a given Program. More...
|
|
Clauses | isMinorCourse (int) |
| Gives Clauses that represent that a given Course is a minor Course. More...
|
|
Clauses | slotInMinorTime (int) |
| Gives Clauses that represent that a given Course must have a minor Slot. More...
|
|
Clauses | isCoreCourse (int) |
| Gives Clauses that represent that a Course is a core Course. More...
|
|
Clauses | isElectiveCourse (int) |
| Gives Clauses that represent that a Course is an elective Course. More...
|
|
Clauses | courseInMorningTime (int) |
| Gives Clauses that represent that a Course is scheduled in a morning Slot. More...
|
|
Clauses | programAtMostOneOfCoreOrElective (int) |
| Gives Clauses that represent that for a Course, it can be a part of a Program as at most one out of core or elective. More...
|
|
Clauses | hasFieldTypeListedValues (int, FieldType, std::vector< int >) |
| Gives Clauses that represent that a Course has a field value for a given FieldType out of a list of possible values. More...
|
|
Class for constraint encoder.
This class is responsible for imposing constraints given a Course or a pair of Courses and a FieldType. The constraints are of a higher level than the operations of Clauses and of a lower level than the constraints defined in ConstraintAdder, which are the final constraints added to the solver. The class keeps a copy of the variables used for every 3-tuple of (Course, FieldType, field value) and a pointer to a Timetabler object to access the field data. Clauses for these constraints are created using the operations defined in Clauses.
Clauses ConstraintEncoder::hasAtMostOneFieldValueTrue |
( |
int |
course, |
|
|
FieldType |
fieldType |
|
) |
| |
Gives Clauses that represent that a Course can have at most one field value of a given FieldType to be True.
The binomial encoding has been used to represent this constraint. A more efficient encoding, with auxiliary variables, has not been used because such an encoding would only be equisatisfiable. However, when using these clauses as an antecedent of an implication, we need that if the antecedent of the encoded clauses is False, the original set of clauses would also have been False, a property that equisatifiability does not guarantee.
- Parameters
-
[in] | course | The course |
[in] | fieldType | The field type |
- Returns
- A Clauses object representing the condition