SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.
int getID () const
 Returns the id of the connection.
SUMOReal getMeanSpeed () const
SUMOReal getPosition () const
 Returns the position of the connection at the edge.
 NIVissimDistrictConnection (int id, const std::string &name, const std::vector< int > &districts, const std::vector< SUMOReal > &percentages, int edgeid, SUMOReal position, const std::vector< std::pair< int, int > > &assignedVehicles)
 Contructor.
 ~NIVissimDistrictConnection ()

Static Public Member Functions

static void clearDict ()
 Clears the dictionary.
static void dict_BuildDistrictConnections ()
static void dict_BuildDistrictNodes (NBDistrictCont &dc, NBNodeCont &nc)
 Builds the nodes that belong to a district.
static void dict_BuildDistricts (NBDistrictCont &dc, NBEdgeCont &ec, NBNodeCont &nc)
 Builds the districts.
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.
static bool dictionary (int id, const std::string &name, const std::vector< int > &districts, const std::vector< SUMOReal > &percentages, int edgeid, SUMOReal position, const std::vector< std::pair< int, int > > &assignedVehicles)
 Inserts the connection into the dictionary after building it.
static bool dictionary (int id, NIVissimDistrictConnection *o)
 Inserts the build connection to the dictionary.
static NIVissimDistrictConnectiondictionary (int id)
 Returns the named dictionary.

Private Types

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

Private Member Functions

void checkEdgeEnd ()
SUMOReal getRealSpeed (int distNo) const

Private Attributes

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

Static Private Attributes

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

Detailed Description

Definition at line 46 of file NIVissimDistrictConnection.h.

Member Typedef Documentation

Definition of a dictionary of district connections.

Definition at line 137 of file NIVissimDistrictConnection.h.

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

Definition at line 121 of file NIVissimDistrictConnection.h.

Constructor & Destructor Documentation

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

Contructor.

Definition at line 71 of file NIVissimDistrictConnection.cpp.

References myDistricts, and myPercentages.

Referenced by dictionary().

NIVissimDistrictConnection::~NIVissimDistrictConnection ( )

Definition at line 89 of file NIVissimDistrictConnection.cpp.

Member Function Documentation

void NIVissimDistrictConnection::checkEdgeEnd ( )
private
void NIVissimDistrictConnection::clearDict ( )
static

Clears the dictionary.

Definition at line 361 of file NIVissimDistrictConnection.cpp.

References myDict.

Referenced by NIImporter_Vissim::~NIImporter_Vissim().

void NIVissimDistrictConnection::dict_BuildDistrictConnections ( )
static
void NIVissimDistrictConnection::dict_BuildDistrictNodes ( NBDistrictCont dc,
NBNodeCont nc 
)
static
void NIVissimDistrictConnection::dict_CheckEdgeEnds ( )
static
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 350 of file NIVissimDistrictConnection.cpp.

References myDict.

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

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

Inserts the build connection to the dictionary.

Definition at line 110 of file NIVissimDistrictConnection.cpp.

References myDict.

NIVissimDistrictConnection * NIVissimDistrictConnection::dictionary ( int  id)
static

Returns the named dictionary.

Definition at line 121 of file NIVissimDistrictConnection.cpp.

References myDict.

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 343 of file NIVissimDistrictConnection.cpp.

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

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

int NIVissimDistrictConnection::getID ( ) const
inline

Returns the id of the connection.

Definition at line 62 of file NIVissimDistrictConnection.h.

References myID.

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

SUMOReal NIVissimDistrictConnection::getMeanSpeed ( ) const
SUMOReal NIVissimDistrictConnection::getPosition ( ) const
inline

Returns the position of the connection at the edge.

Definition at line 67 of file NIVissimDistrictConnection.h.

References myPosition.

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

SUMOReal NIVissimDistrictConnection::getRealSpeed ( int  distNo) const
private

Field Documentation

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

The vehicles using this connection.

Definition at line 133 of file NIVissimDistrictConnection.h.

Referenced by getMeanSpeed().

NIVissimDistrictConnection::DictType NIVissimDistrictConnection::myDict
staticprivate

District connection dictionary.

Definition at line 140 of file NIVissimDistrictConnection.h.

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

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

The connected districts.

Definition at line 118 of file NIVissimDistrictConnection.h.

Referenced by dict_BuildDistrictConnections(), and NIVissimDistrictConnection().

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

Map from ditricts to connections.

Definition at line 143 of file NIVissimDistrictConnection.h.

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

int NIVissimDistrictConnection::myEdgeID
private

The id of the connected edge.

Definition at line 127 of file NIVissimDistrictConnection.h.

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

int NIVissimDistrictConnection::myID
private

The id of the connections.

Definition at line 112 of file NIVissimDistrictConnection.h.

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

std::string NIVissimDistrictConnection::myName
private

The name of the connections.

Definition at line 115 of file NIVissimDistrictConnection.h.

DistrictPercentages NIVissimDistrictConnection::myPercentages
private

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

Definition at line 124 of file NIVissimDistrictConnection.h.

Referenced by dict_BuildDistricts(), and NIVissimDistrictConnection().

SUMOReal NIVissimDistrictConnection::myPosition
private

The position on the edge.

Definition at line 130 of file NIVissimDistrictConnection.h.

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


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