SUMO - Simulation of Urban MObility

MSMeanData_HBEFA.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Emission data collector for edges/lanes
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef MSMeanData_HBEFA_h
00020 #define MSMeanData_HBEFA_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
00025 // ===========================================================================
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031 
00032 #include <vector>
00033 #include <set>
00034 #include <cassert>
00035 #include "MSMeanData.h"
00036 #include <limits>
00037 
00038 
00039 // ===========================================================================
00040 // class declarations
00041 // ===========================================================================
00042 class OutputDevice;
00043 class MSLane;
00044 
00045 
00046 // ===========================================================================
00047 // class definitions
00048 // ===========================================================================
00060 class MSMeanData_HBEFA : public MSMeanData {
00061 public:
00069     class MSLaneMeanDataValues : public MSMeanData::MeanDataValues {
00070     public:
00072         MSLaneMeanDataValues(MSLane* const lane, const SUMOReal length, const bool doAdd,
00073                              const std::set<std::string>* const vTypes=0,
00074                              const MSMeanData_HBEFA* parent=0) throw();
00075 
00077         virtual ~MSLaneMeanDataValues() throw();
00078 
00079 
00082         void reset(bool afterWrite=false) throw();
00083 
00088         void addTo(MSMeanData::MeanDataValues& val) const throw();
00089 
00098         void write(OutputDevice& dev, const SUMOTime period,
00099                    const SUMOReal numLanes,
00100                    const int numVehicles=-1) const throw(IOError);
00101 
00102     protected:
00113         void notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane,
00114                                 SUMOReal speed) throw();
00115 
00116     private:
00120         SUMOReal CO2;
00122         SUMOReal CO;
00124         SUMOReal HC;
00126         SUMOReal NOx;
00128         SUMOReal PMx;
00130         SUMOReal fuel;
00132 
00133         const MSMeanData_HBEFA* myParent;
00134 
00135     };
00136 
00137 
00138 public:
00152     MSMeanData_HBEFA(const std::string& id,
00153                      const SUMOTime dumpBegin, const SUMOTime dumpEnd,
00154                      const bool useLanes, const bool withEmpty, const bool withInternal,
00155                      const bool trackVehicles,
00156                      const SUMOReal minSamples, const SUMOReal maxTravelTime,
00157                      const std::set<std::string> vTypes) throw();
00158 
00159 
00161     virtual ~MSMeanData_HBEFA() throw();
00162 
00163 protected:
00169     MSMeanData::MeanDataValues* createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const throw(IOError);
00170 
00171 private:
00173     MSMeanData_HBEFA(const MSMeanData_HBEFA&);
00174 
00176     MSMeanData_HBEFA& operator=(const MSMeanData_HBEFA&);
00177 
00178 };
00179 
00180 
00181 #endif
00182 
00183 /****************************************************************************/
00184 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines