Class GeneratorSinkParser
- java.lang.Object
-
- org.opentrafficsim.road.network.factory.xml.parser.GeneratorSinkParser
-
public final class GeneratorSinkParser extends Object
GeneratorSinkParser.java.Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<LaneBasedGTUGenerator>parseGenerators(OTSRoadNetwork otsNetwork, NETWORKDEMAND demand, Map<String,GTUTEMPLATE> gtuTemplates, Map<String,List<Distribution.FrequencyAndObject<Route>>> routeMixMap, Map<String,List<Distribution.FrequencyAndObject<Route>>> shortestRouteMixMap, StreamInformation streamInformation)Parse the Generators.static voidparseSinks(OTSRoadNetwork otsNetwork, NETWORKDEMAND demand, OTSSimulatorInterface simulator)Parse the Sinks.
-
-
-
Method Detail
-
parseGenerators
public static List<LaneBasedGTUGenerator> parseGenerators(OTSRoadNetwork otsNetwork, NETWORKDEMAND demand, Map<String,GTUTEMPLATE> gtuTemplates, Map<String,List<Distribution.FrequencyAndObject<Route>>> routeMixMap, Map<String,List<Distribution.FrequencyAndObject<Route>>> shortestRouteMixMap, StreamInformation streamInformation) throws XmlParserException
Parse the Generators.- Parameters:
otsNetwork- OTSRoadNetwork; the network to insert the parsed objects indemand- NETWORKDEMAND; the NETWORK taggtuTemplates- Map<String,GTUTEMPLATE>; GGTUTEMPLATE tagsrouteMixMap- Map<String,List<FrequencyAndObject<Route>>>; map with route mix entriesshortestRouteMixMap- Map<String,List<FrequencyAndObject<Route>>>; map with shortest route mix entriesstreamInformation- StreamInformation; the random streams that will be used in the model- 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 indemand- NETWORKDEMAND; the NETWORK tagsimulator- OTSSimulatorInterface; the simulator- Throws:
NetworkException- when the objects cannot be inserted into the network due to inconsistencies
-
-