Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
NIImporter_MATSim Class Reference

Importer for networks stored in MATSim format. More...

#include <NIImporter_MATSim.h>

Collaboration diagram for NIImporter_MATSim:
[legend]

Data Structures

class  EdgesHandler
 A class which extracts MATSIM-edges from a parsed MATSIM-file. More...
 
class  NodesHandler
 A class which extracts MATSIM-nodes from a parsed MATSIM-file. More...
 

Static Public Member Functions

static void loadNetwork (const OptionsCont &oc, NBNetBuilder &nb)
 Loads content of the optionally given MATSIM network files.
 

Private Types

enum  MatsimXMLAttr {
  MATSIM_ATTR_NOTHING = 0 , MATSIM_ATTR_ID , MATSIM_ATTR_X , MATSIM_ATTR_Y ,
  MATSIM_ATTR_FROM , MATSIM_ATTR_TO , MATSIM_ATTR_LENGTH , MATSIM_ATTR_FREESPEED ,
  MATSIM_ATTR_CAPACITY , MATSIM_ATTR_PERMLANES , MATSIM_ATTR_ONEWAY , MATSIM_ATTR_MODES ,
  MATSIM_ATTR_ORIGID , MATSIM_ATTR_CAPPERIOD , MATSIM_ATTR_CAPDIVIDER
}
 Numbers representing MATSIM-XML - attributes. More...
 
enum  MatsimXMLTag {
  MATSIM_TAG_NOTHING = 0 , MATSIM_TAG_NETWORK , MATSIM_TAG_NODE , MATSIM_TAG_LINK ,
  MATSIM_TAG_LINKS
}
 Numbers representing MATSIM-XML - element names. More...
 

Static Private Attributes

static SequentialStringBijection::Entry matsimAttrs []
 The names of MATSIM-XML attributes (for passing to GenericSAXHandler)
 
static SequentialStringBijection::Entry matsimTags []
 The names of MATSIM-XML elements (for passing to GenericSAXHandler)
 

Detailed Description

Importer for networks stored in MATSim format.

Definition at line 52 of file NIImporter_MATSim.h.

Member Enumeration Documentation

◆ MatsimXMLAttr

Numbers representing MATSIM-XML - attributes.

See also
GenericSAXHandler
Enumerator
MATSIM_ATTR_NOTHING 
MATSIM_ATTR_ID 
MATSIM_ATTR_X 
MATSIM_ATTR_Y 
MATSIM_ATTR_FROM 
MATSIM_ATTR_TO 
MATSIM_ATTR_LENGTH 
MATSIM_ATTR_FREESPEED 
MATSIM_ATTR_CAPACITY 
MATSIM_ATTR_PERMLANES 
MATSIM_ATTR_ONEWAY 
MATSIM_ATTR_MODES 
MATSIM_ATTR_ORIGID 
MATSIM_ATTR_CAPPERIOD 
MATSIM_ATTR_CAPDIVIDER 

Definition at line 206 of file NIImporter_MATSim.h.

◆ MatsimXMLTag

Numbers representing MATSIM-XML - element names.

See also
GenericSAXHandler
Enumerator
MATSIM_TAG_NOTHING 
MATSIM_TAG_NETWORK 
MATSIM_TAG_NODE 
MATSIM_TAG_LINK 
MATSIM_TAG_LINKS 

Definition at line 192 of file NIImporter_MATSim.h.

Member Function Documentation

◆ loadNetwork()

void NIImporter_MATSim::loadNetwork ( const OptionsCont oc,
NBNetBuilder nb 
)
static

Loads content of the optionally given MATSIM network files.

If the option "matsim-files" is set, the file(s) stored therein is read and the network definition stored therein is stored within the given network builder.

If the option "matsim-files" is not set, this method simply returns.

Parameters
[in]ocThe options to use
[in]nbThe network builder to fill

Definition at line 85 of file NIImporter_MATSim.cpp.

References OptionsCont::getBool(), NBNetBuilder::getEdgeCont(), OptionsCont::getFloat(), NBNetBuilder::getNodeCont(), OptionsCont::getStringVector(), OptionsCont::isUsableFileList(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, XMLSubSys::runParser(), and GenericSAXHandler::setFileName().

Referenced by NILoader::load().

Here is the caller graph for this function:

Field Documentation

◆ matsimAttrs

SequentialStringBijection::Entry NIImporter_MATSim::matsimAttrs
staticprivate
Initial value:
= {
}

The names of MATSIM-XML attributes (for passing to GenericSAXHandler)

Definition at line 58 of file NIImporter_MATSim.h.

◆ matsimTags

SequentialStringBijection::Entry NIImporter_MATSim::matsimTags
staticprivate

The documentation for this class was generated from the following files: