SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.sourceforge.net/
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 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 "MSDevice.h"
38 #include <utils/common/SUMOTime.h>
39 #include <microsim/MSVehicle.h>
41 
42 
43 // ===========================================================================
44 // class declarations
45 // ===========================================================================
46 class MSLane;
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
64 class MSDevice_Emissions : public MSDevice {
65 public:
68  static void insertOptions();
69 
70 
83  static void buildVehicleDevices(SUMOVehicle& v, std::vector<MSDevice*>& into);
84 
85 
86 public:
89 
104  bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed);
106 
107 
114  void generateOutput() const;
115 
116 
119 
120 
121 private:
127  MSDevice_Emissions(SUMOVehicle& holder, const std::string& id);
128 
129 
130 private:
133 
135 
137 
138 
139 private:
142 
145 
146 
147 };
148 
149 
150 #endif
151 
152 /****************************************************************************/
153 
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.
~MSDevice_Emissions()
Destructor.
Representation of a vehicle.
Definition: SUMOVehicle.h:63
Abstract in-vehicle device.
Definition: MSDevice.h:68
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:215
A device which collects vehicular emissions.
Representation of a lane in the micro simulation.
Definition: MSLane.h:77