Eclipse SUMO - Simulation of Urban MObility
NIVissimDistrictConnection Class Reference

#include <NIVissimDistrictConnection.h>

Public Member Functions

Position geomPosition () const
 Returns the position The position yields from the edge geometry and the place the connection is plaed at. More...
 
int getID () const
 Returns the id of the connection. More...
 
double getMeanSpeed () const
 
double getPosition () const
 Returns the position of the connection at the edge. More...
 
 NIVissimDistrictConnection (int id, const std::string &name, const std::vector< int > &districts, const std::vector< double > &percentages, int edgeid, double position, const std::vector< std::pair< int, int > > &assignedVehicles)
 Contructor. More...
 
 ~NIVissimDistrictConnection ()
 

Static Public Member Functions

static void clearDict ()
 Clears the dictionary. More...
 
static void dict_BuildDistrictConnections ()
 
static void dict_BuildDistrictNodes (NBDistrictCont &dc, NBNodeCont &nc)
 Builds the nodes that belong to a district. More...
 
static void dict_BuildDistricts (NBDistrictCont &dc, NBEdgeCont &ec, NBNodeCont &nc)
 Builds the districts. More...
 
static void dict_CheckEdgeEnds ()
 
static NIVissimDistrictConnectiondict_findForEdge (int edgeid)
 Returns the connection to a district placed at the given node Yep, there onyl should be one, there is no need to build a single edge as connection between two parking places. More...
 
static NIVissimDistrictConnectiondictionary (int id)
 Returns the named dictionary. More...
 
static bool dictionary (int id, const std::string &name, const std::vector< int > &districts, const std::vector< double > &percentages, int edgeid, double position, const std::vector< std::pair< int, int > > &assignedVehicles)
 Inserts the connection into the dictionary after building it. More...
 
static bool dictionary (int id, NIVissimDistrictConnection *o)
 Inserts the build connection to the dictionary. More...
 

Private Types

typedef std::map< int, NIVissimDistrictConnection * > DictType
 Definition of a dictionary of district connections. More...
 
typedef std::map< int, double > DistrictPercentages
 Definition of a map of how many vehicles should leave to a certain district. More...
 

Private Member Functions

void checkEdgeEnd ()
 
double getRealSpeed (int distNo) const
 

Private Attributes

std::vector< std::pair< int, int > > myAssignedVehicles
 The vehicles using this connection. More...
 
std::vector< int > myDistricts
 The connected districts. More...
 
int myEdgeID
 The id of the connected edge. More...
 
int myID
 The id of the connections. More...
 
std::string myName
 The name of the connections. More...
 
DistrictPercentages myPercentages
 A map how many vehicles (key, amount) should leave to a district (key) More...
 
double myPosition
 The position on the edge. More...
 

Static Private Attributes

static DictType myDict
 District connection dictionary. More...
 
static std::map< int, std::vector< int > > myDistrictsConnections
 Map from ditricts to connections. More...
 

Detailed Description

Definition at line 36 of file NIVissimDistrictConnection.h.

Member Typedef Documentation

◆ DictType

Definition of a dictionary of district connections.

Definition at line 127 of file NIVissimDistrictConnection.h.

◆ DistrictPercentages

typedef std::map<int, double> NIVissimDistrictConnection::DistrictPercentages
private

Definition of a map of how many vehicles should leave to a certain district.

Definition at line 111 of file NIVissimDistrictConnection.h.

Constructor & Destructor Documentation

◆ NIVissimDistrictConnection()

NIVissimDistrictConnection::NIVissimDistrictConnection ( int  id,
const std::string &  name,
const std::vector< int > &  districts,
const std::vector< double > &  percentages,
int  edgeid,
double  position,
const std::vector< std::pair< int, int > > &  assignedVehicles 
)

Contructor.

Definition at line 57 of file NIVissimDistrictConnection.cpp.

References myDistricts, and myPercentages.

Referenced by dictionary().

Here is the caller graph for this function:

◆ ~NIVissimDistrictConnection()

NIVissimDistrictConnection::~NIVissimDistrictConnection ( )

Definition at line 75 of file NIVissimDistrictConnection.cpp.

Member Function Documentation

◆ checkEdgeEnd()

