org.cpsolver.instructor

## Class Test

- java.lang.Object
- - org.cpsolver.ifs.model.Model<TeachingRequest.Variable,TeachingAssignment>
  - - org.cpsolver.instructor.model.InstructorSchedulingModel
    - - org.cpsolver.instructor.Test

- Direct Known Subclasses:
    ChmTest, MathTest

      public class Test
      extends InstructorSchedulingModel

  A main class for running of the instructor scheduling solver from command line.
  Instructor scheduling is a process of assigning instructors (typically teaching assistants) to classes after the course timetabling and student scheduling is done.
  Version:
    IFS 1.3 (Instructor Sectioning)
    Copyright (C) 2016 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/.

- - ### Field Summary

    - ### Fields inherited from class org.cpsolver.ifs.model.Model

      `sDoubleFormat, sPercentageFormat, sTimeFormat`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Test(DataProperties properties)` Constructor

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute()` Run the problem
    `protected void` | `generateReports(File outputDir, Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)` Generate a few reports
    `protected boolean` | `load(File inputFile, Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)` Load input problem
    `static void` | `main(String[] args)`
    `protected void` | `save(File outputDir, Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)` Save the problem and the resulting assignment

    - ### Methods inherited from class org.cpsolver.instructor.model.InstructorSchedulingModel

      `addAttributeType, addInstructor, addRequest, bitset2string, createBitSet, getAttributeTypes, getInfo, getInstructors, getProperties, getRequests, getTotalValue, getTotalValue, load, save, string2preference`

    - ### Methods inherited from class org.cpsolver.ifs.model.Model

      `addConstraint, addCriterion, addGlobalConstraint, addModelListener, addVariable, afterAssigned, afterAssigned, afterUnassigned, afterUnassigned, assignedVariables, assignedVariables, beforeAssigned, beforeAssigned, beforeUnassigned, beforeUnassigned, bestUnassignedVariables, bestUnassignedVariables, clearAssignmentContexts, clearBest, conflictConstraints, conflictValues, conflictValues, constraints, countConstraints, countGlobalConstraints, countVariables, createAssignmentContexts, createInheritedAssignment, createReference, getBestPerturbations, getBestUnassignedVariables, getBestValue, getCriteria, getCriterion, getDefaultAssignment, getEmptyAssignment, getExtendedInfo, getExtendedInfo, getInfo, getInfo, getInfo, getInfoProviders, getModelListeners, getPerc, getPercRev, getTotalValue, getTotalValue, globalConstraints, inConflict, inConflict, init, invalidateVariablesWithInitialValueCache, modelListenerOfType, nrAssignedVariables, nrAssignedVariables, nrUnassignedVariables, nrUnassignedVariables, perturbVariables, perturbVariables, perturbVariables, perturbVariables, removeConstraint, removeCriterion, removeCriterion, removeGlobalConstraint, removeModelListener, removeReference, removeVariable, restoreBest, restoreBest, restoreBest, saveBest, saveBest, setBestValue, setDefaultAssignment, toString, toString, unassignedHardConstraints, unassignedVariables, unassignedVariables, variables, variablesWithInitialValue, weaken`

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

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

- - ### Constructor Detail

    - #### Test

          public Test(DataProperties properties)

      Constructor
      Parameters:
        `properties` - data properties

  - ### Method Detail

    - #### load

          protected boolean load(File inputFile,
                                 Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)

      Load input problem
      Parameters:
        `inputFile` - input file (or folder)
        `assignment` - current assignments
      Returns:
        true if the problem was successfully loaded in

    - #### generateReports

          protected void generateReports(File outputDir,
                                         Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)
                                  throws IOException

      Generate a few reports
      Parameters:
        `outputDir` - output directory
        `assignment` - current assignments
      Throws:
        `IOException`

    - #### save

          protected void save(File outputDir,
                              Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)

      Save the problem and the resulting assignment
      Parameters:
        `outputDir` - output directory
        `assignment` - final assignment

    - #### execute

          public void execute()

      Run the problem

    - #### main

          public static void main(String[] args)
                           throws Exception

      Throws:
        `Exception`