MSMeanData_Harmonoise.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MSMeanData_Harmonoise_h
00020 #define MSMeanData_Harmonoise_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 <vector>
00033 #include <cassert>
00034 #include "MSMeanData.h"
00035 #include <limits>
00036
00037
00038
00039
00040
00041 class OutputDevice;
00042 class MSLane;
00043
00044
00045
00046
00047
00059 class MSMeanData_Harmonoise : public MSMeanData {
00060 public:
00068 class MSLaneMeanDataValues : public MSMeanData::MeanDataValues {
00069 public:
00071 MSLaneMeanDataValues(MSLane * const lane, const bool doAdd,
00072 const std::set<std::string>* const vTypes=0,
00073 const MSMeanData_Harmonoise *parent=0) throw();
00074
00076 virtual ~MSLaneMeanDataValues() throw();
00077
00078
00081 void reset() throw();
00082
00085 void addTo(MSMeanData::MeanDataValues& val) const throw();
00086
00087
00090
00106 bool isStillActive(MSVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) throw();
00107
00108
00121 bool notifyEnter(MSVehicle& veh, bool isEmit, bool isLaneChange) throw();
00123
00124
00130 void update() throw();
00131
00140 void write(OutputDevice &dev, const SUMOTime period,
00141 const SUMOReal numLanes, const SUMOReal length,
00142 const int numVehicles=-1) const throw(IOError);
00143
00144
00147
00149 SUMOReal currentTimeN;
00150
00152 SUMOReal meanNTemp;
00154
00155
00157 const MSMeanData_Harmonoise* myParent;
00158 };
00159
00160
00161 public:
00174 MSMeanData_Harmonoise(const std::string &id,
00175 const SUMOTime dumpBegin, const SUMOTime dumpEnd,
00176 const bool useLanes, const bool withEmpty,
00177 const bool trackVehicles,
00178 const SUMOReal minSamples, const SUMOReal maxTravelTime,
00179 const std::set<std::string> vTypes) throw();
00180
00181
00183 virtual ~MSMeanData_Harmonoise() throw();
00184
00185
00186 protected:
00192 MSMeanData::MeanDataValues* createValues(MSLane * const lane, const bool doAdd) const throw(IOError);
00193
00194 private:
00196 MSMeanData_Harmonoise(const MSMeanData_Harmonoise&);
00197
00199 MSMeanData_Harmonoise& operator=(const MSMeanData_Harmonoise&);
00200
00201 };
00202
00203
00204 #endif
00205
00206
00207