ExpansionNetwork.java

  1. package org.opentrafficsim.core.network;

  2. /**
  3.  * A Network consists of a set of links. Each link has, in its turn, a start node and an end node. An expandable network can be
  4.  * an (expanded) node as well. An example is shown below:
  5.  *
  6.  * <pre>
  7.  *            |
  8.  *     -------O--------
  9.  *            |
  10.  * </pre>
  11.  *
  12.  * can be expanded into:
  13.  *
  14.  * <pre>
  15.  *            |
  16.  *            A
  17.  *           /|\
  18.  *          / | \
  19.  *    -----B--C--D-----
  20.  *          \ | /
  21.  *           \|/
  22.  *            E
  23.  *            |
  24.  * </pre>
  25.  *
  26.  * Node O in the example is expanded into the subnetwork consisting of nodes A, B, C, D, and E, and links AB, AC, AD, BC, CD,
  27.  * BE, CE, and DE. It also means that when node expansion takes place, the links to node O have to be replaced. In the example
  28.  * below:
  29.  *
  30.  * <pre>
  31.  *            X
  32.  *            |
  33.  *     Y------O-------Z
  34.  *            |
  35.  *            W
  36.  * </pre>
  37.  *
  38.  * can be expanded into:
  39.  *
  40.  * <pre>
  41.  *            X
  42.  *            |
  43.  *            A
  44.  *           /|\
  45.  *          / | \
  46.  *    Y----B--C--D----Z
  47.  *          \ | /
  48.  *           \|/
  49.  *            E
  50.  *            |
  51.  *            W
  52.  * </pre>
  53.  *
  54.  * The node XO is replaced by XA, YO is replaced by YB, OZ is replaced by DZ, and OW is replaced by EW in the network. The
  55.  * reverse takes place when we do node collapse.
  56.  * <p>
  57.  * Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  58.  * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
  59.  * <p>
  60.  * $LastChangedDate: 2015-08-23 00:48:01 +0200 (Sun, 23 Aug 2015) $, @version $Revision: 1291 $, by $Author: averbraeck $,
  61.  * initial version Aug 19, 2014 <br>
  62.  * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
  63.  * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
  64.  * @author <a href="http://www.citg.tudelft.nl">Guus Tamminga</a>
  65.  */
  66. public abstract class ExpansionNetwork extends OTSNetwork
  67. {
  68.     /** */
  69.     private static final long serialVersionUID = 20150104L;

  70.     /**
  71.      * @param id the network id.
  72.      */
  73.     public ExpansionNetwork(final String id)
  74.     {
  75.         super(id);
  76.     }

  77. }