org.cpsolver.studentsct.heuristics.selection

## Class OnlineSelection.EpsilonSelection

- java.lang.Object
- - org.cpsolver.studentsct.heuristics.selection.BranchBoundSelection.Selection
  - - org.cpsolver.studentsct.heuristics.selection.OnlineSelection.EpsilonSelection

- Enclosing class:
    OnlineSelection

      public class OnlineSelection.EpsilonSelection
      extends BranchBoundSelection.Selection

  Branch & bound selection for a student

- - ### Field Summary

    - ### Fields inherited from class org.cpsolver.studentsct.heuristics.selection.BranchBoundSelection.Selection

      `iAssignment, iBestAssignment, iBestValue, iCurrentAssignment, iStudent, iT0, iT1, iTimeoutReached, iTimesToAvoid, iValues`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EpsilonSelection(Student student, Assignment<Request,Enrollment> assignment, BranchBoundSelection.Selection selection)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Enrollment` | `firstConflict(int idx, Enrollment enrollment)` First conflicting enrollment
    `protected double` | `getAssignmentPenalty(int i)` Assignment penalty
    `StudentPreferencePenalties` | `getPenalties()` Student preference penalties
    `boolean` | `isAllowed(int idx, Enrollment enrollment)`
    `BranchBoundSelection.BranchBoundNeighbour` | `select()` Execute branch & bound, return the best found schedule for the selected student.

    - ### Methods inherited from class org.cpsolver.studentsct.heuristics.selection.BranchBoundSelection.Selection

      `backTrack, canAssign, canLeaveUnassigned, getBestAssignment, getBestNrAssigned, getBestValue, getBound, getBound, getDistanceConflicts, getNrAssigned, getNrAssignedBound, getPenalty, getPenaltyBound, getStudentQualityConflicts, getTime, getTimeOverlappingConflicts, getValue, getWeight, getWeight, inConflict, isTimeoutReached, saveBest, values`

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

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

- - ### Constructor Detail

    - #### EpsilonSelection

          public EpsilonSelection(Student student,
                                  Assignment<Request,Enrollment> assignment,
                                  BranchBoundSelection.Selection selection)

      Constructor
      Parameters:
        `student` - selected student
        `assignment` - current assignment
        `selection` - selection

  - ### Method Detail

    - #### select

          public BranchBoundSelection.BranchBoundNeighbour select()

      Execute branch & bound, return the best found schedule for the selected student.
      Overrides:
        `select` in class `BranchBoundSelection.Selection`
      Returns:
        best found schedule for the student

    - #### getAssignmentPenalty

          protected double getAssignmentPenalty(int i)

      Assignment penalty
      Overrides:
        `getAssignmentPenalty` in class `BranchBoundSelection.Selection`
      Parameters:
        `i` - index of the request
      Returns:
        assignment penalty

    - #### isAllowed

          public boolean isAllowed(int idx,
                                   Enrollment enrollment)

    - #### firstConflict

          public Enrollment firstConflict(int idx,
                                          Enrollment enrollment)

      First conflicting enrollment
      Overrides:
        `firstConflict` in class `BranchBoundSelection.Selection`
      Parameters:
        `idx` - index of request
        `enrollment` - enrollment in question
      Returns:
        first conflicting enrollment

    - #### getPenalties

          public StudentPreferencePenalties getPenalties()

      Student preference penalties
      Returns:
        student preference penalties