org.cpsolver.studentsct.constraint

## Class FixedAssignments

- java.lang.Object
- - org.cpsolver.ifs.model.Constraint<V,T>
  - - org.cpsolver.ifs.model.GlobalConstraint<Request,Enrollment>
    - - org.cpsolver.studentsct.constraint.FixedAssignments

- All Implemented Interfaces:
    Comparable<Constraint<Request,Enrollment>>

      public class FixedAssignments
      extends GlobalConstraint<Request,Enrollment>

  Fixed assignment constraint. This global constraint checks that the conflicts that have been computed so far (by other global constraints earlier in the list) do not create a conflict with a fixed assignment. This constraint is to be used only when there are fixed course requests and it is to be last global constraint in the list.
  Version:
    StudentSct 1.3 (Student Sectioning)
    Copyright (C) 2007 - 2015 Tomáš Müller
    muller@unitime.org
    http://muller.unitime.org
    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.

- - ### Field Summary

    - ### Fields inherited from class org.cpsolver.ifs.model.Constraint

      `iConstraintListeners, iId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FixedAssignments()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `computeConflicts(Assignment<Request,Enrollment> assignment, Enrollment enrollment, Set<Enrollment> conflicts)` If there is a conflict that is fixed (method `CourseRequest.isFixed()` returns true) and equal to the initial assignment (returned by `CourseRequest.getFixedValue()`), the given enrollment is put into the conflicts.

    - ### Methods inherited from class org.cpsolver.ifs.model.GlobalConstraint

      `addVariable, assigned, assignedVariables, countAssignedVariables, removeVariable, unassigned, variables`

    - ### Methods inherited from class org.cpsolver.ifs.model.Constraint

      `addConstraintListener, compareTo, computeConflictsNoForwardCheck, constraintListeners, countVariables, equals, getDescription, getId, getModel, getName, hashCode, inConflict, isConsistent, isHard, removeConstraintListener, setModel`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FixedAssignments

          public FixedAssignments()

  - ### Method Detail

    - #### computeConflicts

          public void computeConflicts(Assignment<Request,Enrollment> assignment,
                                       Enrollment enrollment,
                                       Set<Enrollment> conflicts)

      If there is a conflict that is fixed (method `CourseRequest.isFixed()` returns true) and equal to the initial assignment (returned by `CourseRequest.getFixedValue()`), the given enrollment is put into the conflicts.
      Specified by:
        `computeConflicts` in class `Constraint<Request,Enrollment>`
      Parameters:
        `assignment` - current assignment
        `enrollment` - value to be assigned to its variable
        `conflicts` - resultant set of conflicting values