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 <limits>
36 #include "MSMeanData.h"
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 class OutputDevice;
43 class MSLane;
44 
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
61 public:
70  public:
72  MSLaneMeanDataValues(MSLane* const lane, const SUMOReal length, const bool doAdd,
73  const std::set<std::string>* const vTypes = 0,
74  const MSMeanData_Harmonoise* parent = 0);
75 
77  virtual ~MSLaneMeanDataValues();
78 
79 
82  void reset(bool afterWrite = false);
83 
86  void addTo(MSMeanData::MeanDataValues& val) const;
87 
88 
91 
106 
107 
113  void update();
114 
123  void write(OutputDevice& dev, const SUMOTime period,
124  const SUMOReal numLanes, const SUMOReal defaultTravelTime,
125  const int numVehicles = -1) const;
126 
127 
128  protected:
139  void notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane,
140  SUMOReal speed);
141 
142  private:
145 
148 
152 
153 
156  };
157 
158 
159 public:
174  MSMeanData_Harmonoise(const std::string& id,
175  const SUMOTime dumpBegin, const SUMOTime dumpEnd,
176  const bool useLanes, const bool withEmpty,
177  const bool printDefaults, const bool withInternal,
178  const bool trackVehicles,
179  const SUMOReal minSamples, const SUMOReal maxTravelTime,
180  const std::set<std::string> vTypes);
181 
182 
184  virtual ~MSMeanData_Harmonoise();
185 
188  virtual void detectorUpdate(const SUMOTime step);
189 
190 
191 protected:
197  MSMeanData::MeanDataValues* createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const;
198 
199 private:
202 
205 
206 };
207 
208 
209 #endif
210 
211 /****************************************************************************/
212