SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSMeanData_Emissions.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Emission data collector for edges/lanes
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11 // Copyright (C) 2001-2014 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_Emissions_h
22 #define MSMeanData_Emissions_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 <set>
36 #include <limits>
38 #include "MSMeanData.h"
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class OutputDevice;
45 class MSLane;
46 
47 
48 // ===========================================================================
49 // class definitions
50 // ===========================================================================
64 public:
73  public:
75  MSLaneMeanDataValues(MSLane* const lane, const SUMOReal length, const bool doAdd,
76  const std::set<std::string>* const vTypes = 0,
77  const MSMeanData_Emissions* parent = 0);
78 
80  virtual ~MSLaneMeanDataValues();
81 
82 
85  void reset(bool afterWrite = false);
86 
87 
92  void addTo(MSMeanData::MeanDataValues& val) const;
93 
94 
103  void write(OutputDevice& dev, const SUMOTime period,
104  const SUMOReal numLanes, const SUMOReal defaultTravelTime,
105  const int numVehicles = -1) const;
106 
107 
108  protected:
119  void notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane,
120  SUMOReal speed);
121 
122 
123  private:
128 
129  };
130 
131 
132 public:
147  MSMeanData_Emissions(const std::string& id,
148  const SUMOTime dumpBegin, const SUMOTime dumpEnd,
149  const bool useLanes, const bool withEmpty,
150  const bool printDefaults, const bool withInternal,
151  const bool trackVehicles,
152  const SUMOReal minSamples, const SUMOReal maxTravelTime,
153  const std::set<std::string> vTypes);
154 
155 
157  virtual ~MSMeanData_Emissions();
158 
159 
160 
161 protected:
167  MSMeanData::MeanDataValues* createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const;
168 
169 
170 
171 private:
174 
177 
178 };
179 
180 
181 #endif
182 
183 /****************************************************************************/
184