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 2001-2010 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 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() throw();
00083 
00088         void addTo(MSMeanData::MeanDataValues& val) const throw();
00089 
00092 
00108         bool isStillActive(MSVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) throw();
00110 
00119         void write(OutputDevice &dev, const SUMOTime period,
00120                    const SUMOReal numLanes, const SUMOReal length,
00121                    const int numVehicles=-1) const throw(IOError);
00122 
00123     private:
00127         SUMOReal CO2;
00129         SUMOReal CO;
00131         SUMOReal HC;
00133         SUMOReal NOx;
00135         SUMOReal PMx;
00137         SUMOReal fuel;
00139 
00140         const MSMeanData_HBEFA* myParent;
00141 
00142     };
00143 
00144 
00145 public:
00158     MSMeanData_HBEFA(const std::string &id,
00159                      const SUMOTime dumpBegin, const SUMOTime dumpEnd,
00160                      const bool useLanes, const bool withEmpty,
00161                      const bool trackVehicles,
00162                      const SUMOReal minSamples, const SUMOReal maxTravelTime,
00163                      const std::set<std::string> vTypes) throw();
00164 
00165 
00167     virtual ~MSMeanData_HBEFA() throw();
00168 
00169 protected:
00175     MSMeanData::MeanDataValues* createValues(MSLane * const lane, const bool doAdd) const throw(IOError);
00176 
00177 private:
00179     MSMeanData_HBEFA(const MSMeanData_HBEFA&);
00180 
00182     MSMeanData_HBEFA& operator=(const MSMeanData_HBEFA&);
00183 
00184 };
00185 
00186 
00187 #endif
00188 
00189 /****************************************************************************/
00190 

Generated on Wed May 5 00:06:32 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6