SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSMeanData_Harmonoise.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Noise data collector for edges/lanes
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef MSMeanData_Harmonoise_h
22 #define MSMeanData_Harmonoise_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <vector>
35 #include <cassert>
36 #include <limits>
37 #include "MSMeanData.h"
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class OutputDevice;
44 class MSLane;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
62 public:
71  public:
73  MSLaneMeanDataValues(MSLane* const lane, const SUMOReal length, const bool doAdd,
74  const std::set<std::string>* const vTypes = 0,
75  const MSMeanData_Harmonoise* parent = 0) ;
76 
78  virtual ~MSLaneMeanDataValues() ;
79 
80 
83  void reset(bool afterWrite = false) ;
84 
87  void addTo(MSMeanData::MeanDataValues& val) const ;
88 
89 
92 
107 
108 
114  void update() ;
115 
124  void write(OutputDevice& dev, const SUMOTime period,
125  const SUMOReal numLanes, const SUMOReal defaultTravelTime,
126  const int numVehicles = -1) const;
127 
128 
129  protected:
140  void notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane,
141  SUMOReal speed) ;
142 
143  private:
146 
149 
153 
154 
157  };
158 
159 
160 public:
175  MSMeanData_Harmonoise(const std::string& id,
176  const SUMOTime dumpBegin, const SUMOTime dumpEnd,
177  const bool useLanes, const bool withEmpty,
178  const bool printDefaults, const bool withInternal,
179  const bool trackVehicles,
180  const SUMOReal minSamples, const SUMOReal maxTravelTime,
181  const std::set<std::string> vTypes) ;
182 
183 
185  virtual ~MSMeanData_Harmonoise() ;
186 
189  virtual void detectorUpdate(const SUMOTime step) ;
190 
191 
192 protected:
198  MSMeanData::MeanDataValues* createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const;
199 
200 private:
203 
206 
207 };
208 
209 
210 #endif
211 
212 /****************************************************************************/
213