Eclipse SUMO - Simulation of Urban MObility
NIImporter_Vissim Class Reference

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

#include <NIImporter_Vissim.h>

Collaboration diagram for NIImporter_Vissim:

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

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

Protected Member Functions

bool admitContinue (const std::string &tag)
 
void load (const OptionsCont &options)
 loads the vissim file More...
 
 NIImporter_Vissim (NBNetBuilder &nb)
 constructor More...
 
 ~NIImporter_Vissim ()
 destructor More...
 

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. More...
 
typedef std::map< NIVissimElement, VissimSingleTypeParser * > ToParserMap
 Definition of a map from an element's numerical id to his parser. More...
 
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 More...
 
void insertKnownElements ()
 adds name-to-id - relationships of known elements into myKnownElements More...
 
 NIImporter_Vissim (const NIImporter_Vissim &)
 Invalidated copy constructor. More...
 
NIImporter_Vissimoperator= (const NIImporter_Vissim &)
 Invalidated assignment operator. More...
 
void postLoadBuild (double offset)
 
bool readContents (std::istream &strm)
 

Private Attributes

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

Static Private Attributes

static StringBijection< int >::Entry vissimAttrs []
 The names of VISSIM-XML attributes (for passing to GenericSAXHandler) More...
 
static StringBijection< int >::Entry vissimTags []
 The names of VISSIM-XML elements (for passing to GenericSAXHandler) More...
 

Detailed Description

Importer for networks stored in Vissim format.

Definition at line 58 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 547 of file NIImporter_Vissim.h.

◆ nodeMap

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

Definition at line 77 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 562 of file NIImporter_Vissim.h.

◆ ToParserMap

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

Definition at line 568 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 625 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 594 of file NIImporter_Vissim.h.

Constructor & Destructor Documentation

◆ NIImporter_Vissim() [1/2]

NIImporter_Vissim::NIImporter_Vissim ( NBNetBuilder nb)
protected

◆ ~NIImporter_Vissim()

◆ NIImporter_Vissim() [2/2]

NIImporter_Vissim::NIImporter_Vissim ( const NIImporter_Vissim )
private

Invalidated copy constructor.

Member Function Documentation

◆ admitContinue()

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

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

◆ insertKnownElements()

void NIImporter_Vissim::insertKnownElements ( )
private

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

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

◆ 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 193 of file NIImporter_Vissim.cpp.

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

Referenced by NILoader::load().

◆ operator=()

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

Invalidated assignment operator.

◆ postLoadBuild()

◆ readContents()

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

Field Documentation

◆ elementData

nodeMap NIImporter_Vissim::elementData
private

Definition at line 78 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 574 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 565 of file NIImporter_Vissim.h.

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

◆ myLastSecure

std::string NIImporter_Vissim::myLastSecure
private

Definition at line 576 of file NIImporter_Vissim.h.

Referenced by admitContinue(), and readContents().

◆ myNetBuilder

NBNetBuilder& NIImporter_Vissim::myNetBuilder
private

Definition at line 578 of file NIImporter_Vissim.h.

Referenced by postLoadBuild().

◆ myParsers

ToParserMap NIImporter_Vissim::myParsers
private

Parsers by element id.

Definition at line 571 of file NIImporter_Vissim.h.

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

◆ vissimAttrs

◆ vissimTags

StringBijection< int >::Entry NIImporter_Vissim::vissimTags
staticprivate

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

Definition at line 653 of file NIImporter_Vissim.h.


The documentation for this class was generated from the following files:
NIImporter_Vissim::VISSIM_ATTR_LINK1
@ VISSIM_ATTR_LINK1
Definition: NIImporter_Vissim.h:647
NIImporter_Vissim::VISSIM_ATTR_DISTRICT
@ VISSIM_ATTR_DISTRICT
Definition: NIImporter_Vissim.h:641
NIImporter_Vissim::VISSIM_ATTR_NAME
@ VISSIM_ATTR_NAME
Definition: NIImporter_Vissim.h:628
NIImporter_Vissim::VISSIM_ATTR_Y
@ VISSIM_ATTR_Y
Definition: NIImporter_Vissim.h:630
NIImporter_Vissim::VISSIM_ATTR_PERCENTAGE
@ VISSIM_ATTR_PERCENTAGE
Definition: NIImporter_Vissim.h:640
NIImporter_Vissim::VISSIM_ATTR_DESTLINK
@ VISSIM_ATTR_DESTLINK
Definition: NIImporter_Vissim.h:645
NIImporter_Vissim::VISSIM_ATTR_LINKBEHAVETYPE
@ VISSIM_ATTR_LINKBEHAVETYPE
Definition: NIImporter_Vissim.h:635
NIImporter_Vissim::VISSIM_ATTR_KEY
@ VISSIM_ATTR_KEY
Definition: NIImporter_Vissim.h:643
NIImporter_Vissim::VISSIM_ATTR_COLOR
@ VISSIM_ATTR_COLOR
Definition: NIImporter_Vissim.h:642
NIImporter_Vissim::VISSIM_ATTR_ZUSCHLAG2
@ VISSIM_ATTR_ZUSCHLAG2
Definition: NIImporter_Vissim.h:633
NIImporter_Vissim::VISSIM_ATTR_NOTHING
@ VISSIM_ATTR_NOTHING
Definition: NIImporter_Vissim.h:626
NIImporter_Vissim::VISSIM_ATTR_LANE
@ VISSIM_ATTR_LANE
Definition: NIImporter_Vissim.h:636
NIImporter_Vissim::VISSIM_ATTR_ZUSCHLAG1
@ VISSIM_ATTR_ZUSCHLAG1
Definition: NIImporter_Vissim.h:632
NIImporter_Vissim::VISSIM_ATTR_POS
@ VISSIM_ATTR_POS
Definition: NIImporter_Vissim.h:637
NIImporter_Vissim::VISSIM_ATTR_WIDTH
@ VISSIM_ATTR_WIDTH
Definition: NIImporter_Vissim.h:634
NIImporter_Vissim::VISSIM_ATTR_X
@ VISSIM_ATTR_X
Definition: NIImporter_Vissim.h:629
NIImporter_Vissim::VISSIM_ATTR_INTLINK
@ VISSIM_ATTR_INTLINK
Definition: NIImporter_Vissim.h:639
NIImporter_Vissim::VISSIM_ATTR_ZOFFSET
@ VISSIM_ATTR_ZOFFSET
Definition: NIImporter_Vissim.h:631
NIImporter_Vissim::VISSIM_ATTR_LINK2
@ VISSIM_ATTR_LINK2
Definition: NIImporter_Vissim.h:648
NIImporter_Vissim::VISSIM_ATTR_NO
@ VISSIM_ATTR_NO
Definition: NIImporter_Vissim.h:627
NIImporter_Vissim::VISSIM_ATTR_FX
@ VISSIM_ATTR_FX
Definition: NIImporter_Vissim.h:644
NIImporter_Vissim::VISSIM_ATTR_LINK
@ VISSIM_ATTR_LINK
Definition: NIImporter_Vissim.h:638
NIImporter_Vissim::VISSIM_ATTR_STATUS
@ VISSIM_ATTR_STATUS
Definition: NIImporter_Vissim.h:649
NIImporter_Vissim::VISSIM_ATTR_DESTPOS
@ VISSIM_ATTR_DESTPOS
Definition: NIImporter_Vissim.h:646