21 #ifndef NIVissimDistrictConnection_h 22 #define NIVissimDistrictConnection_h 50 const std::vector<int>& districts,
const std::vector<double>& percentages,
51 int edgeid,
double position,
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<double>& percentages,
77 int edgeid,
double position,
78 const std::vector<std::pair<int, int> >& assignedVehicles);
137 typedef std::map<int, NIVissimDistrictConnection*>
DictType;
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.
double getRealSpeed(int distNo) const
static std::map< int, std::vector< int > > myDistrictsConnections
Map from ditricts to connections.
A container for districts.
Position geomPosition() const
Returns the position The position yields from the edge geometry and the place the connection is plaed...
int getID() const
Returns the id of the connection.
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)
static void dict_CheckEdgeEnds()
int myID
The id of the connections.
double getPosition() const
Returns the position of the connection at the edge.
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.
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.
static void clearDict()
Clears the dictionary.
~NIVissimDistrictConnection()
double getMeanSpeed() const
double myPosition
The position on the edge.
std::string myName
The name of the connections.
Container for nodes during the netbuilding process.
std::map< int, NIVissimDistrictConnection * > DictType
Definition of a dictionary of district connections.
static void dict_BuildDistrictNodes(NBDistrictCont &dc, NBNodeCont &nc)
Builds the nodes that belong to a district.
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.