SUMO - Simulation of Urban MObility
MSMeanData_Emissions.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // Emission data collector for edges/lanes
19 /****************************************************************************/
20 #ifndef MSMeanData_Emissions_h
21 #define MSMeanData_Emissions_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <vector>
34 #include <set>
35 #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 // ===========================================================================
63 public:
72  public:
74  MSLaneMeanDataValues(MSLane* const lane, const double length, const bool doAdd,
75  const MSMeanData_Emissions* parent);
76 
78  virtual ~MSLaneMeanDataValues();
79 
80 
83  void reset(bool afterWrite = false);
84 
85 
90  void addTo(MSMeanData::MeanDataValues& val) const;
91 
92 
101  void write(OutputDevice& dev, const SUMOTime period,
102  const double numLanes, const double defaultTravelTime,
103  const int numVehicles = -1) const;
104 
105 
106  protected:
110  void notifyMoveInternal(const SUMOVehicle& veh, const double /* frontOnLane */, const double timeOnLane, const double /*meanSpeedFrontOnLane*/, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double /* meanLengthOnLane */);
111 
112 
113  private:
116  };
117 
118 
119 public:
134  MSMeanData_Emissions(const std::string& id,
135  const SUMOTime dumpBegin, const SUMOTime dumpEnd,
136  const bool useLanes, const bool withEmpty,
137  const bool printDefaults, const bool withInternal,
138  const bool trackVehicles,
139  const double minSamples, const double maxTravelTime,
140  const std::string& vTypes);
141 
142 
144  virtual ~MSMeanData_Emissions();
145 
146 
147 
148 protected:
154  MSMeanData::MeanDataValues* createValues(MSLane* const lane, const double length, const bool doAdd) const;
155 
156 
157 
158 private:
161 
164 
165 };
166 
167 
168 #endif
169 
170 /****************************************************************************/
171 
Data collector for edges/lanes.
Definition: MSMeanData.h:66
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:66
Data structure for mean (aggregated) edge/lane values.
Definition: MSMeanData.h:75
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, const double)
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:70
long long int SUMOTime
Definition: TraCIDefs.h:51
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
Data structure for mean (aggregated) edge/lane values.