## Uses of Class
org.cpsolver.ifs.model.Constraint

- Packages that use Constraint
  Package | Description
  --- | ---
  org.cpsolver.coursett.constraint | University Course Timetabling: Constraints.
  org.cpsolver.coursett.model | University Course Timetabling: Model.
  org.cpsolver.exam.model | Examination Timetabling: Model.
  org.cpsolver.ifs.assignment.context | Assignment context can be used by a class (e.g., a constraint, a extension, a neighborhood selection, or a criterion) to contain any assignment dependent data.
  org.cpsolver.ifs.criteria | IFS Criteria.
  org.cpsolver.ifs.example.csp | Random Binary CSP with uniform distribution.
  org.cpsolver.ifs.example.jobshop | JobShop Problem.
  org.cpsolver.ifs.example.rpp | Random Placement Problem.
  org.cpsolver.ifs.example.tt | Simple Timetabling Problem.
  org.cpsolver.ifs.extension | IFS Extensions (conflict-based statistics, maintenance of arc consistency)
  org.cpsolver.ifs.model | IFS Model (description of a problem)
  org.cpsolver.instructor.constraints | Instructor Scheduling: Constraints.
  org.cpsolver.studentsct.constraint | Student Sectioning: Constraints.
  org.cpsolver.studentsct.online | Online Student Sectioning Solver.

