org.cpsolver.studentsct.extension

## Class StudentConflictStatistics

- java.lang.Object
- - org.cpsolver.ifs.extension.Extension<V,T>
  - - org.cpsolver.ifs.extension.ConflictStatistics<Request,Enrollment>
    - - org.cpsolver.studentsct.extension.StudentConflictStatistics

- All Implemented Interfaces:
    ConstraintListener<Request,Enrollment>, ModelListener<Request,Enrollment>

      public class StudentConflictStatistics
      extends ConflictStatistics<Request,Enrollment>

  Same as `ConflictStatistics`, however, conflict with real students can be weighted differently than with last-like students.
  Parameters:

  Related Solver Parameters
  Parameter | Type | Comment
  --- | --- | ---
  StudentConflictStatistics.RealStudentWeight | `Double` | Weight of a conflict with a real student (`Student.isDummy()` is false).
  StudentConflictStatistics.RealStudentWeight | `Double` | Weight of a conflict with a last-like student (`Student.isDummy()` is true).

  Version:
    StudentSct 1.3 (Student Sectioning)
    Copyright (C) 2007 - 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/.
  Author:
    Tomáš Müller

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `double` | `iDummyStudentWeight`
    `double` | `iRealStudentWeight`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StudentConflictStatistics(Solver<Request,Enrollment> solver, DataProperties properties)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `countRemovals(long iteration, Enrollment conflictValue, Enrollment value)` Counts number of unassignments of the given conflicting value caused by the assignment of the given value.

    - ### Methods inherited from class org.cpsolver.ifs.extension.ConflictStatistics

      `constraintAdded, constraintAfterAssigned, constraintBeforeAssigned, constraintRemoved, countAssignments, countPotentialConflicts, countRemovals, getNoGoods, register, reset, toString, unregister, variableUnassigned`

    - ### Methods inherited from class org.cpsolver.ifs.extension.Extension

      `afterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, getModel, getProperties, getSolver, init, isRegistered, variableAdded, variableRemoved`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### iRealStudentWeight

          public double iRealStudentWeight

    - #### iDummyStudentWeight

          public double iDummyStudentWeight

  - ### Constructor Detail

    - #### StudentConflictStatistics

          public StudentConflictStatistics(Solver<Request,Enrollment> solver,
                                           DataProperties properties)

  - ### Method Detail

    - #### countRemovals

          public double countRemovals(long iteration,
                                      Enrollment conflictValue,
                                      Enrollment value)

      Description copied from class: `ConflictStatistics`
      Counts number of unassignments of the given conflicting value caused by the assignment of the given value.
      Overrides:
        `countRemovals` in class `ConflictStatistics<Request,Enrollment>`
      Parameters:
        `iteration` - current iteration
        `conflictValue` - value conflicting with the given value
        `value` - given value
      Returns:
        number of unassignments