SUMO - Simulation of Urban MObility
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.dlr.de/
11 // Copyright (C) 2001-2017 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 double length, const bool doAdd,
76  const MSMeanData_Emissions* parent);
77 
79  virtual ~MSLaneMeanDataValues();
80 
81 
84  void reset(bool afterWrite = false);
85 
86 
91  void addTo(MSMeanData::MeanDataValues& val) const;
92 
93 
102  void write(OutputDevice& dev, const SUMOTime period,
103  const double numLanes, const double defaultTravelTime,
104  const int numVehicles = -1) const;
105 
106 
107  protected:
111  void notifyMoveInternal(const SUMOVehicle& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane);
112 
113 
114  private:
117  };
118 
119 
120 public:
135  MSMeanData_Emissions(const std::string& id,
136  const SUMOTime dumpBegin, const SUMOTime dumpEnd,
137  const bool useLanes, const bool withEmpty,
138  const bool printDefaults, const bool withInternal,
139  const bool trackVehicles,
140  const double minSamples, const double maxTravelTime,
141  const std::string& vTypes);
142 
143 
145  virtual ~MSMeanData_Emissions();
146 
147 
148 
149 protected:
155  MSMeanData::MeanDataValues* createValues(MSLane* const lane, const double length, const bool doAdd) const;
156 
157 
158 
159 private:
162 
165 
166 };
167 
168 
169 #endif
170 
171 /****************************************************************************/
172 
Data collector for edges/lanes.
Definition: MSMeanData.h:67
MSMeanData_Emissions(const std::string &id, const SUMOTime dumpBegin, const SUMOTime dumpEnd, const bool useLanes, const bool withEmpty, const bool printDefaults, const bool withInternal, const bool trackVehicles, const double minSamples, const double maxTravelTime, const std::string &vTypes)
Constructor.
void reset(bool afterWrite=false)
Resets values so they may be used for the next interval.
Storage for collected values of all emission types.
PollutantsInterface::Emissions myEmissions
Collected values.
MSLaneMeanDataValues(MSLane *const lane, const double length, const bool doAdd, const MSMeanData_Emissions *parent)
Constructor.
Representation of a vehicle.
Definition: SUMOVehicle.h:67
Data structure for mean (aggregated) edge/lane values.
Definition: MSMeanData.h:76
void addTo(MSMeanData::MeanDataValues &val) const
Add the values of this to the given one and store them there.
void write(OutputDevice &dev, const SUMOTime period, const double numLanes, const double defaultTravelTime, const int numVehicles=-1) const
Writes output values into the given stream.
Emission data collector for edges/lanes.
MSMeanData::MeanDataValues * createValues(MSLane *const lane, const double length, const bool doAdd) const
Create an instance of MeanDataValues.
void notifyMoveInternal(const SUMOVehicle &veh, const double, const double timeOnLane, const double, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane)
Internal notification about the vehicle moves.
virtual ~MSMeanData_Emissions()
Destructor.
MSMoveReminder & operator=(const MSMoveReminder &)
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
long long int SUMOTime
Definition: TraCIDefs.h:52
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
Data structure for mean (aggregated) edge/lane values.