org.cpsolver.studentsct.report

## Class SectionConflictTable

- java.lang.Object
- - org.cpsolver.studentsct.report.SectionConflictTable

- All Implemented Interfaces:
    StudentSectioningReport

      public class SectionConflictTable
      extends Object
      implements StudentSectioningReport

  This class computes time and availability conflicts on classes in a `CSVFile` comma separated text file.
  The first report (type OVERLAPS) shows time conflicts between pairs of classes. Each such enrollment is given a weight of 1/n, where n is the number of available enrollments of the student into the course. This 1/n is added to each class that is present in a conflict. These numbers are aggregated on individual classes and on pairs of classes (that are in a time conflict).
  The second report (type UNAVAILABILITIES) shows for each course how many students could not get into the course because of the limit constraints. It considers all the not-conflicting, but unavailable enrollments of a student into the course. For each such an enrollment 1/n is added to each class. So, in a way, the Availability Conflicts column shows how much space is missing in each class. The Class Potential column can be handy as well. If the class would be unlimited, this is the number of students (out of all the conflicting students) that can get into the class.
  The last report (type OVERLAPS_AND_UNAVAILABILITIES) show the two reports together. It is possible that there is a course where some students cannot get in because of availabilities (all not-conflicting enrollments have no available space) as well as time conflicts (all available enrollments are conflicting with some other classes the student has).
  Usage: new SectionConflictTable(model, type),createTable(true, true).save(aFile);
  Version:
    StudentSct 1.3 (Student Sectioning)
    Copyright (C) 2013 - 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/.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SectionConflictTable.Type` Report type

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SectionConflictTable(StudentSectioningModel model)`
    `SectionConflictTable(StudentSectioningModel model, SectionConflictTable.Type type)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CSVFile` | `create(Assignment<Request,Enrollment> assignment, DataProperties properties)`
    `CSVFile` | `createTable(Assignment<Request,Enrollment> assignment, boolean includeLastLikeStudents, boolean includeRealStudents, boolean useAmPm)` Create report
    `StudentSectioningModel` | `getModel()` Return student sectioning model

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

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

- - ### Constructor Detail

    - #### SectionConflictTable

          public SectionConflictTable(StudentSectioningModel model,
                                      SectionConflictTable.Type type)

      Constructor
      Parameters:
        `model` - student sectioning model
        `type` - report type

    - #### SectionConflictTable

          public SectionConflictTable(StudentSectioningModel model)

  - ### Method Detail

    - #### getModel

          public StudentSectioningModel getModel()

      Return student sectioning model
      Returns:
        problem model

    - #### createTable

          public CSVFile createTable(Assignment<Request,Enrollment> assignment,
                                     boolean includeLastLikeStudents,
                                     boolean includeRealStudents,
                                     boolean useAmPm)

      Create report
      Parameters:
        `assignment` - current assignment
        `includeLastLikeStudents` - true, if last-like students should be included (i.e., `Student.isDummy()` is true)
        `includeRealStudents` - true, if real students should be included (i.e., `Student.isDummy()` is false)
        `useAmPm` - use 12-hour format
      Returns:
        report as comma separated text file

    - #### create

          public CSVFile create(Assignment<Request,Enrollment> assignment,
                                DataProperties properties)

      Specified by:
        `create` in interface `StudentSectioningReport`