Eclipse 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. | |
int | getID () const |
Returns the id of the connection. | |
double | getMeanSpeed () const |
double | 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< double > &percentages, int edgeid, double 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 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. | |
static NIVissimDistrictConnection * | dictionary (int id) |
Returns the named dictionary. | |
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. | |
static bool | dictionary (int id, NIVissimDistrictConnection *o) |
Inserts the build connection to the dictionary. | |
Private Types | |
typedef std::map< int, NIVissimDistrictConnection * > | DictType |
Definition of a dictionary of district connections. | |
typedef std::map< int, double > | DistrictPercentages |
Definition of a map of how many vehicles should leave to a certain district. | |
Private Member Functions | |
void | checkEdgeEnd () |
double | getRealSpeed (int distNo) const |
Private Attributes | |
std::vector< std::pair< int, int > > | myAssignedVehicles |
The vehicles using this connection. | |
std::vector< int > | myDistricts |
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) | |
double | 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. | |
Definition at line 36 of file NIVissimDistrictConnection.h.
|
private |
Definition of a dictionary of district connections.
Definition at line 127 of file NIVissimDistrictConnection.h.
|
private |
Definition of a map of how many vehicles should leave to a certain district.
Definition at line 111 of file NIVissimDistrictConnection.h.
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.
NIVissimDistrictConnection::~NIVissimDistrictConnection | ( | ) |
Definition at line 75 of file NIVissimDistrictConnection.cpp.
|
private |
Definition at line 142 of file NIVissimDistrictConnection.cpp.
References NIVissimEdge::checkDistrictConnectionExistanceAt(), NIVissimEdge::dictionary(), myEdgeID, and myPosition.
Referenced by dict_CheckEdgeEnds().
|
static |
Clears the dictionary.
Definition at line 348 of file NIVissimDistrictConnection.cpp.
References myDict.
Referenced by NIImporter_Vissim::~NIImporter_Vissim().
|
static |
Definition at line 116 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 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().
|
static |
Builds the districts.
Definition at line 181 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(), RIGHT, TL, NBEdge::UNSPECIFIED_FRICTION, NBEdge::UNSPECIFIED_OFFSET, NBEdge::UNSPECIFIED_WIDTH, and WRITE_WARNINGF.
Referenced by NIImporter_Vissim::postLoadBuild().
|
static |
Definition at line 130 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 337 of file NIVissimDistrictConnection.cpp.
References myDict.
Referenced by NIVissimEdge::resolveSameNode(), and NIVissimEdge::setDistrictSpeed().
|
static |
Returns the named dictionary.
Definition at line 107 of file NIVissimDistrictConnection.cpp.
References myDict.
|
static |
Inserts the connection into the dictionary after building it.
Definition at line 80 of file NIVissimDistrictConnection.cpp.
References dictionary().
Referenced by dict_BuildDistrictNodes(), dict_BuildDistricts(), dict_CheckEdgeEnds(), dictionary(), NIImporter_Vissim::NIVissimXMLHandler_Parkplatzdefinition::myStartElement(), and NIVissimSingleTypeParser_Parkplatzdefinition::parse().
|
static |
Inserts the build connection to the dictionary.
Definition at line 96 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 330 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 52 of file NIVissimDistrictConnection.h.
References myID.
Referenced by NIVissimEdge::remapOneOfNodes(), and NIVissimEdge::resolveSameNode().
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().
|
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().
|
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().
|
private |
The vehicles using this connection.
Definition at line 123 of file NIVissimDistrictConnection.h.
Referenced by getMeanSpeed().
|
staticprivate |
District connection dictionary.
Definition at line 130 of file NIVissimDistrictConnection.h.
Referenced by clearDict(), dict_BuildDistrictConnections(), dict_findForEdge(), dictionary(), and dictionary().
|
private |
The connected districts.
Definition at line 108 of file NIVissimDistrictConnection.h.
Referenced by dict_BuildDistrictConnections(), and NIVissimDistrictConnection().
|
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().
|
private |
The id of the connected edge.
Definition at line 117 of file NIVissimDistrictConnection.h.
Referenced by checkEdgeEnd(), dict_BuildDistricts(), and geomPosition().
|
private |
The id of the connections.
Definition at line 102 of file NIVissimDistrictConnection.h.
Referenced by dict_BuildDistricts(), getID(), and getMeanSpeed().
|
private |
The name of the connections.
Definition at line 105 of file NIVissimDistrictConnection.h.
|
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().
|
private |
The position on the edge.
Definition at line 120 of file NIVissimDistrictConnection.h.
Referenced by checkEdgeEnd(), dict_BuildDistricts(), geomPosition(), and getPosition().