SUMO - Simulation of Urban MObility

MSMeanData_HBEFA.h

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