Class MacroscopicNetwork

    • Constructor Detail

      • MacroscopicNetwork

        public MacroscopicNetwork​(IdGroupingToken tokenId)
        Constructor
        Parameters:
        tokenId - contiguous id generation within this group for instances of this class
      • MacroscopicNetwork

        protected MacroscopicNetwork​(MacroscopicNetwork other,
                                     boolean deepCopy,
                                     ManagedIdDeepCopyMapper<Mode> modeMapper,
                                     ManagedIdDeepCopyMapper<MacroscopicNetworkLayer> layerMapper)
        Copy constructor.
        Parameters:
        other - to clone
        deepCopy - when true, create a deep copy, shallow copy otherwise
        modeMapper - to use for tracking mapping between original and copied modes
        layerMapper - to use for tracking mapping between original and copied layers
    • Method Detail

      • logInfo

        public void logInfo​(String prefix)
        Description copied from class: Network
        Log general information on this network to the user
        Specified by:
        logInfo in class Network
        Parameters:
        prefix - to use
      • createAndRegisterLayers

        public void createAndRegisterLayers​(MacroscopicNetworkLayerConfigurator layerConfiguration)
        Tries to initialise and create/register layers via a predefined configuration rather than letting the user do this manually via the infrastructure layers container. Only possible when the network is still empty and no layers are yet active
        Parameters:
        layerConfiguration - to use for configuration
      • createSimpleGrid

        public static MacroscopicNetwork createSimpleGrid​(IdGroupingToken tokenId,
                                                          int rows,
                                                          int columns)
        Create a macroscopic network instance using the id token provided and in addition generate a simple grid-based network layer for the predefined car mode, where each link is bi-directional and has a single link segment type with access for car (nothing else set). For a more sophisticated grid generator configure the dedicated generator class MacroscopicGridNetworkLayerGenerator by overriding its defaults that are used here.
        Parameters:
        tokenId - to use
        rows - in the grid
        columns - in the grid
        Returns:
        created grid network