org.cpsolver.studentsct

## Class StudentSectioningModel.StudentSectioningModelContext

- java.lang.Object
- - org.cpsolver.studentsct.StudentSectioningModel.StudentSectioningModelContext

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

      public class StudentSectioningModel.StudentSectioningModelContext
      extends Object
      implements AssignmentConstraintContext<Request,Enrollment>, InfoProvider<Request,Enrollment>

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Assignment<Request,Enrollment> assignment, DistanceConflict.Conflict c)`
    `void` | `add(Assignment<Request,Enrollment> assignment, StudentQuality.Conflict c)`
    `void` | `add(Assignment<Request,Enrollment> assignment, TimeOverlapsCounter.Conflict c)`
    `void` | `assigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)` Called after an enrollment was assigned to a request.
    `double` | `getAssignedCourseRequestWeight()`
    `double` | `getAssignedCriticalCourseRequestWeight(Request.RequestPriority rp)`
    `Set<Student>` | `getCompleteStudents()` Students with complete schedules (see `Student.isComplete(Assignment)`)
    `void` | `getInfo(Assignment<Request,Enrollment> assignment, Map<String,String> info)` Adds some information into the table with information about the solution
    `void` | `getInfo(Assignment<Request,Enrollment> assignment, Map<String,String> info, Collection<Request> variables)` Adds some information into the table with information about the solution, only consider variables from the given set
    `int` | `getNrAssignedLastLikeRequests()` Number of requests from projected (`Student.isDummy()` equals true) students that are assigned.
    `int` | `getNrCompleteLastLikeStudents()` Number of last like (`Student.isDummy()` equals true) students with a complete schedule (`Student.isComplete(Assignment)` equals true).
    `double` | `getTotalValue()` Overall solution value
    `int` | `nrComplete()` Number of students with complete schedule
    `void` | `remove(Assignment<Request,Enrollment> assignment, DistanceConflict.Conflict c)`
    `void` | `remove(Assignment<Request,Enrollment> assignment, StudentQuality.Conflict c)`
    `void` | `remove(Assignment<Request,Enrollment> assignment, TimeOverlapsCounter.Conflict c)`
    `void` | `requestWeightsChanged(Assignment<Request,Enrollment> assignment)` Recompute cached request weights
    `void` | `unassigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)` Called before an enrollment was unassigned from a request.

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

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

- - ### Constructor Detail

    - #### StudentSectioningModelContext

          public StudentSectioningModelContext(StudentSectioningModel.StudentSectioningModelContext parent)

    - #### StudentSectioningModelContext

          public StudentSectioningModelContext(Assignment<Request,Enrollment> assignment)

  - ### Method Detail

    - #### assigned

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

      Called after an enrollment was assigned to a request. The list of complete students and the overall solution value are updated.
      Specified by:
        `assigned` in interface `AssignmentConstraintContext<Request,Enrollment>`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `enrollment` - assigned value

    - #### unassigned

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

      Called before an enrollment was unassigned from a request. The list of complete students and the overall solution value are updated.
      Specified by:
        `unassigned` in interface `AssignmentConstraintContext<Request,Enrollment>`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `enrollment` - unassigned value

    - #### add

          public void add(Assignment<Request,Enrollment> assignment,
                          DistanceConflict.Conflict c)

    - #### remove

          public void remove(Assignment<Request,Enrollment> assignment,
                             DistanceConflict.Conflict c)

    - #### add

          public void add(Assignment<Request,Enrollment> assignment,
                          TimeOverlapsCounter.Conflict c)

    - #### remove

          public void remove(Assignment<Request,Enrollment> assignment,
                             TimeOverlapsCounter.Conflict c)

    - #### add

          public void add(Assignment<Request,Enrollment> assignment,
                          StudentQuality.Conflict c)

    - #### remove

          public void remove(Assignment<Request,Enrollment> assignment,
                             StudentQuality.Conflict c)

    - #### getCompleteStudents

          public Set<Student> getCompleteStudents()

      Students with complete schedules (see `Student.isComplete(Assignment)`)
      Returns:
        students with complete schedule

    - #### nrComplete

          public int nrComplete()

      Number of students with complete schedule
      Returns:
        number of students with complete schedule

    - #### requestWeightsChanged

          public void requestWeightsChanged(Assignment<Request,Enrollment> assignment)

      Recompute cached request weights
      Parameters:
        `assignment` - curent assignment

    - #### getTotalValue

          public double getTotalValue()

      Overall solution value
      Returns:
        solution value

    - #### getNrCompleteLastLikeStudents

          public int getNrCompleteLastLikeStudents()

      Number of last like (`Student.isDummy()` equals true) students with a complete schedule (`Student.isComplete(Assignment)` equals true).
      Returns:
        number of last like (projected) students with a complete schedule

    - #### getNrAssignedLastLikeRequests

          public int getNrAssignedLastLikeRequests()

      Number of requests from projected (`Student.isDummy()` equals true) students that are assigned.
      Returns:
        number of real students with a complete schedule

    - #### getInfo

          public void getInfo(Assignment<Request,Enrollment> assignment,
                              Map<String,String> info)

      Description copied from interface: `InfoProvider`
      Adds some information into the table with information about the solution
      Specified by:
        `getInfo` in interface `InfoProvider<Request,Enrollment>`
      Parameters:
        `assignment` - current assignment
        `info` - info table

    - #### getInfo

          public void getInfo(Assignment<Request,Enrollment> assignment,
                              Map<String,String> info,
                              Collection<Request> variables)

      Description copied from interface: `InfoProvider`
      Adds some information into the table with information about the solution, only consider variables from the given set
      Specified by:
        `getInfo` in interface `InfoProvider<Request,Enrollment>`
      Parameters:
        `assignment` - current assignment
        `info` - info table
        `variables` - sub-problem

    - #### getAssignedCourseRequestWeight

          public double getAssignedCourseRequestWeight()

    - #### getAssignedCriticalCourseRequestWeight

          public double getAssignedCriticalCourseRequestWeight(Request.RequestPriority rp)