Class GeneratorSinkParser


  • public final class GeneratorSinkParser
    extends java.lang.Object
    GeneratorSinkParser.java.

    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 Detail

      • parseGenerators

        public static java.util.List<LaneBasedGTUGenerator> parseGenerators​(OTSRoadNetwork otsNetwork,
                                                                            NETWORKDEMAND demand,
                                                                            java.util.Map<java.lang.String,​GTUTEMPLATE> gtuTemplates,
                                                                            java.util.Map<java.lang.String,​java.util.List<Distribution.FrequencyAndObject<Route>>> routeMixMap,
                                                                            java.util.Map<java.lang.String,​java.util.List<Distribution.FrequencyAndObject<Route>>> shortestRouteMixMap,
                                                                            java.util.Map<java.lang.String,​StreamInformation> streamMap)
                                                                     throws XmlParserException
        Parse the Generators.
        Parameters:
        otsNetwork - OTSRoadNetwork; the network to insert the parsed objects in
        demand - NETWORK; the NETWORK tag
        gtuTemplates - GGTUTEMPLATE tags
        routeMixMap - map with route mix entries
        shortestRouteMixMap - map with shortest route mix entries
        streamMap - map with stream information
        Returns:
        list of created GTU generators
        Throws:
        XmlParserException - when the objects cannot be inserted into the network due to inconsistencies
      • parseSinks

        public static void parseSinks​(OTSRoadNetwork otsNetwork,
                                      NETWORKDEMAND demand,
                                      OTSSimulatorInterface simulator)
                               throws NetworkException
        Parse the Sinks.
        Parameters:
        otsNetwork - OTSRoadNetwork; the network to insert the parsed objects in
        demand - NETWORK; the NETWORK tag
        simulator - OTSSimulatorInterface; the simulator
        Throws:
        NetworkException - when the objects cannot be inserted into the network due to inconsistencies