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

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

#include <NIImporter_Vissim.h>

Collaboration diagram for NIImporter_Vissim:
[legend]

Data Structures

class  NIVissimXMLHandler_ConflictArea
class  NIVissimXMLHandler_Fahrzeugklassendefinition
class  NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition
class  NIVissimXMLHandler_Parkplatzdefinition
class  NIVissimXMLHandler_Routenentscheidungsdefinition
 A class which extracts VISSIM-Routes from a parsed VISSIM-file. More...
class  NIVissimXMLHandler_Streckendefinition
class  NIVissimXMLHandler_VWunschentscheidungsdefinition
class  NIVissimXMLHandler_Zuflussdefinition
class  VissimSingleTypeParser

Public Types

typedef std::map< std::string, RGBColorColorMap
 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)
 constructor
 ~NIImporter_Vissim ()
 destructor

Private Types

typedef std::map< std::string, std::list< std::string > > nodeMap
typedef std::map< std::string, NIVissimElementToElemIDMap
 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.
enum  VissimXMLAttr {
  VISSIM_ATTR_NOTHING = 0 , VISSIM_ATTR_NO , VISSIM_ATTR_NAME , VISSIM_ATTR_X ,
  VISSIM_ATTR_Y , VISSIM_ATTR_ZOFFSET , VISSIM_ATTR_ZUSCHLAG1 , VISSIM_ATTR_ZUSCHLAG2 ,
  VISSIM_ATTR_WIDTH , VISSIM_ATTR_LINKBEHAVETYPE , VISSIM_ATTR_LANE , VISSIM_ATTR_POS ,
  VISSIM_ATTR_LINK , VISSIM_ATTR_INTLINK , VISSIM_ATTR_PERCENTAGE , VISSIM_ATTR_DISTRICT ,
  VISSIM_ATTR_COLOR , VISSIM_ATTR_KEY , VISSIM_ATTR_FX , VISSIM_ATTR_DESTLINK ,
  VISSIM_ATTR_DESTPOS , VISSIM_ATTR_LINK1 , VISSIM_ATTR_LINK2 , VISSIM_ATTR_STATUS
}
 Numbers representing VISSIM-XML - attributes. More...
enum  VissimXMLTag {
  VISSIM_TAG_NOTHING = 0 , VISSIM_TAG_NETWORK , VISSIM_TAG_LANES , VISSIM_TAG_LANE ,
  VISSIM_TAG_LINK , VISSIM_TAG_LINKS , VISSIM_TAG_POINTS3D , VISSIM_TAG_POINT3D ,
  VISSIM_TAG_LINKPOLYPOINT , VISSIM_TAG_LINKPOLYPTS , VISSIM_TAG_FROM , VISSIM_TAG_TO ,
  VISSIM_TAG_VEHICLE_INPUT , VISSIM_TAG_PARKINGLOT , VISSIM_TAG_VEHICLE_CLASS , VISSIM_TAG_INTOBJECTREF ,
  VISSIM_TAG_SPEED_DECISION , VISSIM_TAG_SPEED_DIST , VISSIM_TAG_DATAPOINT , VISSIM_TAG_DECISION_STATIC ,
  VISSIM_TAG_ROUTE_STATIC , VISSIM_TAG_CA
}
 Numbers representing VISSIM-XML - element names. More...

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_Vissimoperator= (const NIImporter_Vissim &)
 Invalidated assignment operator.
void postLoadBuild (double offset)
bool readContents (std::istream &strm)

Private Attributes

nodeMap elementData
ColorMap myColorMap
 a map from color names to color definitions
ToElemIDMap myKnownElements
 Map from element names to their numerical representation.
std::string myLastSecure
NBNetBuildermyNetBuilder
ToParserMap myParsers
 Parsers by element id.

Static Private Attributes

static SequentialStringBijection::Entry vissimAttrs []
 The names of VISSIM-XML attributes (for passing to GenericSAXHandler).
static SequentialStringBijection::Entry vissimTags []
 The names of VISSIM-XML elements (for passing to GenericSAXHandler).

Detailed Description

Importer for networks stored in Vissim format.

Definition at line 56 of file NIImporter_Vissim.h.

Member Typedef Documentation

◆ ColorMap

