Eclipse SUMO - Simulation of Urban MObility
RODFDetectorFlow.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // missing_desc
18 /****************************************************************************/
19 #ifndef RODFDetectorFlow_h
20 #define RODFDetectorFlow_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <utils/common/SUMOTime.h>
29 #include <map>
30 #include <string>
31 #include <vector>
32 
33 
34 // ===========================================================================
35 // struct definitions
36 // ===========================================================================
41 struct FlowDef {
42  // Number of passenger vehicles that passed within the described time
43  double qPKW;
44  // Number of heavy duty vehicles that passed within the described time
45  double qLKW;
46  // Mean velocity of passenger vehicles within the described time
47  double vPKW;
48  // Mean velocity of heavy duty vehicles within the described time
49  double vLKW;
50  // begin time (in s)
51 // int time;
52  // probability for having a heavy duty vehicle(qKFZ!=0 ? (qLKW / qKFZ) : 0;)
53  double fLKW;
54  // initialise with 0
55  mutable double isLKW;
56  //
57  bool firstSet;
58 };
59 
60 
61 // ===========================================================================
62 // class definitions
63 // ===========================================================================
69 public:
70  RODFDetectorFlows(SUMOTime startTime, SUMOTime endTime,
71  SUMOTime stepOffset);
73  void addFlow(const std::string& detector_id, SUMOTime timestamp,
74  const FlowDef& fd);
75  void removeFlow(const std::string& detector_id);
76  void setFlows(const std::string& detector_id, std::vector<FlowDef>&);
77 
78  const std::vector<FlowDef>& getFlowDefs(const std::string& id) const;
79  bool knows(const std::string& det_id) const;
80  double getFlowSumSecure(const std::string& id) const;
81  double getMaxDetectorFlow() const;
82  void printAbsolute() const;
83 
84  void mesoJoin(const std::string& nid, const std::vector<std::string>& oldids);
85 
86 protected:
87  std::map<std::string, std::vector<FlowDef> > myFastAccessFlows;
88  SUMOTime myBeginTime, myEndTime, myStepOffset;
89  mutable double myMaxDetectorFlow;
90 
91 private:
94 
96  RODFDetectorFlows& operator=(const RODFDetectorFlows& src);
97 
98 };
99 
100 
101 #endif
102 
103 /****************************************************************************/
104 
long long int SUMOTime
Definition: SUMOTime.h:35
double fLKW
std::map< std::string, std::vector< FlowDef > > myFastAccessFlows
static double fd[10]
Definition: odrSpiral.cpp:94
A container for flows.
double vPKW
double vLKW
Definition of the traffic during a certain time containing the flows and speeds.
double qPKW
double isLKW
double qLKW