SUMO - Simulation of Urban MObility
RODFDetectorFlow.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // missing_desc
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef RODFDetectorFlow_h
23 #define RODFDetectorFlow_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <utils/common/SUMOTime.h>
36 #include <map>
37 #include <string>
38 #include <vector>
39 
40 
41 // ===========================================================================
42 // struct definitions
43 // ===========================================================================
48 struct FlowDef {
49  // Number of passenger vehicles that passed within the described time
51  // Number of heavy duty vehicles that passed within the described time
53  // Mean velocity of passenger vehicles within the described time
55  // Mean velocity of heavy duty vehicles within the described time
57  // begin time (in s)
58 // int time;
59  // probability for having a heavy duty vehicle(qKFZ!=0 ? (qLKW / qKFZ) : 0;)
61  // initialise with 0
62  mutable SUMOReal isLKW;
63  //
64  bool firstSet;
65 };
66 
67 
68 // ===========================================================================
69 // class definitions
70 // ===========================================================================
76 public:
77  RODFDetectorFlows(SUMOTime startTime, SUMOTime endTime,
78  SUMOTime stepOffset);
80  void addFlow(const std::string& detector_id, SUMOTime timestamp,
81  const FlowDef& fd);
82  void removeFlow(const std::string& detector_id);
83  void setFlows(const std::string& detector_id, std::vector<FlowDef>&);
84 
85  const std::vector<FlowDef>& getFlowDefs(const std::string& id) const;
86  bool knows(const std::string& det_id) const;
87  SUMOReal getFlowSumSecure(const std::string& id) const;
89  void printAbsolute() const;
90 
91  void mesoJoin(const std::string& nid, const std::vector<std::string>& oldids);
92 
93 protected:
94  std::map<std::string, std::vector<FlowDef> > myFastAccessFlows;
97 
98 private:
101 
104 
105 };
106 
107 
108 #endif
109 
110 /****************************************************************************/
111 
SUMOReal getFlowSumSecure(const std::string &id) const
RODFDetectorFlows & operator=(const RODFDetectorFlows &src)
Invalidated assignment operator.
std::map< std::string, std::vector< FlowDef > > myFastAccessFlows
void removeFlow(const std::string &detector_id)
SUMOReal getMaxDetectorFlow() const
SUMOReal isLKW
A container for flows.
void printAbsolute() const
SUMOReal fLKW
void setFlows(const std::string &detector_id, std::vector< FlowDef > &)
bool knows(const std::string &det_id) const
Definition of the traffic during a certain time containing the flows and speeds.
SUMOReal vPKW
void addFlow(const std::string &detector_id, SUMOTime timestamp, const FlowDef &fd)
int SUMOTime
Definition: SUMOTime.h:43
SUMOReal qPKW
const std::vector< FlowDef > & getFlowDefs(const std::string &id) const
#define SUMOReal
Definition: config.h:218
void mesoJoin(const std::string &nid, const std::vector< std::string > &oldids)
SUMOReal myMaxDetectorFlow
SUMOReal vLKW
SUMOReal qLKW
RODFDetectorFlows(SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset)