org.cpsolver.studentsct.online.expectations

## Interface OverExpectedCriterion.HasContext

- All Known Implementing Classes:
    MinimizeConflicts
  Enclosing interface:
    OverExpectedCriterion

      public static interface OverExpectedCriterion.HasContext

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getOverExpected(Assignment<Request,Enrollment> assignment, Enrollment[] enrollment, int index, Section section, Request request)` Expectation penalty, to be minimized
    `double` | `getOverExpected(Assignment<Request,Enrollment> assignment, Enrollment selection, Enrollment value, Set<Enrollment> conflicts)` Expectation penalty, to be minimized.

- - ### Method Detail

    - #### getOverExpected

          double getOverExpected(Assignment<Request,Enrollment> assignment,
                                 Enrollment selection,
                                 Enrollment value,
                                 Set<Enrollment> conflicts)

      Expectation penalty, to be minimized. A variant of the `OverExpectedCriterion.getOverExpected(Assignment, Section, Request)` method that can be called from `Constraint.computeConflicts(Assignment, Value, Set)`.
      Parameters:
        `assignment` - current assignment
        `selection` - selected enrollment question
        `value` - an enrollment to be assigned
        `conflicts` - enrollments that have been already identified as conflicting
      Returns:
        expectation penalty (typically 1.0 / number of subparts when over-expected, 0.0 otherwise)

    - #### getOverExpected

          double getOverExpected(Assignment<Request,Enrollment> assignment,
                                 Enrollment[] enrollment,
                                 int index,
                                 Section section,
                                 Request request)

      Expectation penalty, to be minimized
      Parameters:
        `assignment` - current assignment
        `enrollment` - current assignment of the student
        `index` - only use enrollments 0 .. index - 1 from the assignment array
        `section` - section in question
        `request` - student course request
      Returns:
        expectation penalty (typically 1.0 / number of subparts when over-expected, 0.0 otherwise)