org.cpsolver.ifs.example.tt

## Class TimetableModel

- java.lang.Object
- - org.cpsolver.ifs.model.Model<Activity,Location>
  - - org.cpsolver.ifs.example.tt.TimetableModel

-     public class TimetableModel
      extends Model<Activity,Location>

  Simple Timetabling Problem.
  The problem is modelled in such a way that every lecture was represented by a variable, resource as a constraint and every possible location of an activity in the time and space was represented by a single value. It means that a value stands for a selection of the time (starting time slot), and one of the available rooms. Binary dependencies are of course represented as constraints as well.
  Version:
    IFS 1.3 (Iterative Forward Search)
    Copyright (C) 2006 - 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/.

- - ### Field Summary

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

      `sDoubleFormat, sPercentageFormat, sTimeFormat`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimetableModel(int nrDays, int nrHours)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TimetableModel` | `generate(DataProperties cfg, Assignment<Activity,Location> assignment)`
    `int` | `getNrDays()`
    `int` | `getNrHours()`
    `static TimetableModel` | `loadFromXML(File inFile, Assignment<Activity,Location> assignment)`
    `static void` | `main(String[] args)`
    `void` | `saveAsXML(DataProperties cfg, boolean gen, Solution<Activity,Location> solution, Assignment<Activity,Location> assignment, File outFile)`

    - ### 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, getInfo, getInfoProviders, getModelListeners, getPerc, getPercRev, getTotalValue, getTotalValue, 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

    - #### TimetableModel

          public TimetableModel(int nrDays,
                                int nrHours)

  - ### Method Detail

    - #### getNrDays

          public int getNrDays()

    - #### getNrHours

          public int getNrHours()

    - #### generate

          public static TimetableModel generate(DataProperties cfg,
                                                Assignment<Activity,Location> assignment)

    - #### main

          public static void main(String[] args)

    - #### saveAsXML

          public void saveAsXML(DataProperties cfg,
                                boolean gen,
                                Solution<Activity,Location> solution,
                                Assignment<Activity,Location> assignment,
                                File outFile)
                         throws IOException

      Throws:
        `IOException`

    - #### loadFromXML

          public static TimetableModel loadFromXML(File inFile,
                                                   Assignment<Activity,Location> assignment)
                                            throws IOException,
                                                   DocumentException

      Throws:
        `IOException`
        `DocumentException`