public final class DefinitionsParser extends Object
Modifier and Type | Method and Description |
---|---|
static void |
parseDefinitions(OTSRoadNetwork otsNetwork,
DEFINITIONS definitions,
boolean overwriteDefaults,
Map<String,ROADLAYOUT> roadLayoutMap,
Map<String,GTUTEMPLATE> gtuTemplates,
Map<String,StreamInformation> streamMap,
Map<LinkType,Map<GTUType,Speed>> linkTypeSpeedLimitMap)
Parse the DEFINITIONS tag in the OTS XML file.
|
static void |
parseGtuTemplates(DEFINITIONS definitions,
OTSRoadNetwork otsNetwork,
boolean overwriteDefaults,
Map<String,GTUTEMPLATE> gtuTemplates,
Map<String,StreamInformation> streamMap)
Store the GTUTEMPLATE tags in the OTS XML file.
|
static void |
parseGtuTypes(DEFINITIONS definitions,
OTSRoadNetwork otsNetwork,
boolean overwriteDefaults)
Parse the GTUTYPES tag in the OTS XML file.
|
static void |
parseLaneTypes(DEFINITIONS definitions,
OTSRoadNetwork otsNetwork,
boolean overwriteDefaults)
Parse the LANETYPES tag in the OTS XML file.
|
static void |
parseLinkTypes(DEFINITIONS definitions,
OTSRoadNetwork otsNetwork,
boolean overwriteDefaults,
Map<LinkType,Map<GTUType,Speed>> linkTypeSpeedLimitMap)
Parse the LINKTYPES tag in the OTS XML file.
|
static void |
parseParameterTypes(DEFINITIONS definitions,
OTSRoadNetwork otsNetwork,
Map<String,ParameterType<?>> parameterMap)
Parse the PARAMETERTYPE tags in the OTS XML file.
|
static void |
parseRoadLayouts(DEFINITIONS definitions,
OTSRoadNetwork otsNetwork,
Map<String,ROADLAYOUT> roadLayoutMap)
Parse the ROADLAYOUTS tag in the OTS XML file.
|
public static void parseDefinitions(OTSRoadNetwork otsNetwork, DEFINITIONS definitions, boolean overwriteDefaults, Map<String,ROADLAYOUT> roadLayoutMap, Map<String,GTUTEMPLATE> gtuTemplates, Map<String,StreamInformation> streamMap, Map<LinkType,Map<GTUType,Speed>> linkTypeSpeedLimitMap) throws XmlParserException
otsNetwork
- the networkdefinitions
- the DEFINTIONS tagoverwriteDefaults
- overwrite default definitions in otsNetwork or notroadLayoutMap
- temporary storage for the road layoutsgtuTemplates
- map of GTU templates for the OD and/or GeneratorsstreamMap
- map with stream informationlinkTypeSpeedLimitMap
- map with speed limit information per link typeXmlParserException
- on parsing errorpublic static void parseGtuTypes(DEFINITIONS definitions, OTSRoadNetwork otsNetwork, boolean overwriteDefaults) throws XmlParserException
definitions
- the DEFINTIONS tagotsNetwork
- the networkoverwriteDefaults
- overwrite default definitions in otsNetwork or notXmlParserException
- on parsing errorpublic static void parseLinkTypes(DEFINITIONS definitions, OTSRoadNetwork otsNetwork, boolean overwriteDefaults, Map<LinkType,Map<GTUType,Speed>> linkTypeSpeedLimitMap) throws XmlParserException
definitions
- the DEFINTIONS tagotsNetwork
- the networkoverwriteDefaults
- overwrite default definitions in otsNetwork or notlinkTypeSpeedLimitMap
- map with speed limit information per link typeXmlParserException
- on parsing errorpublic static void parseLaneTypes(DEFINITIONS definitions, OTSRoadNetwork otsNetwork, boolean overwriteDefaults) throws XmlParserException
definitions
- the DEFINTIONS tagotsNetwork
- the networkoverwriteDefaults
- overwrite default definitions in otsNetwork or notXmlParserException
- on parsing errorpublic static void parseGtuTemplates(DEFINITIONS definitions, OTSRoadNetwork otsNetwork, boolean overwriteDefaults, Map<String,GTUTEMPLATE> gtuTemplates, Map<String,StreamInformation> streamMap) throws XmlParserException
definitions
- the DEFINTIONS tagotsNetwork
- the networkoverwriteDefaults
- overwrite default definitions in otsNetwork or notgtuTemplates
- the templates to be used in the OD/GeneratorsstreamMap
- map with stream informationXmlParserException
- on parsing errorpublic static void parseRoadLayouts(DEFINITIONS definitions, OTSRoadNetwork otsNetwork, Map<String,ROADLAYOUT> roadLayoutMap) throws XmlParserException
definitions
- the DEFINTIONS tagotsNetwork
- the networkroadLayoutMap
- temporary storage for the road layoutsXmlParserException
- on parsing errorpublic static void parseParameterTypes(DEFINITIONS definitions, OTSRoadNetwork otsNetwork, Map<String,ParameterType<?>> parameterMap) throws XmlParserException
definitions
- the DEFINTIONS tagotsNetwork
- the networkparameterMap
- map to store parameter type by idXmlParserException
- if the field in a PARAMETERTYPE does not refer to a ParameterType<?>Copyright © 2014–2019 Delft University of Technology. All rights reserved.