|
SUMO - Simulation of Urban MObility
|
Importer for networks stored in MATSim format. More...
#include <NIImporter_MATSim.h>
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 StringBijection< int > ::Entry | matsimAttrs [] |
| The names of MATSIM-XML attributes (for passing to GenericSAXHandler) | |
| static StringBijection< int > ::Entry | matsimTags [] |
| The names of MATSIM-XML elements (for passing to GenericSAXHandler) | |
Importer for networks stored in MATSim format.
Definition at line 62 of file NIImporter_MATSim.h.
enum NIImporter_MATSim::MatsimXMLAttr [private] |
Numbers representing MATSIM-XML - attributes.
Definition at line 213 of file NIImporter_MATSim.h.
enum NIImporter_MATSim::MatsimXMLTag [private] |
Numbers representing MATSIM-XML - element names.
Definition at line 199 of file NIImporter_MATSim.h.
| 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.
| [in] | oc | The options to use |
| [in] | nb | The network builder to fill |
Definition at line 96 of file NIImporter_MATSim.cpp.
References FileHelpers::exists(), OptionsCont::getBool(), NBNetBuilder::getEdgeCont(), OptionsCont::getFloat(), NBNetBuilder::getNodeCont(), OptionsCont::getStringVector(), OptionsCont::isSet(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, XMLSubSys::runParser(), GenericSAXHandler::setFileName(), and WRITE_ERROR.
Referenced by NILoader::load().
StringBijection< int >::Entry NIImporter_MATSim::matsimAttrs [static, private] |
{
{ "id", NIImporter_MATSim::MATSIM_ATTR_ID },
{ "x", NIImporter_MATSim::MATSIM_ATTR_X },
{ "y", NIImporter_MATSim::MATSIM_ATTR_Y },
{ "from", NIImporter_MATSim::MATSIM_ATTR_FROM },
{ "to", NIImporter_MATSim::MATSIM_ATTR_TO },
{ "length", NIImporter_MATSim::MATSIM_ATTR_LENGTH },
{ "freespeed", NIImporter_MATSim::MATSIM_ATTR_FREESPEED },
{ "capacity", NIImporter_MATSim::MATSIM_ATTR_CAPACITY },
{ "permlanes", NIImporter_MATSim::MATSIM_ATTR_PERMLANES },
{ "oneway", NIImporter_MATSim::MATSIM_ATTR_ONEWAY },
{ "modes", NIImporter_MATSim::MATSIM_ATTR_MODES },
{ "origid", NIImporter_MATSim::MATSIM_ATTR_ORIGID },
{ "capperiod", NIImporter_MATSim::MATSIM_ATTR_CAPPERIOD },
{ "capDivider", NIImporter_MATSim::MATSIM_ATTR_CAPDIVIDER },
{ "", NIImporter_MATSim::MATSIM_ATTR_NOTHING }
}
The names of MATSIM-XML attributes (for passing to GenericSAXHandler)
Definition at line 235 of file NIImporter_MATSim.h.
StringBijection< int >::Entry NIImporter_MATSim::matsimTags [static, private] |
{
{ "network", NIImporter_MATSim::MATSIM_TAG_NETWORK },
{ "node", NIImporter_MATSim::MATSIM_TAG_NODE },
{ "link", NIImporter_MATSim::MATSIM_TAG_LINK },
{ "links", NIImporter_MATSim::MATSIM_TAG_LINKS },
{ "", NIImporter_MATSim::MATSIM_TAG_NOTHING }
}
The names of MATSIM-XML elements (for passing to GenericSAXHandler)
Definition at line 232 of file NIImporter_MATSim.h.