SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
NIImporter_MATSim Class Reference

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

#include <NIImporter_MATSim.h>

Collaboration diagram for NIImporter_MATSim:
Collaboration graph

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. More...
 

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 StringBijection< int >
::Entry 
matsimAttrs []
 The names of MATSIM-XML attributes (for passing to GenericSAXHandler) More...
 
static StringBijection< int >
::Entry 
matsimTags []
 The names of MATSIM-XML elements (for passing to GenericSAXHandler) More...
 

Detailed Description

Importer for networks stored in MATSim format.

Definition at line 62 of file NIImporter_MATSim.h.

Member Enumeration Documentation

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 213 of file NIImporter_MATSim.h.

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 199 of file NIImporter_MATSim.h.

Member Function Documentation

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 97 of file NIImporter_MATSim.cpp.

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

Referenced by NILoader::load().

Field Documentation

StringBijection< int >::Entry NIImporter_MATSim::matsimTags
staticprivate
Initial value:

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

Definition at line 232 of file NIImporter_MATSim.h.


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