RODFDetectorFlow.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // missing_desc
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright 2001-2010 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef RODFDetectorFlow_h
00020 #define RODFDetectorFlow_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
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 // struct definitions
00040 // ===========================================================================
00045 struct FlowDef {
00046     // Number of passenger vehicles that passed within the described time
00047     SUMOReal qPKW;
00048     // Number of heavy duty vehicles that passed within the described time
00049     SUMOReal qLKW;
00050     // Mean velocity of passenger vehicles within the described time
00051     SUMOReal vPKW;
00052     // Mean velocity of heavy duty vehicles within the described time
00053     SUMOReal vLKW;
00054     // begin time (in s)
00055 //    int time;
00056     // probability for having a heavy duty vehicle(qKFZ!=0 ? (qLKW / qKFZ) : 0;)
00057     SUMOReal fLKW;
00058     // initialise with 0
00059     mutable SUMOReal isLKW;
00060     //
00061     bool firstSet;
00062 };
00063 
00064 
00065 // ===========================================================================
00066 // class definitions
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 

Generated on Wed May 5 00:06:36 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6