- - ### Uses of Constraint in org.cpsolver.coursett.constraint

    Subclasses of Constraint in org.cpsolver.coursett.constraint
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BreakFlexibleConstraint` The Break constraint checks for instructor lunch break or a break in general in between the given classes.
    `class` | `ClassLimitConstraint` Class limit constraint.
    `class` | `DepartmentSpreadConstraint` Departmental ballancing constraint.
    `class` | `DiscouragedRoomConstraint` Discouraged room constraint.
    `class` | `ExtendedStudentConflicts` An experimental global constraint that does not allow any two classes that can be attended by the same student to have a conflict.
    `class` | `FlexibleConstraint` Flexible constraint.
    `class` | `GroupConstraint` Group constraint.
    `class` | `IgnoreStudentConflictsConstraint` Ignore student conflicts constraint.
    `class` | `InstructorConstraint` Instructor constraint.
    `class` | `JenrlConstraint` Join student enrollment constraint.
    `class` | `MaxBlockFlexibleConstraint` The MaxBlock constraint checks for too big blocks of back-to-back classes of an instructor.
    `class` | `MaxBreaksFlexibleConstraint` The MaxBreaks constraint limits the number of blocks of non back-to-back classes of an instructor on a day.
    `class` | `MaxConsecutiveDaysFlexibleConstraint` The MaxConsecutiveDays constraint limits the number of consecutive days of week during which the given set of classes are taught.
    `class` | `MaxDaysFlexibleConstraint` The MaxDays constraint limits the number of days of week during which the given set of classes are taught.
    `class` | `MaxHalfDaysFlexibleConstraint` The MaxHalfDays constraint limits the number of half-days of week during which the given set of classes are taught.
    `class` | `MaxHolesFlexibleConstraint` The MaxHoles constraint limits the number of free time (holes) for an instructor on a day.
    `class` | `MaxWeeksFlexibleConstraint` The MaxWeeks constraint limits the number of weeks during which the given set of classes are taught.
    `class` | `MinimizeNumberOfUsedGroupsOfTime` Minimize number of used groups of time within a set of classes.
    `class` | `MinimizeNumberOfUsedRoomsConstraint` Minimize number of used rooms within the set of classes.
    `class` | `NoStudentOnlineConflicts` An experimental global constraints that prohibits cases where a student has an online and in-person class on the same day.
    `class` | `RoomConstraint` Room constraint.
    `class` | `SoftInstructorConstraint` Soft version of the instructor constraint.
    `class` | `SpreadConstraint` Spread given set of classes in time as much as possible.

    Methods in org.cpsolver.coursett.constraint with parameters of type Constraint
    Modifier and Type | Method and Description
    --- | ---
    `void` | ExtendedStudentConflicts.`constraintAdded(Constraint<Lecture,Placement> constraint)`
    `void` | ExtendedStudentConflicts.`constraintRemoved(Constraint<Lecture,Placement> constraint)`

  - ### Uses of Constraint in org.cpsolver.coursett.model

    Methods in org.cpsolver.coursett.model that return types with arguments of type Constraint
    Modifier and Type | Method and Description
    --- | ---
    `Set<Constraint<Lecture,Placement>>` | Lecture.`getWeakeningConstraints()`

    Methods in org.cpsolver.coursett.model with parameters of type Constraint
    Modifier and Type | Method and Description
    --- | ---
    `void` | TimetableModel.`addConstraint(Constraint<Lecture,Placement> constraint)`
    `void` | Lecture.`addContstraint(Constraint<Lecture,Placement> constraint)`
    `void` | OnFlySectioning.`constraintAdded(Constraint<Lecture,Placement> constraint)`
    `void` | OnFlySectioning.`constraintRemoved(Constraint<Lecture,Placement> constraint)`
    `void` | TimetableModel.`removeConstraint(Constraint<Lecture,Placement> constraint)`
    `void` | Lecture.`removeContstraint(Constraint<Lecture,Placement> constraint)`

  - ### Uses of Constraint in org.cpsolver.exam.model

    Subclasses of Constraint in org.cpsolver.exam.model
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ExamDistributionConstraint` Distribution binary constraint.
    `class` | `ExamInstructor` An instructor.
    `class` | `ExamRoom` A room.
    `class` | `ExamStudent` A student.

    Methods in org.cpsolver.exam.model with parameters of type Constraint
    Modifier and Type | Method and Description
    --- | ---
    `void` | Exam.`addContstraint(Constraint<Exam,ExamPlacement> constraint)` Adds a constraint.
    `int` | ExamRoom.`compareTo(Constraint<Exam,ExamPlacement> o)` Compare two rooms (by unique id)
    `int` | ExamStudent.`compareTo(Constraint<Exam,ExamPlacement> o)` Compare two students (by student ids)
    `void` | Exam.`removeContstraint(Constraint<Exam,ExamPlacement> constraint)` Removes a constraint.

  - ### Uses of Constraint in org.cpsolver.ifs.assignment.context

    Subclasses of Constraint in org.cpsolver.ifs.assignment.context
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BinaryConstraintWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentConstraintContext<V,T>>` A binary constraint with an assignment context.
    `class` | `ConstraintWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentConstraintContext<V,T>>` A constraint with an assignment context.

  - ### Uses of Constraint in org.cpsolver.ifs.criteria

    Methods in org.cpsolver.ifs.criteria with parameters of type Constraint
    Modifier and Type | Method and Description
    --- | ---
    `void` | AbstractCriterion.`constraintAdded(Constraint<V,T> constraint)`
    `void` | AbstractCriterion.`constraintRemoved(Constraint<V,T> constraint)`

  - ### Uses of Constraint in org.cpsolver.ifs.example.csp

    Subclasses of Constraint in org.cpsolver.ifs.example.csp
    Modifier and Type | Class and Description
    --- | ---
    `class` | `CSPBinaryConstraint` CSP binary constraint.

  - ### Uses of Constraint in org.cpsolver.ifs.example.jobshop

    Subclasses of Constraint in org.cpsolver.ifs.example.jobshop
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Job` Job constraint.
    `class` | `Machine` Machine constraint.

  - ### Uses of Constraint in org.cpsolver.ifs.example.rpp

    Subclasses of Constraint in org.cpsolver.ifs.example.rpp
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ResourceConstraint` Resource constraint (rectangular area where the rectangles are to be placed).

  - ### Uses of Constraint in org.cpsolver.ifs.example.tt

    Subclasses of Constraint in org.cpsolver.ifs.example.tt
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Dependence` Binary dependence between two activities.
    `class` | `Resource` Resource constraint

  - ### Uses of Constraint in org.cpsolver.ifs.extension

    Fields in org.cpsolver.ifs.extension with type parameters of type Constraint
    Modifier and Type | Field and Description
    --- | ---
    `protected List<Constraint<V,T>>` | MacPropagation.`iConstraints` List of constraints on which arc-consistency is to be maintained
    `protected List<Constraint<V,T>>` | MacRevised.`iConstraints` List of constraints on which arc-consistency is to be maintained

    Methods in org.cpsolver.ifs.extension that return Constraint
    Modifier and Type | Method and Description
    --- | ---
    `Constraint<?,T>` | AssignedValue.`getConstraint()` Returns constraint
    `Constraint<?,T>` | AssignedValueSet.`getConstraint()` Returns constraint

    Methods in org.cpsolver.ifs.extension with parameters of type Constraint
    Modifier and Type | Method and Description
    --- | ---
    `void` | MacPropagation.`addConstraint(Constraint<V,T> constraint)` Adds a constraint on which arc-consistency is to be maintained
    `void` | MacRevised.`addConstraint(Constraint<V,T> constraint)` Adds a constraint on which arc-consistency is to be maintained
    `void` | ConflictStatistics.`constraintAdded(Constraint<V,T> constraint)`
    `void` | Extension.`constraintAdded(Constraint<V,T> constraint)` Called when a constraint is added to the model
    `void` | ConflictStatistics.`constraintAfterAssigned(Assignment<V,T> assignment, long iteration, Constraint<V,T> constraint, T assigned, Set<T> unassigned)` Increments appropriate counters when there is a value unassigned
    `void` | ConflictStatistics.`constraintBeforeAssigned(Assignment<V,T> assignment, long iteration, Constraint<V,T> constraint, T assigned, Set<T> unassigned)`
    `void` | ConflictStatistics.`constraintRemoved(Constraint<V,T> constraint)`
    `void` | Extension.`constraintRemoved(Constraint<V,T> constraint)` Called when a constraint is removed from the model
    `boolean` | MacPropagation.`contains(Constraint<V,T> constraint)` Returns true, if arc-consistency is to be maintained on the given constraint
    `boolean` | MacRevised.`contains(Constraint<V,T> constraint)` Returns true, if arc-consistency is to be maintained on the given constraint
    `Set<T>` | MacRevised.NoGood.`explanation(Assignment<V,T> assignment, Constraint<V,T> constraint, T value, V variable)`
    `boolean` | MacRevised.NoGood.`hasSupport(Assignment<V,T> assignment, Constraint<V,T> constraint, T value, V variable)`
    `void` | MacRevised.NoGood.`propagate(Assignment<V,T> assignment, Constraint<V,T> constraint, T noGoodValue, List<T> queue)`
    `boolean` | MacRevised.NoGood.`revise(Assignment<V,T> assignment, Constraint<V,T> constraint, T value)`
    `void` | AssignedValue.`setConstraint(Constraint<?,T> constraint)` Sets constraint
    `void` | AssignedValueSet.`setConstraint(Constraint<?,T> constraint)` Sets constraint
    `Set<T>` | MacRevised.NoGood.`supports(Assignment<V,T> assignment, Constraint<V,T> constraint, T value, V variable)`

  - ### Uses of Constraint in org.cpsolver.ifs.model

    Subclasses of Constraint in org.cpsolver.ifs.model
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BinaryConstraint<V extends Variable<V,T>,T extends Value<V,T>>` Binary constraint.
    `class` | `GlobalConstraint<V extends Variable<V,T>,T extends Value<V,T>>` Generic global constraint.

    Methods in org.cpsolver.ifs.model that return types with arguments of type Constraint
    Modifier and Type | Method and Description
    --- | ---
    `Map<Constraint<V,T>,Set<T>>` | Model.`conflictConstraints(Assignment<V,T> assignment, T value)` The list of constraints which are in a conflict with the given value if it is assigned to its variable.
    `List<Constraint<V,T>>` | Model.`constraints()` The list of constraints in the model
    `List<Constraint<V,T>>` | Variable.`constraints()` Return the list of constraints associated with this variable
    `Map<V,List<Constraint<V,T>>>` | Variable.`constraintVariables()` Returns a table of all variables linked with this variable by a constraint.
    `List<Constraint<V,T>>` | Variable.`hardConstraints()` Return the list of hard constraints associated with this variable
    `List<Constraint<V,T>>` | Variable.`softConstraints()` Return the list of soft constraints associated with this variable
    `List<Constraint<V,T>>` | Model.`unassignedHardConstraints(Assignment<V,T> assignment)` The list of hard constraints which contain at least one variable that is not assigned.

    Methods in org.cpsolver.ifs.model with parameters of type Constraint
    Modifier and Type | Method and Description
    --- | ---
    `void` | Model.`addConstraint(Constraint<V,T> constraint)` Adds a constraint to the model
    `void` | Variable.`addContstraint(Constraint<V,T> constraint)` Adds a constraint.
    `int` | Constraint.`compareTo(Constraint<V,T> c)`
    `void` | ModelListener.`constraintAdded(Constraint<V,T> constraint)` Constraint is added to the model
    `void` | ConstraintListener.`constraintAfterAssigned(Assignment<V,T> assignment, long iteration, Constraint<V,T> constraint, T assigned, Set<T> unassigned)` Called by the constraint, after a value is assigned to its variable.
    `void` | ConstraintListener.`constraintBeforeAssigned(Assignment<V,T> assignment, long iteration, Constraint<V,T> constraint, T assigned, Set<T> unassigned)` Called by the constraint, before a value is assigned to its variable.
    `void` | ModelListener.`constraintRemoved(Constraint<V,T> constraint)` Constraint is removed from the model
    `void` | Model.`removeConstraint(Constraint<V,T> constraint)` Removes a constraint from the model
    `void` | Variable.`removeContstraint(Constraint<V,T> constraint)` Removes a constraint.

  - ### Uses of Constraint in org.cpsolver.instructor.constraints

    Subclasses of Constraint in org.cpsolver.instructor.constraints
    Modifier and Type | Class and Description
    --- | ---
    `class` | `SameInstructorConstraint` Same Instructor Constraint.
    `class` | `SameLinkConstraint` Same Link Constraint.

  - ### Uses of Constraint in org.cpsolver.studentsct.constraint

    Subclasses of Constraint in org.cpsolver.studentsct.constraint
    Modifier and Type | Class and Description
    --- | ---
    `class` | `CancelledSections` Cancelled sections constraint.
    `class` | `ConfigLimit` Configuration limit constraint.
    `class` | `CourseLimit` Course limit constraint.
    `class` | `DependentCourses` Global constraint for dependent courses.
    `class` | `DisabledSections` Disabled sections constraint.
    `class` | `FixedAssignments` Fixed assignment constraint.
    `class` | `FixInitialAssignments` Fix initial assignment constraint.
    `class` | `FreeTimeConflicts` A simple global constraint that does not allow an overlap with a higher priority free time request, even when it is not assigned.
    `class` | `HardDistanceConflicts` Hard distance conflicts constraint.
    `class` | `LinkedSections.LinkedSectionsConstraint` Linked sections constraint -- to be created for each student that requests two or more offerings of this link
    `class` | `RequiredReservation` Required reservation constraint.
    `class` | `RequiredRestrictions` Required restrictions constraint.
    `class` | `RequiredSections` Required sections constraint.
    `class` | `ReservationLimit` Reservation limit constraint.
    `class` | `SectionLimit` Section limit constraint.
    `class` | `StudentConflict` This constraints ensures that a student is not enrolled into sections that are overlapping in time.
    `class` | `StudentNotAvailable` Student not available.

  - ### Uses of Constraint in org.cpsolver.studentsct.online

    Subclasses of Constraint in org.cpsolver.studentsct.online
    Modifier and Type | Class and Description
    --- | ---
    `class` | `MaxOverExpectedConstraint` A global constraint limiting the over-expected penalization for a student.