org.cpsolver.studentsct.online.selection

## Class SuggestionsBranchAndBound.Suggestion

- java.lang.Object
- - org.cpsolver.studentsct.online.selection.SuggestionsBranchAndBound.Suggestion

- All Implemented Interfaces:
    Comparable<SuggestionsBranchAndBound.Suggestion>
  Enclosing class:
    SuggestionsBranchAndBound

      public class SuggestionsBranchAndBound.Suggestion
      extends Object
      implements Comparable<SuggestionsBranchAndBound.Suggestion>

  Suggestion

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Suggestion(ArrayList<Request> resolvedRequests)` Create suggestion

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(SuggestionsBranchAndBound.Suggestion suggestion)`
    `double` | `getAverageUnassignedPriority()` Average unassigned priority
    `Enrollment[]` | `getEnrollments()` Current assignment for the student
    `int` | `getNrChanges()` Number of changes in this schedule (comparing to the original one)
    `int` | `getNrUnassigned()` Number of unassigned requests
    `double` | `getValue()` Current value
    `void` | `init()` initialization
    `boolean` | `sameSelectedSection()` Is the same section selected (as in the current assignment)

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

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

- - ### Constructor Detail

    - #### Suggestion

          public Suggestion(ArrayList<Request> resolvedRequests)

      Create suggestion
      Parameters:
        `resolvedRequests` - assigned requests

  - ### Method Detail

    - #### init

          public void init()

      initialization

    - #### getEnrollments

          public Enrollment[] getEnrollments()

      Current assignment for the student
      Returns:
        schedule

    - #### getValue

          public double getValue()

      Current value
      Returns:
        assignment value

    - #### getNrUnassigned

          public int getNrUnassigned()

      Number of unassigned requests
      Returns:
        number of unassigned requests

    - #### getAverageUnassignedPriority

          public double getAverageUnassignedPriority()

      Average unassigned priority
      Returns:
        average priority of unassinged requests

    - #### getNrChanges

          public int getNrChanges()

      Number of changes in this schedule (comparing to the original one)
      Returns:
        number of changes

    - #### sameSelectedSection

          public boolean sameSelectedSection()

      Is the same section selected (as in the current assignment)
      Returns:
        true the same section is selected

    - #### compareTo

          public int compareTo(SuggestionsBranchAndBound.Suggestion suggestion)

      Specified by:
        `compareTo` in interface `Comparable<SuggestionsBranchAndBound.Suggestion>`