Class ExpansionNetwork

  • All Implemented Interfaces:
    Serializable, EventProducerInterface, Identifiable, Definitions, Network, PerceivableContext

    public abstract class ExpansionNetwork
    extends OTSNetwork
    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 an (expanded) node as well. An example is shown below:
                |
         -------O--------
                |
     
    can be expanded into:
                |
                A
               /|\
              / | \
        -----B--C--D-----
              \ | /
               \|/
                E
                |
     
    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, 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 below:
                X
                |
         Y------O-------Z
                |
                W
     
    can be expanded into:
                X
                |
                A
               /|\
              / | \
        Y----B--C--D----Z
              \ | /
               \|/
                E
                |
                W
     
    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 reverse takes place when we do node collapse.

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

    $LastChangedDate$, @version $Revision$, by $Author$, initial version Aug 19, 2014

    Author:
    Alexander Verbraeck, Peter Knoppers, Guus Tamminga
    See Also:
    Serialized Form
    • Constructor Detail

      • ExpansionNetwork

        public ExpansionNetwork​(String id,
                                boolean addDefaultTypes,
                                OTSSimulatorInterface simulator)
        Parameters:
        id - String; the network id.
        addDefaultTypes - add the default GTUTypes and LinkTypes, or not
        simulator - OTSSimulatorInterface; the DSOL simulator engine