SUMO - Simulation of Urban MObility
MSDevice_Emissions.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // A device which collects vehicular emissions
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2016 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 MSDevice_Emissions_h
22 #define MSDevice_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 <set>
35 #include <vector>
36 #include <map>
37 #include <utils/common/SUMOTime.h>
40 #include <microsim/MSVehicle.h>
41 #include "MSDevice.h"
42 
43 
44 // ===========================================================================
45 // class declarations
46 // ===========================================================================
47 class MSLane;
48 
49 
50 // ===========================================================================
51 // class definitions
52 // ===========================================================================
65 class MSDevice_Emissions : public MSDevice {
66 public:
69  static void insertOptions();
70 
71 
84  static void buildVehicleDevices(SUMOVehicle& v, std::vector<MSDevice*>& into);
85 
86 
87 public:
90 
105  bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed);
107 
108 
115  void generateOutput() const;
116 
117 
120 
121 
122 private:
128  MSDevice_Emissions(SUMOVehicle& holder, const std::string& id);
129 
130 
131 private:
134 
135 
136 private:
139 
142 
143 
144 };
145 
146 
147 #endif
148 
149 /****************************************************************************/
150 
bool notifyMove(SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed)
Computes current emission values and adds them to their sums.
MSDevice_Emissions(SUMOVehicle &holder, const std::string &id)
Constructor.
MSDevice_Emissions & operator=(const MSDevice_Emissions &)
Invalidated assignment operator.
PollutantsInterface::Emissions myEmissions
Internal storages for pollutant/fuel sum in mg or ml.
Storage for collected values of all emission types.
~MSDevice_Emissions()
Destructor.
Representation of a vehicle.
Definition: SUMOVehicle.h:65
Abstract in-vehicle device.
Definition: MSDevice.h:69
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice * > &into)
Build devices for the given vehicle, if needed.
static void insertOptions()
Inserts MSDevice_Emissions-options.
void generateOutput() const
Called on writing tripinfo output.
#define SUMOReal
Definition: config.h:213
A device which collects vehicular emissions.
Representation of a lane in the micro simulation.
Definition: MSLane.h:77