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. | |
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 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 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 NIVissimDistrictConnection * | dictionary (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, SUMOReal > | DistrictPercentages |
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< 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) | |
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. |
Definition at line 46 of file NIVissimDistrictConnection.h.
typedef std::map<int, NIVissimDistrictConnection*> NIVissimDistrictConnection::DictType [private] |
Definition of a dictionary of district connections.
Definition at line 137 of file NIVissimDistrictConnection.h.
typedef std::map<int, SUMOReal> NIVissimDistrictConnection::DistrictPercentages [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().
Definition at line 89 of file NIVissimDistrictConnection.cpp.
void NIVissimDistrictConnection::checkEdgeEnd | ( | ) | [private] |
Definition at line 156 of file NIVissimDistrictConnection.cpp.
References NIVissimEdge::checkDistrictConnectionExistanceAt(), dictionary(), myEdgeID, and myPosition.
Referenced by dict_CheckEdgeEnds().
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] |
Definition at line 130 of file NIVissimDistrictConnection.cpp.
References myDict, myDistricts, and myDistrictsConnections.
Referenced by NIImporter_Vissim::postLoadBuild().
void NIVissimDistrictConnection::dict_BuildDistrictNodes | ( | NBDistrictCont & | dc, |
NBNodeCont & | nc | ||
) | [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().
void NIVissimDistrictConnection::dict_BuildDistricts | ( | NBDistrictCont & | dc, |
NBEdgeCont & | ec, | ||
NBNodeCont & | nc | ||
) | [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(), LANESPREAD_RIGHT, myDistrictsConnections, myEdgeID, myID, myPercentages, myPosition, NBDistrictCont::retrieve(), NBEdgeCont::retrieve(), NBNodeCont::retrieve(), NBEdgeCont::retrievePossiblySplitted(), SUMOReal, and WRITE_WARNING.
Referenced by NIImporter_Vissim::postLoadBuild().
void NIVissimDistrictConnection::dict_CheckEdgeEnds | ( | ) | [static] |
Definition at line 144 of file NIVissimDistrictConnection.cpp.
References checkEdgeEnd(), dictionary(), and myDistrictsConnections.
Referenced by NIImporter_Vissim::postLoadBuild().
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] |
Inserts the connection into the dictionary after building it.
Definition at line 94 of file NIVissimDistrictConnection.cpp.
References NIVissimDistrictConnection().
Referenced by checkEdgeEnd(), dict_BuildDistrictNodes(), dict_BuildDistricts(), dict_CheckEdgeEnds(), geomPosition(), getRealSpeed(), and NIVissimSingleTypeParser_Parkplatzdefinition::parse().
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.
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().
Definition at line 370 of file NIVissimDistrictConnection.cpp.
References getRealSpeed(), myAssignedVehicles, myID, SUMOReal, toString(), and WRITE_WARNING.
Referenced by dict_BuildDistricts(), and NIVissimEdge::setDistrictSpeed().
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] |
Definition at line 386 of file NIVissimDistrictConnection.cpp.
References dictionary(), OptionsCont::getFloat(), OptionsCont::getOptions(), SUMOReal, and WRITE_WARNING.
Referenced by getMeanSpeed().
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 [static, private] |
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 [static, private] |
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.
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().
The position on the edge.
Definition at line 130 of file NIVissimDistrictConnection.h.
Referenced by checkEdgeEnd(), dict_BuildDistricts(), geomPosition(), and getPosition().