SUMO - Simulation of Urban MObility
|
Importer for networks stored in Vissim format. More...
#include <NIImporter_Vissim.h>
Data Structures | |
class | VissimSingleTypeParser |
Public Types | |
typedef std::map< std::string, RGBColor > | ColorMap |
definition of a map from color names to color definitions | |
Static Public Member Functions | |
static void | loadNetwork (const OptionsCont &oc, NBNetBuilder &nb) |
Loads network definition from the assigned option and stores it in the given network builder. | |
Protected Member Functions | |
bool | admitContinue (const std::string &tag) |
void | load (const OptionsCont &options) |
loads the vissim file | |
NIImporter_Vissim (NBNetBuilder &nb, const std::string &file) | |
constructor | |
~NIImporter_Vissim () | |
destructor | |
Private Types | |
typedef std::map< std::string, NIVissimElement > | ToElemIDMap |
Definition of a map from element names to their numerical representation. | |
typedef std::map < NIVissimElement, VissimSingleTypeParser * > | ToParserMap |
Definition of a map from an element's numerical id to his parser. | |
Private Member Functions | |
void | buildParsers () |
adds id-to-parser - relationships of elements to parse into myParsers | |
void | insertKnownElements () |
adds name-to-id - relationships of known elements into myKnownElements | |
NIImporter_Vissim (const NIImporter_Vissim &) | |
Invalidated copy constructor. | |
NIImporter_Vissim & | operator= (const NIImporter_Vissim &) |
Invalidated assignment operator. | |
void | postLoadBuild (SUMOReal offset) |
bool | readContents (std::istream &strm) |
Private Attributes | |
ColorMap | myColorMap |
a map from color names to color definitions | |
ToElemIDMap | myKnownElements |
Map from element names to their numerical representation. | |
std::string | myLastSecure |
NBNetBuilder & | myNetBuilder |
ToParserMap | myParsers |
Parsers by element id. |
Importer for networks stored in Vissim format.
Definition at line 57 of file NIImporter_Vissim.h.
typedef std::map<std::string, RGBColor> NIImporter_Vissim::ColorMap |
definition of a map from color names to color definitions
Definition at line 146 of file NIImporter_Vissim.h.
typedef std::map<std::string, NIVissimElement> NIImporter_Vissim::ToElemIDMap [private] |
Definition of a map from element names to their numerical representation.
Definition at line 161 of file NIImporter_Vissim.h.
typedef std::map<NIVissimElement, VissimSingleTypeParser*> NIImporter_Vissim::ToParserMap [private] |
Definition of a map from an element's numerical id to his parser.
Definition at line 167 of file NIImporter_Vissim.h.
NIImporter_Vissim::NIImporter_Vissim | ( | NBNetBuilder & | nb, |
const std::string & | file | ||
) | [protected] |
constructor
Definition at line 316 of file NIImporter_Vissim.cpp.
References buildParsers(), insertKnownElements(), myColorMap, SUMOReal, and UNUSED_PARAMETER.
NIImporter_Vissim::~NIImporter_Vissim | ( | ) | [protected] |
destructor
Definition at line 336 of file NIImporter_Vissim.cpp.
References NIVissimClosures::clearDict(), NIVissimTrafficDescription::clearDict(), NIVissimVehTypeClass::clearDict(), NIVissimSource::clearDict(), NIVissimVehicleType::clearDict(), NIVissimNodeDef::clearDict(), NIVissimTL::clearDict(), NIVissimAbstractEdge::clearDict(), NIVissimDisturbance::clearDict(), NIVissimNodeCluster::clearDict(), NIVissimTL::NIVissimTLSignal::clearDict(), NIVissimDistrictConnection::clearDict(), NIVissimConnectionCluster::clearDict(), NIVissimTL::NIVissimTLSignalGroup::clearDict(), and myParsers.
NIImporter_Vissim::NIImporter_Vissim | ( | const NIImporter_Vissim & | ) | [private] |
Invalidated copy constructor.
bool NIImporter_Vissim::admitContinue | ( | const std::string & | tag | ) | [protected] |
Definition at line 377 of file NIImporter_Vissim.cpp.
References myKnownElements, and myLastSecure.
void NIImporter_Vissim::buildParsers | ( | ) | [private] |
adds id-to-parser - relationships of elements to parse into myParsers
Definition at line 561 of file NIImporter_Vissim.cpp.
References myColorMap, myParsers, VE_Auswertungsdefinition, VE_Baujahrverteilungsdefinition, VE_Detektorendefinition, VE_DynUml, VE_Einheitendefinition, VE_Emission, VE_Fahrtverlaufdateien, VE_Fahrverhaltendefinition, VE_Fahrzeugklassendefinition, VE_Fahrzeugtypdefinition, VE_Fensterdefinition, VE_Gefahrenwarnsystemdefinition, VE_Gelbverhaltendefinition, VE_Geschwindigkeitsverteilungsdefinition, VE_Haltestellendefinition, VE_Kantensperrung, VE_Kennungszeile, VE_Knotendefinition, VE_Laengenverteilungsdefinition, VE_Langsamfahrbereichdefinition, VE_Laufleistungsverteilungsdefinition, VE_Leistungsverteilungsdefinition, VE_Lichtsignalanlagendefinition, VE_Liniendefinition, VE_Linksverkehr, VE_LSAKopplungdefinition, VE_Massenverteilungsdefinition, VE_Maxbeschleunigungskurvedefinition, VE_Maxverzoegerungskurvedefinition, VE_Messungsdefinition, VE_Netzobjektdefinition, VE_Parkplatzdefinition, VE_Querschnittsmessungsdefinition, VE_Querverkehrsstoerungsdefinition, VE_Rautedefinition, VE_Reisezeitmessungsdefinition, VE_Richtungsentscheidungsdefinition, VE_Richtungspfeildefinition, VE_Routenentscheidungsdefinition, VE_Signalgeberdefinition, VE_Signalgruppendefinition, VE_Simdauer, VE_SimRate, VE_Startuhrzeit, VE_Startzufallszahl, VE_Stauparameterdefinition, VE_Stauzaehlerdefinition, VE_Stopschilddefinition, VE_Streckendefinition, VE_Streckentypdefinition, VE_TEAPACdefinition, VE_Verbindungsdefinition, VE_Verkehrszusammensetzungsdefinition, VE_Verlustzeitmessungsdefinition, VE_VWunschentscheidungsdefinition, VE_Wunschbeschleunigungskurvedefinition, VE_Wunschverzoegerungskurvedefinition, VE_Zeitenverteilungsdefinition, VE_Zeitschrittfaktor, and VE_Zuflussdefinition.
Referenced by NIImporter_Vissim().
void NIImporter_Vissim::insertKnownElements | ( | ) | [private] |
adds name-to-id - relationships of known elements into myKnownElements
Definition at line 489 of file NIImporter_Vissim.cpp.
References myKnownElements, VE_Auswertungsdefinition, VE_Baujahrverteilungsdefinition, VE_Detektorendefinition, VE_DUMMY, VE_DynUml, VE_Einheitendefinition, VE_Emission, VE_Fahrtverlaufdateien, VE_Fahrverhaltendefinition, VE_Fahrzeugklassendefinition, VE_Fahrzeugtypdefinition, VE_Fensterdefinition, VE_Gefahrenwarnsystemdefinition, VE_Gelbverhaltendefinition, VE_Geschwindigkeitsverteilungsdefinition, VE_Haltestellendefinition, VE_Kantensperrung, VE_Kennungszeile, VE_Knotendefinition, VE_Laengenverteilungsdefinition, VE_Langsamfahrbereichdefinition, VE_Laufleistungsverteilungsdefinition, VE_Leistungsverteilungsdefinition, VE_Lichtsignalanlagendefinition, VE_Liniendefinition, VE_Linksverkehr, VE_LSAKopplungdefinition, VE_Massenverteilungsdefinition, VE_Maxbeschleunigungskurvedefinition, VE_Maxverzoegerungskurvedefinition, VE_Messungsdefinition, VE_Netzobjektdefinition, VE_Parkplatzdefinition, VE_Querschnittsmessungsdefinition, VE_Querverkehrsstoerungsdefinition, VE_Rautedefinition, VE_Reisezeitmessungsdefinition, VE_Richtungsentscheidungsdefinition, VE_Richtungspfeildefinition, VE_Routenentscheidungsdefinition, VE_Signalgeberdefinition, VE_Signalgruppendefinition, VE_Simdauer, VE_SimRate, VE_Startuhrzeit, VE_Startzufallszahl, VE_Stauparameterdefinition, VE_Stauzaehlerdefinition, VE_Stopschilddefinition, VE_Streckendefinition, VE_Streckentypdefinition, VE_TEAPACdefinition, VE_Verbindungsdefinition, VE_Verkehrszusammensetzungsdefinition, VE_Verlustzeitmessungsdefinition, VE_VWunschentscheidungsdefinition, VE_Wunschbeschleunigungskurvedefinition, VE_Wunschverzoegerungskurvedefinition, VE_Zeitenverteilungsdefinition, VE_Zeitschrittfaktor, and VE_Zuflussdefinition.
Referenced by NIImporter_Vissim().
void NIImporter_Vissim::load | ( | const OptionsCont & | options | ) | [protected] |
loads the vissim file
Definition at line 361 of file NIImporter_Vissim.cpp.
References OptionsCont::getFloat(), OptionsCont::getString(), postLoadBuild(), readContents(), and WRITE_ERROR.
Referenced by loadNetwork().
void NIImporter_Vissim::loadNetwork | ( | const OptionsCont & | oc, |
NBNetBuilder & | nb | ||
) | [static] |
Loads network definition from the assigned option and stores it in the given network builder.
If the option "vissim-file" is set, the file stored therein is read and the network definition stored therein is stored within the given network builder.
If the option "vissim-file" is not set, this method simply returns.
[in] | oc | The options to use |
[in] | nb | The network builder to fill |
Definition at line 126 of file NIImporter_Vissim.cpp.
References OptionsCont::getString(), OptionsCont::isSet(), and load().
Referenced by NILoader::load().
NIImporter_Vissim& NIImporter_Vissim::operator= | ( | const NIImporter_Vissim & | ) | [private] |
Invalidated assignment operator.
void NIImporter_Vissim::postLoadBuild | ( | SUMOReal | offset | ) | [private] |
Definition at line 430 of file NIImporter_Vissim.cpp.
References NIVissimEdge::buildConnectionClusters(), NIVissimNodeCluster::buildNBNodes(), NIVissimConnectionCluster::buildNodeClusters(), NIVissimBoundedClusterObject::closeLoading(), NIVissimNodeCluster::dict_addDisturbances(), NIVissimConnection::dict_assignToEdges(), NIVissimDistrictConnection::dict_BuildDistrictConnections(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimDistrictConnection::dict_BuildDistricts(), NIVissimConnection::dict_buildNBEdgeConnections(), NIVissimEdge::dict_buildNBEdges(), NIVissimDistrictConnection::dict_CheckEdgeEnds(), NIVissimEdge::dict_checkEdges2Join(), NIVissimEdge::dict_propagateSpeeds(), NIVissimDisturbance::dict_SetDisturbances(), NIVissimTL::dict_SetSignals(), OptionsCont::getBool(), NBNetBuilder::getDistrictCont(), NBNetBuilder::getEdgeCont(), NIVissimNodeDef::getMaxID(), NBNetBuilder::getNodeCont(), OptionsCont::getOptions(), NBNetBuilder::getTLLogicCont(), NIVissimConnectionCluster::joinBySameEdges(), myNetBuilder, NIVissimEdge::reportUnsetSpeeds(), and NIVissimNodeCluster::setCurrentVirtID().
Referenced by load().
bool NIImporter_Vissim::readContents | ( | std::istream & | strm | ) | [private] |
Definition at line 388 of file NIImporter_Vissim.cpp.
References myKnownElements, myLastSecure, myParsers, NIImporter_Vissim::VissimSingleTypeParser::parse(), and StringUtils::to_lower_case().
Referenced by load().
ColorMap NIImporter_Vissim::myColorMap [private] |
a map from color names to color definitions
Definition at line 173 of file NIImporter_Vissim.h.
Referenced by buildParsers(), and NIImporter_Vissim().
Map from element names to their numerical representation.
Definition at line 164 of file NIImporter_Vissim.h.
Referenced by admitContinue(), insertKnownElements(), and readContents().
std::string NIImporter_Vissim::myLastSecure [private] |
Definition at line 175 of file NIImporter_Vissim.h.
Referenced by admitContinue(), and readContents().
NBNetBuilder& NIImporter_Vissim::myNetBuilder [private] |
Definition at line 177 of file NIImporter_Vissim.h.
Referenced by postLoadBuild().
ToParserMap NIImporter_Vissim::myParsers [private] |
Parsers by element id.
Definition at line 170 of file NIImporter_Vissim.h.
Referenced by buildParsers(), readContents(), and ~NIImporter_Vissim().