SUMO - Simulation of Urban MObility
|
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, const SUMOReal defaultTravelTime, 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: 00155 MSMeanData_HBEFA(const std::string& id, 00156 const SUMOTime dumpBegin, const SUMOTime dumpEnd, 00157 const bool useLanes, const bool withEmpty, 00158 const bool printDefaults, const bool withInternal, 00159 const bool trackVehicles, 00160 const SUMOReal minSamples, const SUMOReal maxTravelTime, 00161 const std::set<std::string> vTypes) ; 00162 00163 00165 virtual ~MSMeanData_HBEFA() ; 00166 00167 protected: 00173 MSMeanData::MeanDataValues* createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const; 00174 00175 private: 00177 MSMeanData_HBEFA(const MSMeanData_HBEFA&); 00178 00180 MSMeanData_HBEFA& operator=(const MSMeanData_HBEFA&); 00181 00182 }; 00183 00184 00185 #endif 00186 00187 /****************************************************************************/ 00188