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