org.cpsolver.studentsct.online

## Class Test

- java.lang.Object
- - org.cpsolver.studentsct.online.Test

-     public class Test
      extends Object

  An online student sectioning test. It loads the given problem (passed as the only argument) with no assignments. It sections all students in the given order (given by -Dsort parameter, values shuffle, choice, reverse). Multiple threads can be used to section students in parallel (given by -DnrConcurrent parameter). If parameter -Dsuggestions is set to true, the test also asks for suggestions for each of the assigned class, preferring mid-day times. Over-expected criterion can be defined by the -Doverexp parameter (see the examples bellow). Multi-criteria selection can be enabled by -DStudentWeights.MultiCriteria=true and equal weighting can be set by -DStudentWeights.PriorityWeighting=equal).
  Usage:`java -Xmx1g -cp studentsct-1.3.jar [parameters] org.cpsolver.studentsct.online.Test data/pu-sect-fal07.xml
  ` Parameters:
  - -Dsort=shuffle|choice|reverse ... for taking students in random order, more choices first, or more choices last (defaults to shuffle)
  - -DnrConcurrent=N ... for the number of threads (concurrent computations of student schedules, defaults to 10)
  - -Dsuggestions=true|false ... true to use suggestions (to simulate students preferring mid-day, defaults to false)
  - -Doverexp=xover|bxover-xdisb%|xover-xmax|bxover-xmax-xdisb% for over-expected criterion, examples:
    - 1.1 ... `PercentageOverExpected` with OverExpected.Percentage set to 1.1 (xover)
    - b1-10 ... `AvoidUnbalancedWhenNoExpectations` with OverExpected.Percentage set to 1 and General.BalanceUnlimited set to 10/100 (xdisb%)
    - 0.85-5 ... `FractionallyOverExpected` with OverExpected.Percentage set to 0.85 and OverExpected.Maximum set to 5 (xmax)
    - 1.1-5-1 ... `FractionallyUnbalancedWhenNoExpectations` with OverExpected.Percentage set to 1.1, General.BalanceUnlimited set to 5/100, and OverExpected.Maximum set to 1
  - -DStudentWeights.PriorityWeighting=priority|equal ... priority or equal weighting (defaults to priority)
  - -DStudentWeights.MultiCriteria=true|false ... true for multi-criteria (lexicographic ordering), false for a weighted sum (default to true)
  - -DNeighbour.BranchAndBoundTimeout=M ... time limit for each student in milliseconds (CPU time, defaults to 1000)
  Version:
    StudentSct 1.3 (Student Sectioning)
    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

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Test.Executor`
    `class` | `Test.TestModel`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DecimalFormat` | `sDF`
    `static org.apache.logging.log4j.Logger` | `sLog`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Test(DataProperties config)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Request` | `addRequest(Student student, Student original, Request request, Map<Long,Section> classTable, StudentSectioningModel model)`
    `Assignment<Request,Enrollment>` | `assignment()`
    `protected Course` | `clone(Course course, long studentId, Student originalStudent, Map<Long,Section> classTable, StudentSectioningModel model)`
    `org.cpsolver.studentsct.online.Test.Counter` | `get(String name)`
    `double` | `getPercDisbalancedSections(Assignment<Request,Enrollment> assignment, double perc)`
    `void` | `inc(String name)`
    `void` | `inc(String name, double value)`
    `static void` | `main(String[] args)`
    `OnlineSectioningModel` | `model()`
    `void` | `run()`
    `boolean` | `section(Student original)`
    `static void` | `updateSpace(Assignment<Request,Enrollment> assignment, Enrollment enrollment, boolean increment)`

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

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

- - ### Field Detail

    - #### sDF

          public static DecimalFormat sDF

    - #### sLog

          public static org.apache.logging.log4j.Logger sLog

  - ### Constructor Detail

    - #### Test

          public Test(DataProperties config)

  - ### Method Detail

    - #### model

          public OnlineSectioningModel model()

    - #### assignment

          public Assignment<Request,Enrollment> assignment()

    - #### inc

          public void inc(String name,
                          double value)

    - #### inc

          public void inc(String name)

    - #### get

          public org.cpsolver.studentsct.online.Test.Counter get(String name)

    - #### getPercDisbalancedSections

          public double getPercDisbalancedSections(Assignment<Request,Enrollment> assignment,
                                                   double perc)

    - #### clone

          protected Course clone(Course course,
                                 long studentId,
                                 Student originalStudent,
                                 Map<Long,Section> classTable,
                                 StudentSectioningModel model)

    - #### addRequest

          protected Request addRequest(Student student,
                                       Student original,
                                       Request request,
                                       Map<Long,Section> classTable,
                                       StudentSectioningModel model)

    - #### section

          public boolean section(Student original)

    - #### updateSpace

          public static void updateSpace(Assignment<Request,Enrollment> assignment,
                                         Enrollment enrollment,
                                         boolean increment)

    - #### run

          public void run()

    - #### main

          public static void main(String[] args)