net.sf.cpsolver.coursett.model

## Class InitialSectioning

- java.lang.Object
- - net.sf.cpsolver.coursett.model.InitialSectioning

- Direct Known Subclasses:
    DeterministicStudentSectioning.DeterministicInitialSectioning

      public class InitialSectioning
      extends Object

  Student initial sectioning (before a solver is started).
  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.
  Before implementing the solver, an initial sectioning of students into classes is processed. This sectioning is based on Carter's homogeneous sectioning and is intended to minimize future student conflicts. 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.2 (University Course Timetabling)
    Copyright (C) 2006 - 2010 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/.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `InitialSectioning.Group`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected InitialSectioning.Group[]` | `iGroups`
    `protected Long` | `iOfferingId`
    `protected Progress` | `iProgress`
    `protected Collection<Student>` | `iStudents`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InitialSectioning(Progress progress, Long offeringId, Collection<?> lectureOrConfigurations, Collection<Student> students)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStudent(Student student)`
    `InitialSectioning.Group[]` | `getGroups()`
    `static void` | `initialSectioningCfg(Progress p, Long offeringId, String courseName, Collection<Student> students, List<Configuration> configurations)`
    `boolean` | `moveIntoOneStudent(InitialSectioning.Group group)`
    `protected void` | `tweakSizes(double total)`

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

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

- - ### Field Detail

    - #### iStudents

          protected Collection<Student> iStudents

    - #### iGroups

          protected InitialSectioning.Group[] iGroups

    - #### iOfferingId

          protected Long iOfferingId

    - #### iProgress

          protected Progress iProgress

  - ### Constructor Detail

    - #### InitialSectioning

          public InitialSectioning(Progress progress,
                                   Long offeringId,
                                   Collection<?> lectureOrConfigurations,
                                   Collection<Student> students)

  - ### Method Detail

    - #### tweakSizes

          protected void tweakSizes(double total)

    - #### addStudent

          public void addStudent(Student student)

    - #### moveIntoOneStudent

          public boolean moveIntoOneStudent(InitialSectioning.Group group)

    - #### getGroups

          public InitialSectioning.Group[] getGroups()

    - #### initialSectioningCfg

          public static void initialSectioningCfg(Progress p,
                                                  Long offeringId,
                                                  String courseName,
                                                  Collection<Student> students,
                                                  List<Configuration> configurations)