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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // Emission data collector for edges/lanes
17 /****************************************************************************/
18 #ifndef MSMeanData_Emissions_h
19 #define MSMeanData_Emissions_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <vector>
28 #include <set>
29 #include <limits>
31 #include "MSMeanData.h"
32 
33 
34 // ===========================================================================
35 // class declarations
36 // ===========================================================================
37 class OutputDevice;
38 class MSLane;
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
57 public:
66  public:
68  MSLaneMeanDataValues(MSLane* const lane, const double length, const bool doAdd,
69  const MSMeanData_Emissions* parent);
70 
72  virtual ~MSLaneMeanDataValues();
73 
74 
77  void reset(bool afterWrite = false);
78 
79 
84  void addTo(MSMeanData::MeanDataValues& val) const;
85 
86 
95  void write(OutputDevice& dev, const SUMOTime period,
96  const double numLanes, const double defaultTravelTime,
97  const int numVehicles = -1) const;
98 
99 
100  protected:
104  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 */);
105 
106 
107  private:
110  };
111 
112 
113 public:
128  MSMeanData_Emissions(const std::string& id,
129  const SUMOTime dumpBegin, const SUMOTime dumpEnd,
130  const bool useLanes, const bool withEmpty,
131  const bool printDefaults, const bool withInternal,
132  const bool trackVehicles,
133  const double minSamples, const double maxTravelTime,
134  const std::string& vTypes);
135 
136 
138  virtual ~MSMeanData_Emissions();
139 
140 
141 
142 protected:
148  MSMeanData::MeanDataValues* createValues(MSLane* const lane, const double length, const bool doAdd) const;
149 
150 
151 
152 private:
155 
158 
159 };
160 
161 
162 #endif
163 
164 /****************************************************************************/
165 
Data collector for edges/lanes.
Definition: MSMeanData.h:60
long long int SUMOTime
Definition: SUMOTime.h:36
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:60
Data structure for mean (aggregated) edge/lane values.
Definition: MSMeanData.h:69
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:64
Representation of a lane in the micro simulation.
Definition: MSLane.h:78
Data structure for mean (aggregated) edge/lane values.