Interface Definitions

All Known Subinterfaces:
Network, PerceivableContext
All Known Implementing Classes:
ExpansionNetwork, OTSNetwork

public interface Definitions
The Definitions interface contains access to the core definitions that can be used to interpret the Network and the PerceivableContext. Example interfaces allow the retrieval of GTUTypes and LinkTypes.

Copyright (c) 2003-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
Author:
Alexander Verbraeck
  • Method Details

    • addDefaultLinkTypes

      void addDefaultLinkTypes()
      Add the default LinkTypes that have been defined in the enum LinkType.DEFAULTS to the network. It is not necessary to call this method on every network; when the LinkTypes are for instance defined in an XML file, adding the default types might not be needed.
    • addLinkType

      void addLinkType​(LinkType linkType)
      Add a Link type to the map. This method is automatically called from the LinkType constructor.
      Parameters:
      linkType - the LinkType to add
    • getLinkType

      LinkType getLinkType​(java.lang.String linkId)
      Retrieve a defined LinkType based on its id.
      Parameters:
      linkId - the id to search for
      Returns:
      the LinkType or null in case it could not be found
    • getLinkType

      LinkType getLinkType​(LinkType.DEFAULTS linkEnum)
      Retrieve a defined default LinkType based on its enum.
      Parameters:
      linkEnum - the enum to search for
      Returns:
      the LinkType or null in case it could not be found
    • getLinkTypes

      ImmutableMap<java.lang.String,​LinkType> getLinkTypes()
      Retrieve a safe copy of the map of defined LinkTypes in this network.
      Returns:
      the map of defined LinkTypes
    • addDefaultGtuTypes

      void addDefaultGtuTypes()
      Add the default GTU Types that have been defined in the enum GTUType.DEFAULTS to the network. It is not necessary to call this method on every network; when the GTUTypes are for instance defined in an XML file, adding the default types might not be needed.
    • addGtuType

      void addGtuType​(GTUType gtuType)
      Add a GTU type to the map. This method is automatically called from the GTUType constructor.
      Parameters:
      gtuType - the GTUType to add
    • getGtuType

      GTUType getGtuType​(java.lang.String gtuId)
      Retrieve a defined GTUType based on its id.
      Parameters:
      gtuId - the id to search for
      Returns:
      the GTUType or null in case it could not be found
    • getGtuType

      GTUType getGtuType​(GTUType.DEFAULTS gtuEnum)
      Retrieve a defined default GTUType based on its enum.
      Parameters:
      gtuEnum - the enum to search for
      Returns:
      the GTUType or null in case it could not be found
    • getGtuTypes

      ImmutableMap<java.lang.String,​GTUType> getGtuTypes()
      Retrieve a safe copy of the map of defined GTUTypes in this network.
      Returns:
      the map of defined GTUTypes