 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
17 #ifndef NIVissimDistrictConnection_h
18 #define NIVissimDistrictConnection_h
42 const std::vector<int>& districts,
const std::vector<double>& percentages,
43 int edgeid,
double position,
44 const std::vector<std::pair<int, int> >& assignedVehicles);
67 static bool dictionary(
int id,
const std::string& name,
68 const std::vector<int>& districts,
const std::vector<double>& percentages,
69 int edgeid,
double position,
70 const std::vector<std::pair<int, int> >& assignedVehicles);
129 typedef std::map<int, NIVissimDistrictConnection*>
DictType;
double getPosition() const
Returns the position of the connection at the edge.
std::vector< std::pair< int, int > > myAssignedVehicles
The vehicles using this connection.
static void dict_BuildDistrictNodes(NBDistrictCont &dc, NBNodeCont &nc)
Builds the nodes that belong to a district.
Storage for edges, including some functionality operating on multiple edges.
double getRealSpeed(int distNo) const
int myID
The id of the connections.
static DictType myDict
District connection dictionary.
static void dict_BuildDistrictConnections()
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.
std::map< int, double > DistrictPercentages
Definition of a map of how many vehicles should leave to a certain district.
static void dict_BuildDistricts(NBDistrictCont &dc, NBEdgeCont &ec, NBNodeCont &nc)
Builds the districts.
std::string myName
The name of the connections.
static std::map< int, std::vector< int > > myDistrictsConnections
Map from ditricts to connections.
A container for districts.
Container for nodes during the netbuilding process.
int getID() const
Returns the id of the connection.
int myEdgeID
The id of the connected edge.
static void clearDict()
Clears the dictionary.
std::map< int, NIVissimDistrictConnection * > DictType
Definition of a dictionary of district connections.
A point in 2D or 3D with translation and scaling methods.
static NIVissimDistrictConnection * dict_findForEdge(int edgeid)
Returns the connection to a district placed at the given node Yep, there onyl should be one,...
static void dict_CheckEdgeEnds()
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.
Position geomPosition() const
Returns the position The position yields from the edge geometry and the place the connection is plaed...
std::vector< int > myDistricts
The connected districts.
DistrictPercentages myPercentages
A map how many vehicles (key, amount) should leave to a district (key)
double getMeanSpeed() const
double myPosition
The position on the edge.
~NIVissimDistrictConnection()