Class Region

java.lang.Object
org.opentrafficsim.water.AbstractNamed
org.opentrafficsim.water.demand.Region
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Region>, Named

public class Region
extends AbstractNamed
implements java.lang.Comparable<Region>
A region that generates demand. Examples are municipalities or (in Europe), NUTS regions.

Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Based on software from the IDVV project, which is Copyright (c) 2013 Rijkswaterstaat - Dienst Water, Verkeer en Leefomgeving and licensed without restrictions to Delft University of Technology, including the right to sub-license sources and derived products to third parties.

$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 6, 2016
Author:
Alexander Verbraeck
See Also:
Serialized Form
  • Constructor Details

    • Region

      public Region​(java.lang.String name, Region superRegion, org.locationtech.jts.geom.Coordinate center)
      Parameters:
      name - String; the name of the region
      superRegion - the region of which this region is part; can be null
      center - Coordinate; the coordinate that denotes the center of the region
  • Method Details

    • getSuperRegion

      public final Region getSuperRegion()
      Returns:
      the superRegion
    • setJobs

      public final void setJobs​(double jobs)
      Parameters:
      jobs - double; the jobs to set
    • getJobs

      public final double getJobs()
      Returns:
      the jobs
    • getCenter

      public final org.locationtech.jts.geom.Coordinate getCenter()
      Returns:
      the center
    • getInhabitants

      public final double getInhabitants()
      Returns:
      the inhabitants
    • setInhabitants

      protected final void setInhabitants​(double inhabitants)
      Parameters:
      inhabitants - double; set inhabitants
    • getExportTonTEU

      public final double getExportTonTEU()
      Returns:
      the exportTonTEU
    • setExportTonTEU

      public final void setExportTonTEU​(double exportTonTEU)
      Parameters:
      exportTonTEU - double; the exportTonTEU to set
    • getImportTonTEU

      public final double getImportTonTEU()
      Returns:
      the importTonTEU
    • setImportTonTEU

      public final void setImportTonTEU​(double importTonTEU)
      Parameters:
      importTonTEU - double; the importTonTEU to set
    • getExportEmptyFactor

      public final double getExportEmptyFactor()
      Returns:
      the exportEmptyFactor
    • setExportEmptyFactor

      public final void setExportEmptyFactor​(double exportEmptyFactor)
      Parameters:
      exportEmptyFactor - double; the exportEmptyFactor to set
    • getImportEmptyFactor

      public final double getImportEmptyFactor()
      Returns:
      the importEmptyFactor
    • setImportEmptyFactor

      public final void setImportEmptyFactor​(double importEmptyFactor)
      Parameters:
      importEmptyFactor - double; the importEmptyFactor to set
    • getCurrentExportTEUperYear

      public final double getCurrentExportTEUperYear()
      Returns:
      the currentExportTEUperYear
    • setCurrentExportTEUperYear

      public final void setCurrentExportTEUperYear​(double newExportTEUPerYear)
      Parameters:
      newExportTEUPerYear - double; update currentExportTEUperYear
    • addCurrentExportTEUperYear

      public final void addCurrentExportTEUperYear​(double newExportTEUPerYear)
      Parameters:
      newExportTEUPerYear - double; add to currentExportTEUperYear
    • getCurrentImportTEUperYear

      public final double getCurrentImportTEUperYear()
      Returns:
      the currentExportTEUperYear
    • setCurrentImportTEUperYear

      public final void setCurrentImportTEUperYear​(double newImportTEUPerYear)
      Parameters:
      newImportTEUPerYear - double; update currentExportTEUperYear
    • addCurrentImportTEUperYear

      public final void addCurrentImportTEUperYear​(double newImportTEUPerYear)
      Parameters:
      newImportTEUPerYear - double; add to currentExportTEUperYear
    • getArea

      public final org.locationtech.jts.geom.MultiPolygon getArea()
      Returns:
      the area
    • setArea

      public final void setArea​(org.locationtech.jts.geom.MultiPolygon area)
      Parameters:
      area - MultiPolygon; the area to set
    • isInArea

      public final boolean isInArea​(org.locationtech.jts.geom.Point p)
      Parameters:
      p - Point; point
      Returns:
      whether point is within region bounds
    • compareTo

      public final int compareTo​(Region other)
      Specified by:
      compareTo in interface java.lang.Comparable<Region>
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object