void NIVissimDistrictConnection::checkEdgeEnd ( )
private

Definition at line 142 of file NIVissimDistrictConnection.cpp.

References NIVissimEdge::checkDistrictConnectionExistanceAt(), NIVissimEdge::dictionary(), myEdgeID, and myPosition.

Referenced by dict_CheckEdgeEnds().

Here is the caller graph for this function:

◆ clearDict()

void NIVissimDistrictConnection::clearDict ( )
static

Clears the dictionary.

Definition at line 348 of file NIVissimDistrictConnection.cpp.

References myDict.

Referenced by NIImporter_Vissim::~NIImporter_Vissim().

Here is the caller graph for this function:

◆ dict_BuildDistrictConnections()

void NIVissimDistrictConnection::dict_BuildDistrictConnections ( )
static

Definition at line 116 of file NIVissimDistrictConnection.cpp.

References myDict, myDistricts, and myDistrictsConnections.

Referenced by NIImporter_Vissim::postLoadBuild().

Here is the caller graph for this function:

◆ dict_BuildDistrictNodes()

void NIVissimDistrictConnection::dict_BuildDistrictNodes ( NBDistrictCont dc,
NBNodeCont nc 
)
static

Builds the nodes that belong to a district.

Definition at line 150 of file NIVissimDistrictConnection.cpp.

References Position::add(), dictionary(), geomPosition(), Named::getID(), PositionVector::getPolygonCenter(), NBDistrict::getPosition(), NBNodeCont::insert(), NBDistrictCont::insert(), myDistrictsConnections, and NBDistrict::setCenter().

Referenced by NIImporter_Vissim::postLoadBuild().

Here is the caller graph for this function:

◆ dict_BuildDistricts()

◆ dict_CheckEdgeEnds()

void NIVissimDistrictConnection::dict_CheckEdgeEnds ( )
static

Definition at line 130 of file NIVissimDistrictConnection.cpp.

References checkEdgeEnd(), dictionary(), and myDistrictsConnections.

Referenced by NIImporter_Vissim::postLoadBuild().

Here is the caller graph for this function:

◆ dict_findForEdge()

NIVissimDistrictConnection * NIVissimDistrictConnection::dict_findForEdge ( int  edgeid)
static

Returns the connection to a district placed at the given node Yep, there onyl should be one, there is no need to build a single edge as connection between two parking places.

Definition at line 337 of file NIVissimDistrictConnection.cpp.

References myDict.

Referenced by NIVissimEdge::resolveSameNode(), and NIVissimEdge::setDistrictSpeed().

Here is the caller graph for this function:

◆ dictionary() [1/3]

NIVissimDistrictConnection * NIVissimDistrictConnection::dictionary ( int  id)
static

Returns the named dictionary.

Definition at line 107 of file NIVissimDistrictConnection.cpp.

References myDict.

◆ dictionary() [2/3]

bool NIVissimDistrictConnection::dictionary ( int  id,
const std::string &  name,
const std::vector< int > &  districts,
const std::vector< double > &  percentages,
int  edgeid,
double  position,
const std::vector< std::pair< int, int > > &  assignedVehicles 
)
static

Inserts the connection into the dictionary after building it.

Definition at line 80 of file NIVissimDistrictConnection.cpp.

References NIVissimDistrictConnection().

Referenced by dict_BuildDistrictNodes(), dict_BuildDistricts(), dict_CheckEdgeEnds(), NIImporter_Vissim::NIVissimXMLHandler_Parkplatzdefinition::myStartElement(), and NIVissimSingleTypeParser_Parkplatzdefinition::parse().

Here is the caller graph for this function:

◆ dictionary() [3/3]

bool NIVissimDistrictConnection::dictionary ( int  id,
NIVissimDistrictConnection o 
)
static

Inserts the build connection to the dictionary.

Definition at line 96 of file NIVissimDistrictConnection.cpp.

References myDict.

◆ geomPosition()

Position NIVissimDistrictConnection::geomPosition ( ) const

Returns the position The position yields from the edge geometry and the place the connection is plaed at.

Definition at line 330 of file NIVissimDistrictConnection.cpp.

References NIVissimEdge::dictionary(), NIVissimAbstractEdge::getGeomPosition(), myEdgeID, and myPosition.

