org.cpsolver.ifs.example.rpp

## Class RPPModel

- java.lang.Object
- - org.cpsolver.ifs.model.Model<Rectangle,Location>
  - - org.cpsolver.ifs.example.rpp.RPPModel

-     public class RPPModel
      extends Model<Rectangle,Location>

  RPP model.
  The random placement problem (RPP; for more details, see http://www.fi.muni.cz/~hanka/rpp/) seeks to place a set of randomly generated rectangles (called objects) of different sizes into a larger rectangle (called placement area) in such a way that no objects overlap and all objects' borders are parallel to the border of the placement area. In addition, a set of allowable placements can be randomly generated for each object. The ratio between the total area of all objects and the size of the placement area will be denoted as the filled area ratio.
  RPP allows us to generate various instances of the problem similar to a trivial timetabling problem. The correspondence is as follows: the object corresponds to a course to be timetabled - the x-coordinate to its time, the y-coordinate to its classroom. For example, a course taking three hours corresponds to an object with dimensions 3x1 (the course should be taught in one classroom only). Each course can be placed only in a classroom of sufficient capacity - we can expect that the classrooms are ordered increasingly in their size so each object will have a lower bound on its y-coordinate.
  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/.
  Author:
    Tomáš Müller

- - ### Field Summary

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

      `sDoubleFormat, sPercentageFormat, sTimeFormat`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RPPModel()` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Rectangle` | `getRectangle(String name)` Returns rectangle of the given name

    - ### 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, 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

    - #### RPPModel

          public RPPModel()

      Constructor.

  - ### Method Detail

    - #### getRectangle

          public Rectangle getRectangle(String name)

      Returns rectangle of the given name
      Parameters:
        `name` - rectangle name
      Returns:
        rectangle of the given name