org.cpsolver.studentsct.extension

## Class StudentQuality.StudentQualityContext

- java.lang.Object
- - org.cpsolver.studentsct.extension.StudentQuality.StudentQualityContext

- All Implemented Interfaces:
    AssignmentConstraintContext<Request,Enrollment>, AssignmentContext
  Enclosing class:
    StudentQuality

      public class StudentQuality.StudentQualityContext
      extends Object
      implements AssignmentConstraintContext<Request,Enrollment>

  Assignment context

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StudentQualityContext(Assignment<Request,Enrollment> assignment)`
    `StudentQualityContext(StudentQuality.StudentQualityContext parent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterAssigned(Assignment<Request,Enrollment> assignment, long iteration, Enrollment value)` Called after a value is assigned to a variable.
    `void` | `afterUnassigned(Assignment<Request,Enrollment> assignment, long iteration, Enrollment value)` Called after a value is unassigned from a variable.
    `Set<StudentQuality.Conflict>` | `allConflicts(StudentQuality.Type type, Assignment<Request,Enrollment> assignment, Enrollment enrollment)`
    `int` | `allPenalty(StudentQuality.Type type, Assignment<Request,Enrollment> assignment, Enrollment enrollment)`
    `void` | `assigned(Assignment<Request,Enrollment> assignment, Enrollment value)` Called when `ConstraintWithContext.assigned(Assignment, long, Value)` is called to update the content of the context.
    `void` | `beforeAssigned(Assignment<Request,Enrollment> assignment, long iteration, Enrollment value)` Called before a value is assigned to a variable.
    `Set<StudentQuality.Conflict>` | `computeAllConflicts(StudentQuality.Type type, Assignment<Request,Enrollment> assignment)`
    `int` | `countTotalPenalty(StudentQuality.Type type, Assignment<Request,Enrollment> assignment)`
    `Set<StudentQuality.Conflict>` | `getAllConflicts(StudentQuality.Type type)`
    `int` | `getTotalPenalty(StudentQuality.Type type)`
    `void` | `checkTotalPenalty(StudentQuality.Type type, Assignment<Request,Enrollment> assignment)`
    `void` | `unassigned(Assignment<Request,Enrollment> assignment, Enrollment value)` Called when a value is unassigned from a variable.

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

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

- - ### Constructor Detail

    - #### StudentQualityContext

          public StudentQualityContext(Assignment<Request,Enrollment> assignment)

    - #### StudentQualityContext

          public StudentQualityContext(StudentQuality.StudentQualityContext parent)

  - ### Method Detail

    - #### assigned

          public void assigned(Assignment<Request,Enrollment> assignment,
                               Enrollment value)

      Description copied from interface: `AssignmentConstraintContext`
      Called when `ConstraintWithContext.assigned(Assignment, long, Value)` is called to update the content of the context.
      Specified by:
        `assigned` in interface `AssignmentConstraintContext<Request,Enrollment>`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `value` - assigned value

    - #### unassigned

          public void unassigned(Assignment<Request,Enrollment> assignment,
                                 Enrollment value)

      Called when a value is unassigned from a variable. Internal number of time overlapping conflicts is updated, see `TimeOverlapsCounter.getTotalNrConflicts(Assignment)`.
      Specified by:
        `unassigned` in interface `AssignmentConstraintContext<Request,Enrollment>`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `value` - unassigned value

    - #### beforeAssigned

          public void beforeAssigned(Assignment<Request,Enrollment> assignment,
                                     long iteration,
                                     Enrollment value)

      Called before a value is assigned to a variable.
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value to be assigned

    - #### afterAssigned

          public void afterAssigned(Assignment<Request,Enrollment> assignment,
                                    long iteration,
                                    Enrollment value)

      Called after a value is assigned to a variable.
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value that was assigned

    - #### afterUnassigned

          public void afterUnassigned(Assignment<Request,Enrollment> assignment,
                                      long iteration,
                                      Enrollment value)

      Called after a value is unassigned from a variable.
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value that was unassigned

    - #### getAllConflicts

          public Set<StudentQuality.Conflict> getAllConflicts(StudentQuality.Type type)

    - #### getTotalPenalty

          public int getTotalPenalty(StudentQuality.Type type)

    - #### checkTotalPenalty

          public void checkTotalPenalty(StudentQuality.Type type,
                                        Assignment<Request,Enrollment> assignment)

    - #### countTotalPenalty

          public int countTotalPenalty(StudentQuality.Type type,
                                       Assignment<Request,Enrollment> assignment)

    - #### computeAllConflicts

          public Set<StudentQuality.Conflict> computeAllConflicts(StudentQuality.Type type,
                                                                  Assignment<Request,Enrollment> assignment)

    - #### allConflicts

          public Set<StudentQuality.Conflict> allConflicts(StudentQuality.Type type,
                                                           Assignment<Request,Enrollment> assignment,
                                                           Enrollment enrollment)

    - #### allPenalty

          public int allPenalty(StudentQuality.Type type,
                                Assignment<Request,Enrollment> assignment,
                                Enrollment enrollment)