typedef std::map<std::string, RGBColor> NIImporter_Vissim::ColorMap

definition of a map from color names to color definitions

Definition at line 545 of file NIImporter_Vissim.h.

◆ nodeMap

typedef std::map<std::string, std::list<std::string> > NIImporter_Vissim::nodeMap
private

Definition at line 75 of file NIImporter_Vissim.h.

◆ ToElemIDMap

typedef std::map<std::string, NIVissimElement> NIImporter_Vissim::ToElemIDMap
private

Definition of a map from element names to their numerical representation.

Definition at line 560 of file NIImporter_Vissim.h.

◆ ToParserMap

Definition of a map from an element's numerical id to his parser.

Definition at line 566 of file NIImporter_Vissim.h.

Member Enumeration Documentation

◆ VissimXMLAttr

Numbers representing VISSIM-XML - attributes.

See also
GenericSAXHandler
Enumerator
VISSIM_ATTR_NOTHING 
VISSIM_ATTR_NO 
VISSIM_ATTR_NAME 
VISSIM_ATTR_X 
VISSIM_ATTR_Y 
VISSIM_ATTR_ZOFFSET 
VISSIM_ATTR_ZUSCHLAG1 
VISSIM_ATTR_ZUSCHLAG2 
VISSIM_ATTR_WIDTH 
VISSIM_ATTR_LINKBEHAVETYPE 
VISSIM_ATTR_LANE 
VISSIM_ATTR_POS 
VISSIM_ATTR_LINK 
VISSIM_ATTR_INTLINK 
VISSIM_ATTR_PERCENTAGE 
VISSIM_ATTR_DISTRICT 
VISSIM_ATTR_COLOR 
VISSIM_ATTR_KEY 
VISSIM_ATTR_FX 
VISSIM_ATTR_DESTLINK 
VISSIM_ATTR_DESTPOS 
VISSIM_ATTR_LINK1 
VISSIM_ATTR_LINK2 
VISSIM_ATTR_STATUS 

Definition at line 623 of file NIImporter_Vissim.h.

◆ VissimXMLTag

Numbers representing VISSIM-XML - element names.

See also
GenericSAXHandler
Enumerator
VISSIM_TAG_NOTHING 
VISSIM_TAG_NETWORK 
VISSIM_TAG_LANES 
VISSIM_TAG_LANE 
VISSIM_TAG_LINK 
VISSIM_TAG_LINKS 
VISSIM_TAG_POINTS3D 
VISSIM_TAG_POINT3D 
VISSIM_TAG_LINKPOLYPOINT 
VISSIM_TAG_LINKPOLYPTS 
VISSIM_TAG_FROM 
VISSIM_TAG_TO 
VISSIM_TAG_VEHICLE_INPUT 
VISSIM_TAG_PARKINGLOT 
VISSIM_TAG_VEHICLE_CLASS 
VISSIM_TAG_INTOBJECTREF 
VISSIM_TAG_SPEED_DECISION 
VISSIM_TAG_SPEED_DIST 
VISSIM_TAG_DATAPOINT 
VISSIM_TAG_DECISION_STATIC 
VISSIM_TAG_ROUTE_STATIC 
VISSIM_TAG_CA 

Definition at line 592 of file NIImporter_Vissim.h.

Constructor & Destructor Documentation

◆ NIImporter_Vissim() [1/2]

NIImporter_Vissim::NIImporter_Vissim ( NBNetBuilder & nb)
protected

constructor

Definition at line 838 of file NIImporter_Vissim.cpp.

References RGBColor::BLACK, buildParsers(), RGBColor::CYAN, RGBColor::GREEN, RGBColor::GREY, insertKnownElements(), RGBColor::MAGENTA, myColorMap, myNetBuilder, RGBColor::RED, RGBColor::WHITE, and RGBColor::YELLOW.

Referenced by loadNetwork(), NIImporter_Vissim(), operator=(), and NIImporter_Vissim::VissimSingleTypeParser::VissimSingleTypeParser().

Here is the caller graph for this function:

◆ ~NIImporter_Vissim()

◆ NIImporter_Vissim() [2/2]

NIImporter_Vissim::NIImporter_Vissim ( const NIImporter_Vissim & )
private

