org.cpsolver.coursett.model

## Interface StudentSectioning

- All Known Implementing Classes:
    DefaultStudentSectioning, DeterministicStudentSectioning, SctSectioning, StudentSwapSectioning

      public interface StudentSectioning

  Interface for student sectioning functions needed within the course timetabling solver.
  Many course offerings consist of multiple classes, with students enrolled in the course divided among them. These classes are often linked by a set of constraints, namely:
  - Each class has a limit stating the maximum number of students who can be enrolled in it.
  - A student must be enrolled in exactly one class for each subpart of a course.
  - If two subparts of a course have a parent-child relationship, a student enrolled in the parent class must also be enrolled in one of the child classes.
  Moreover, some of the classes of an offering may be required or prohibited for certain students, based on reservations that can be set on an offering, a configuration, or a class.
  While the data are loaded into the solver, an initial sectioning of students into classes is processed (see `InitialSectioning`). However, it is still possible to improve on the number of student conflicts in the solution. This can be accomplished by moving students between alternative classes of the same course during or after the search (see `FinalSectioning`).
  Version:
    CourseTT 1.3 (University Course Timetabling)
    Copyright (C) 2014 Tomáš Müller
    muller@unitime.org
    http://muller.unitime.org
    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.
  Author:
    Tomáš Müller

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasFinalSectioning()` Return true if final student sectioning is implemented.
    `void` | `initialSectioning(Assignment<Lecture,Placement> assignment, Long offeringId, String courseName, Collection<Student> students, Collection<Configuration> configurations)` Enroll students into the given offering during the initial data load.
    `void` | `resection(Assignment<Lecture,Placement> assignment, Lecture lecture, boolean recursive, boolean configAsWell)` Perform sectioning on the given lecture
    `void` | `switchStudents(Solution<Lecture,Placement> solution, TerminationCondition<Lecture,Placement> termination)` Run student final sectioning (switching students between sections of the same class in order to minimize overall number of student conflicts).

- - ### Method Detail

    - #### initialSectioning

          void initialSectioning(Assignment<Lecture,Placement> assignment,
                                 Long offeringId,
                                 String courseName,
                                 Collection<Student> students,
                                 Collection<Configuration> configurations)

      Enroll students into the given offering during the initial data load.
      Parameters:
        `assignment` - current assignment
        `offeringId` - instructional offering id
        `courseName` - course name
        `students` - list of students to be sectioned
        `configurations` - list of configurations the students are to be sectioned into

    - #### hasFinalSectioning

          boolean hasFinalSectioning()

      Return true if final student sectioning is implemented.
      Returns:
        true if final student sectioning is implemented

    - #### switchStudents

          void switchStudents(Solution<Lecture,Placement> solution,
                              TerminationCondition<Lecture,Placement> termination)

      Run student final sectioning (switching students between sections of the same class in order to minimize overall number of student conflicts).
      Parameters:
        `solution` - current solution
        `termination` - termination condition (optional)

    - #### resection

          void resection(Assignment<Lecture,Placement> assignment,
                         Lecture lecture,
                         boolean recursive,
                         boolean configAsWell)

      Perform sectioning on the given lecture
      Parameters:
        `assignment` - current assignment
        `lecture` - given lecture
        `recursive` - recursively resection lectures affected by a student swap
        `configAsWell` - resection students between configurations as well