SUMO - Simulation of Urban MObility
|
#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... | |
SUMOReal | getMeanSpeed () const |
SUMOReal | 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< SUMOReal > &percentages, int edgeid, SUMOReal 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 NIVissimDistrictConnection * | dict_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 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. More... | |
static bool | dictionary (int id, NIVissimDistrictConnection *o) |
Inserts the build connection to the dictionary. More... | |
static NIVissimDistrictConnection * | dictionary (int id) |
Returns the named dictionary. More... | |
Private Types | |
typedef std::map< int, NIVissimDistrictConnection * > | DictType |
Definition of a dictionary of district connections. More... | |
typedef std::map< int, SUMOReal > | DistrictPercentages |
Definition of a map of how many vehicles should leave to a certain district. More... | |
Private Member Functions | |
void | checkEdgeEnd () |
SUMOReal | 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... | |
SUMOReal | 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... | |
Definition at line 46 of file NIVissimDistrictConnection.h.
|
private |
Definition of a dictionary of district connections.
Definition at line 137 of file NIVissimDistrictConnection.h.
|
private |
Definition of a map of how many vehicles should leave to a certain district.
Definition at line 121 of file NIVissimDistrictConnection.h.
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.
|
private |
Definition at line 156 of file NIVissimDistrictConnection.cpp.
References NIVissimEdge::checkDistrictConnectionExistanceAt(), NIVissimEdge::dictionary(), myEdgeID, and myPosition.
Referenced by dict_CheckEdgeEnds().
|
static |
Clears the dictionary.
Definition at line 363 of file NIVissimDistrictConnection.cpp.
References myDict.
Referenced by NIImporter_Vissim::~NIImporter_Vissim().
|
static |
Definition at line 130 of file NIVissimDistrictConnection.cpp.
References myDict, myDistricts, and myDistrictsConnections.
Referenced by NIImporter_Vissim::postLoadBuild().
|
static |
Builds the nodes that belong to a district.
Definition at line 164 of file NIVissimDistrictConnection.cpp.
References Position::add(), dictionary(), geomPosition(), PositionVector::getPolygonCenter(), NBDistrictCont::insert(), NBNodeCont::insert(), myDistrictsConnections, and PositionVector::push_back().
Referenced by NIImporter_Vissim::postLoadBuild().
|
static |
Builds the districts.
Definition at line 195 of file NIVissimDistrictConnection.cpp.
References NBDistrict::addSink(), NBDistrict::addSource(), dictionary(), NBEdge::getFromNode(), Named::getID(), getMeanSpeed(), getPosition(), NBEdge::getToNode(), NBEdgeCont::insert(), NBNode::invalidateIncomingConnections(), NBNode::invalidateOutgoingConnections(), myDistrictsConnections, myEdgeID, myID, myPercentages, myPosition, NBDistrictCont::retrieve(), NBNodeCont::retrieve(), NBEdgeCont::retrieve(), NBEdgeCont::retrievePossiblySplit(), SUMOReal, NBEdge::UNSPECIFIED_OFFSET, NBEdge::UNSPECIFIED_WIDTH, and WRITE_WARNING.
Referenced by NIImporter_Vissim::postLoadBuild().
|
static |
Definition at line 144 of file NIVissimDistrictConnection.cpp.
References checkEdgeEnd(), dictionary(), and myDistrictsConnections.
Referenced by NIImporter_Vissim::postLoadBuild().
|
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 352 of file NIVissimDistrictConnection.cpp.
References myDict.
Referenced by NIVissimEdge::resolveSameNode(), and NIVissimEdge::setDistrictSpeed().
|
static |
Inserts the connection into the dictionary after building it.
Definition at line 94 of file NIVissimDistrictConnection.cpp.
References NIVissimDistrictConnection().
Referenced by dict_BuildDistrictNodes(), dict_BuildDistricts(), dict_CheckEdgeEnds(), and NIVissimSingleTypeParser_Parkplatzdefinition::parse().
|
static |
Inserts the build connection to the dictionary.
Definition at line 110 of file NIVissimDistrictConnection.cpp.
References myDict.
|
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 345 of file NIVissimDistrictConnection.cpp.
References NIVissimEdge::dictionary(), NIVissimAbstractEdge::getGeomPosition(), myEdgeID, and myPosition.
Referenced by dict_BuildDistrictNodes(), NIVissimEdge::remapOneOfNodes(), and NIVissimEdge::resolveSameNode().
|
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 |
Definition at line 372 of file NIVissimDistrictConnection.cpp.
References getRealSpeed(), myAssignedVehicles, myID, SUMOReal, toString(), and WRITE_WARNING.
Referenced by dict_BuildDistricts(), and NIVissimEdge::setDistrictSpeed().
|
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().
|
private |
Definition at line 388 of file NIVissimDistrictConnection.cpp.
References NBDistribution::dictionary(), OptionsCont::getFloat(), OptionsCont::getOptions(), SUMOReal, and WRITE_WARNING.
Referenced by getMeanSpeed().
|
private |
The vehicles using this connection.
Definition at line 133 of file NIVissimDistrictConnection.h.
Referenced by getMeanSpeed().
|
staticprivate |
District connection dictionary.
Definition at line 140 of file NIVissimDistrictConnection.h.
Referenced by clearDict(), dict_BuildDistrictConnections(), dict_findForEdge(), and dictionary().
|
private |
The connected districts.
Definition at line 118 of file NIVissimDistrictConnection.h.
Referenced by dict_BuildDistrictConnections(), and NIVissimDistrictConnection().
|
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().
|
private |
The id of the connected edge.
Definition at line 127 of file NIVissimDistrictConnection.h.
Referenced by checkEdgeEnd(), dict_BuildDistricts(), and geomPosition().
|
private |
The id of the connections.
Definition at line 112 of file NIVissimDistrictConnection.h.
Referenced by dict_BuildDistricts(), getID(), and getMeanSpeed().
|
private |
The name of the connections.
Definition at line 115 of file NIVissimDistrictConnection.h.
|
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().
|
private |
The position on the edge.
Definition at line 130 of file NIVissimDistrictConnection.h.
Referenced by checkEdgeEnd(), dict_BuildDistricts(), geomPosition(), and getPosition().