Invalidated copy constructor.

References NIImporter_Vissim().

Member Function Documentation

◆ admitContinue()

bool NIImporter_Vissim::admitContinue ( const std::string & tag)
protected

Definition at line 961 of file NIImporter_Vissim.cpp.

References myKnownElements, and myLastSecure.

◆ buildParsers()

void NIImporter_Vissim::buildParsers ( )
private

adds id-to-parser - relationships of elements to parse into myParsers

Definition at line 1139 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().

Here is the caller graph for this function:

◆ insertKnownElements()

void NIImporter_Vissim::insertKnownElements ( )
private

adds name-to-id - relationships of known elements into myKnownElements

Definition at line 1067 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().

Here is the caller graph for this function:

◆ load()

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

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

Definition at line 192 of file NIImporter_Vissim.cpp.

References OptionsCont::isSet(), and NIImporter_Vissim().

Referenced by NILoader::load().

Here is the caller graph for this function:

◆ operator=()

NIImporter_Vissim & NIImporter_Vissim::operator= ( const NIImporter_Vissim & )
private

Invalidated assignment operator.

References NIImporter_Vissim().

◆ postLoadBuild()

◆ readContents()

bool NIImporter_Vissim::readContents ( std::istream & strm)
private

Definition at line 972 of file NIImporter_Vissim.cpp.

References myKnownElements, myLastSecure, myParsers, NIImporter_Vissim::VissimSingleTypeParser::parse(), and StringUtils::to_lower_case().

Referenced by load().

Here is the caller graph for this function:

Field Documentation

◆ elementData

nodeMap NIImporter_Vissim::elementData
private

Definition at line 76 of file NIImporter_Vissim.h.

Referenced by load().

◆ myColorMap

ColorMap NIImporter_Vissim::myColorMap
private

a map from color names to color definitions

Definition at line 572 of file NIImporter_Vissim.h.

Referenced by buildParsers(), and NIImporter_Vissim().

◆ myKnownElements

ToElemIDMap NIImporter_Vissim::myKnownElements
private

Map from element names to their numerical representation.

Definition at line 563 of file NIImporter_Vissim.h.

Referenced by admitContinue(), insertKnownElements(), and readContents().

◆ myLastSecure

std::string NIImporter_Vissim::myLastSecure
private

Definition at line 574 of file NIImporter_Vissim.h.

Referenced by admitContinue(), and readContents().

◆ myNetBuilder

NBNetBuilder& NIImporter_Vissim::myNetBuilder
private

Definition at line 576 of file NIImporter_Vissim.h.

Referenced by NIImporter_Vissim(), and postLoadBuild().

◆ myParsers

ToParserMap NIImporter_Vissim::myParsers
private

Parsers by element id.

Definition at line 569 of file NIImporter_Vissim.h.

Referenced by buildParsers(), readContents(), and ~NIImporter_Vissim().

◆ vissimAttrs

SequentialStringBijection::Entry NIImporter_Vissim::vissimAttrs
staticprivate
Initial value:
= {
}

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

Definition at line 157 of file NIImporter_Vissim.h.

Referenced by NIImporter_Vissim::NIVissimXMLHandler_ConflictArea::NIVissimXMLHandler_ConflictArea(), NIImporter_Vissim::NIVissimXMLHandler_Fahrzeugklassendefinition::NIVissimXMLHandler_Fahrzeugklassendefinition(), NIImporter_Vissim::NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition::NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition(), NIImporter_Vissim::NIVissimXMLHandler_Parkplatzdefinition::NIVissimXMLHandler_Parkplatzdefinition(), NIImporter_Vissim::NIVissimXMLHandler_Routenentscheidungsdefinition::NIVissimXMLHandler_Routenentscheidungsdefinition(), NIImporter_Vissim::NIVissimXMLHandler_Streckendefinition::NIVissimXMLHandler_Streckendefinition(), NIImporter_Vissim::NIVissimXMLHandler_VWunschentscheidungsdefinition::NIVissimXMLHandler_VWunschentscheidungsdefinition(), and NIImporter_Vissim::NIVissimXMLHandler_Zuflussdefinition::NIVissimXMLHandler_Zuflussdefinition().

◆ vissimTags


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