Referenced by dict_BuildDistrictNodes(), NIVissimEdge::remapOneOfNodes(), and NIVissimEdge::resolveSameNode().

Here is the caller graph for this function:

◆ getID()

int NIVissimDistrictConnection::getID ( ) const
inline

Returns the id of the connection.

Definition at line 52 of file NIVissimDistrictConnection.h.

References myID.

Referenced by NIVissimEdge::remapOneOfNodes(), and NIVissimEdge::resolveSameNode().

Here is the caller graph for this function:

◆ getMeanSpeed()

double NIVissimDistrictConnection::getMeanSpeed ( ) const

Definition at line 357 of file NIVissimDistrictConnection.cpp.

References getRealSpeed(), myAssignedVehicles, myID, TL, toString(), and WRITE_WARNINGF.

Referenced by dict_BuildDistricts(), and NIVissimEdge::setDistrictSpeed().

Here is the caller graph for this function:

◆ getPosition()

double NIVissimDistrictConnection::getPosition ( ) const
inline

Returns the position of the connection at the edge.

Definition at line 57 of file NIVissimDistrictConnection.h.

References myPosition.

Referenced by dict_BuildDistricts(), and NIVissimEdge::resolveSameNode().

Here is the caller graph for this function:

◆ getRealSpeed()

double NIVissimDistrictConnection::getRealSpeed ( int  distNo) const
private

Definition at line 373 of file NIVissimDistrictConnection.cpp.

References DistributionCont::dictionary(), OptionsCont::getFloat(), Distribution::getMax(), OptionsCont::getOptions(), TL, WRITE_WARNING, and WRITE_WARNINGF.

Referenced by getMeanSpeed().

Here is the caller graph for this function:

Field Documentation

◆ myAssignedVehicles

std::vector<std::pair<int, int> > NIVissimDistrictConnection::myAssignedVehicles
private

The vehicles using this connection.

Definition at line 123 of file NIVissimDistrictConnection.h.

Referenced by getMeanSpeed().

◆ myDict

NIVissimDistrictConnection::DictType NIVissimDistrictConnection::myDict
staticprivate

District connection dictionary.

Definition at line 130 of file NIVissimDistrictConnection.h.

Referenced by clearDict(), dict_BuildDistrictConnections(), dict_findForEdge(), and dictionary().

◆ myDistricts

std::vector<int> NIVissimDistrictConnection::myDistricts
private

The connected districts.

Definition at line 108 of file NIVissimDistrictConnection.h.

Referenced by dict_BuildDistrictConnections(), and NIVissimDistrictConnection().

◆ myDistrictsConnections

std::map< int, std::vector< int > > NIVissimDistrictConnection::myDistrictsConnections
staticprivate

Map from ditricts to connections.

Definition at line 133 of file NIVissimDistrictConnection.h.

Referenced by dict_BuildDistrictConnections(), dict_BuildDistrictNodes(), dict_BuildDistricts(), and dict_CheckEdgeEnds().

◆ myEdgeID

int NIVissimDistrictConnection::myEdgeID
private

The id of the connected edge.

Definition at line 117 of file NIVissimDistrictConnection.h.

Referenced by checkEdgeEnd(), dict_BuildDistricts(), and geomPosition().

◆ myID

int NIVissimDistrictConnection::myID
private

The id of the connections.

Definition at line 102 of file NIVissimDistrictConnection.h.

Referenced by dict_BuildDistricts(), getID(), and getMeanSpeed().

◆ myName

std::string NIVissimDistrictConnection::myName
private

The name of the connections.

Definition at line 105 of file NIVissimDistrictConnection.h.

◆ myPercentages

DistrictPercentages NIVissimDistrictConnection::myPercentages
private

A map how many vehicles (key, amount) should leave to a district (key)

Definition at line 114 of file NIVissimDistrictConnection.h.

Referenced by dict_BuildDistricts(), and NIVissimDistrictConnection().

◆ myPosition

double NIVissimDistrictConnection::myPosition
private

The position on the edge.

Definition at line 120 of file NIVissimDistrictConnection.h.

Referenced by checkEdgeEnd(), dict_BuildDistricts(), geomPosition(), and getPosition().


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