org.cpsolver.coursett.constraint

## Class IgnoreStudentConflictsConstraint

- java.lang.Object
- - org.cpsolver.ifs.model.Constraint<Lecture,Placement>
  - - org.cpsolver.coursett.constraint.IgnoreStudentConflictsConstraint

- All Implemented Interfaces:
    Comparable<Constraint<Lecture,Placement>>

      public class IgnoreStudentConflictsConstraint
      extends Constraint<Lecture,Placement>

  Ignore student conflicts constraint.
  This constraint keeps track of classes between which student conflicts of any kind are to be ignored. This constraint is used by `Lecture.isToIgnoreStudentConflictsWith(Lecture)` and translates to `StudentConflict.ignore(Lecture, Lecture)` that is true when the two classes are connected by this constraint.
  Version:
    CourseTT 1.3 (University Course Timetabling)
    Copyright (C) 2013 - 2014 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
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `REFERENCE`

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

      `iConstraintListeners, iId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IgnoreStudentConflictsConstraint()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addVariable(Lecture variable)` Add a variable to this constraint
    `void` | `computeConflicts(Assignment<Lecture,Placement> assignment, Placement value, Set<Placement> conflicts)` The only method which has to be implemented by any constraint.
    `boolean` | `isHard()` Returns true if the constraint is hard.

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

      `addConstraintListener, assigned, assignedVariables, compareTo, computeConflictsNoForwardCheck, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, getName, hashCode, inConflict, isConsistent, removeConstraintListener, removeVariable, setModel, unassigned, variables`

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

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

- - ### Field Detail

    - #### REFERENCE

          public static final String REFERENCE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### IgnoreStudentConflictsConstraint

          public IgnoreStudentConflictsConstraint()

  - ### Method Detail

    - #### addVariable

          public void addVariable(Lecture variable)

      Description copied from class: `Constraint`
      Add a variable to this constraint
      Overrides:
        `addVariable` in class `Constraint<Lecture,Placement>`
      Parameters:
        `variable` - a variable

    - #### computeConflicts

          public void computeConflicts(Assignment<Lecture,Placement> assignment,
                                       Placement value,
                                       Set<Placement> conflicts)

      Description copied from class: `Constraint`
      The only method which has to be implemented by any constraint. It returns the values which needs to be unassigned in order to make this constraint consistent with the given value if it is assigned to its variable. The computed list of conflicting values is added to the given set of conflicts.
      Specified by:
        `computeConflicts` in class `Constraint<Lecture,Placement>`
      Parameters:
        `assignment` - current assignment
        `value` - value to be assigned to its variable
        `conflicts` - resultant set of conflicting values

    - #### isHard

          public boolean isHard()

      Description copied from class: `Constraint`
      Returns true if the constraint is hard. Only hard constraints are allowed to unassign a variable when there is a conflict with a value that is being assigned
      Overrides:
        `isHard` in class `Constraint<Lecture,Placement>`
      Returns:
        true if the constraint is hard