RODFDetectorFlow.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef RODFDetectorFlow_h
00020 #define RODFDetectorFlow_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include <utils/common/SUMOTime.h>
00033 #include <map>
00034 #include <string>
00035 #include <vector>
00036
00037
00038
00039
00040
00045 struct FlowDef {
00046
00047 SUMOReal qPKW;
00048
00049 SUMOReal qLKW;
00050
00051 SUMOReal vPKW;
00052
00053 SUMOReal vLKW;
00054
00055
00056
00057 SUMOReal fLKW;
00058
00059 mutable SUMOReal isLKW;
00060
00061 bool firstSet;
00062 };
00063
00064
00065
00066
00067
00072 class RODFDetectorFlows {
00073 public:
00074 RODFDetectorFlows(SUMOTime startTime, SUMOTime endTime,
00075 SUMOTime stepOffset);
00076 ~RODFDetectorFlows();
00077 void addFlow(const std::string &detector_id, int timestamp,
00078 const FlowDef &fd);
00079 void removeFlow(const std::string &detector_id);
00080 void setFlows(const std::string &detector_id, std::vector<FlowDef> &);
00081
00082 const std::vector<FlowDef> &getFlowDefs(const std::string &id) const;
00083 bool knows(const std::string &det_id) const;
00084 bool knows(const std::string &det_id, SUMOTime time) const;
00085 SUMOReal getFlowSumSecure(const std::string &id) const;
00086 SUMOReal getMaxDetectorFlow() const;
00087 void printAbsolute() const;
00088
00089 void mesoJoin(const std::string &nid, const std::vector<std::string> &oldids);
00090
00091 protected:
00092 std::map<std::string, std::vector<FlowDef> > myFastAccessFlows;
00093 SUMOTime myBeginTime, myEndTime, myStepOffset;
00094 mutable SUMOReal myMaxDetectorFlow;
00095
00096 private:
00098 RODFDetectorFlows(const RODFDetectorFlows &src);
00099
00101 RODFDetectorFlows &operator=(const RODFDetectorFlows &src);
00102
00103 };
00104
00105
00106 #endif
00107
00108
00109