#include <HelpersHBEFA.h>
The parameter are stored per vehicle class; 6*6 parameter are used, sorted by the pollutant (CO2, CO, HC, fuel, NOx, PMx), and the function part (c0, cav1, cav2, c1, c2, c3).
Definition at line 59 of file HelpersHBEFA.h.
Static Public Member Functions | |
| static SUMOReal | computeCO (SUMOEmissionClass c, double v, double a) throw () |
| Returns the amount of emitted CO given the vehicle type and state (in g/s). | |
| static SUMOReal | computeCO2 (SUMOEmissionClass c, double v, double a) throw () |
| Returns the amount of emitted CO2 given the vehicle type and state (in g/s). | |
| static SUMOReal | computeFuel (SUMOEmissionClass c, double v, double a) throw () |
| Returns the amount of consumed fuel given the vehicle type and state (in l/s). | |
| static SUMOReal | computeHC (SUMOEmissionClass c, double v, double a) throw () |
| Returns the amount of emitted HC given the vehicle type and state (in g/s). | |
| static SUMOReal | computeNOx (SUMOEmissionClass c, double v, double a) throw () |
| Returns the amount of emitted NOx given the vehicle type and state (in g/s). | |
| static SUMOReal | computePMx (SUMOEmissionClass c, double v, double a) throw () |
| Returns the amount of emitted PMx given the vehicle type and state (in g/s). | |
Static Private Member Functions | |
| static double | computeUsing (double *f, double v, double a) throw () |
| Computes the emitted pollutant amount using the given values. | |
| static double * | getParameterForClass (SUMOEmissionClass c) throw () |
| Returns the parameter for the given vehicle emission class. | |
Static Private Attributes | |
| static double | myFunctionParameter [42][36] |
| The function parameter. | |
| SUMOReal HelpersHBEFA::computeCO | ( | SUMOEmissionClass | c, | |
| double | v, | |||
| double | a | |||
| ) | throw () [static] |
Returns the amount of emitted CO given the vehicle type and state (in g/s).
| [in] | c | The vehicle emission class |
| [in] | v | The vehicle's current velocity |
| [in] | a | The vehicle's current acceleration |
Definition at line 166 of file HelpersHBEFA.cpp.
References CO_OFFSET, SUMOReal, SVE_P_LDV_7_7, SVE_UNKNOWN, and SVE_ZERO_EMISSIONS.
Referenced by ROEdge::buildTimeLines(), ROEdge::getCOEffort(), MSVehicle::getHBEFA_COEmissions(), traci::TraCIServer::handleVehicleDomain(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), TraCIServerAPI_Vehicle::processGet(), and MSDevice_HBEFA::wrappedComputeCommandExecute().
00166 { 00167 switch (c) { 00168 case SVE_ZERO_EMISSIONS: 00169 return 0; 00170 case SVE_UNKNOWN: 00171 c = SVE_P_LDV_7_7; 00172 break; 00173 default: 00174 break; 00175 } 00176 return (SUMOReal) computeUsing(getParameterForClass(c)+CO_OFFSET,v,a); 00177 }
| SUMOReal HelpersHBEFA::computeCO2 | ( | SUMOEmissionClass | c, | |
| double | v, | |||
| double | a | |||
| ) | throw () [static] |
Returns the amount of emitted CO2 given the vehicle type and state (in g/s).
| [in] | c | The vehicle emission class |
| [in] | v | The vehicle's current velocity |
| [in] | a | The vehicle's current acceleration |
Definition at line 181 of file HelpersHBEFA.cpp.
References CO2_OFFSET, SUMOReal, SVE_P_LDV_7_7, SVE_UNKNOWN, and SVE_ZERO_EMISSIONS.
Referenced by ROEdge::buildTimeLines(), ROEdge::getCO2Effort(), MSVehicle::getHBEFA_CO2Emissions(), traci::TraCIServer::handleVehicleDomain(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), TraCIServerAPI_Vehicle::processGet(), and MSDevice_HBEFA::wrappedComputeCommandExecute().
00181 { 00182 switch (c) { 00183 case SVE_ZERO_EMISSIONS: 00184 return 0; 00185 case SVE_UNKNOWN: 00186 c = SVE_P_LDV_7_7; 00187 break; 00188 default: 00189 break; 00190 } 00191 return (SUMOReal) computeUsing(getParameterForClass(c)+CO2_OFFSET,v,a); 00192 }
| SUMOReal HelpersHBEFA::computeFuel | ( | SUMOEmissionClass | c, | |
| double | v, | |||
| double | a | |||
| ) | throw () [static] |
Returns the amount of consumed fuel given the vehicle type and state (in l/s).
| [in] | c | The vehicle emission class |
| [in] | v | The vehicle's current velocity |
| [in] | a | The vehicle's current acceleration |
Definition at line 241 of file HelpersHBEFA.cpp.
References FUEL_OFFSET, SUMOReal, SVE_P_LDV_7_7, SVE_UNKNOWN, and SVE_ZERO_EMISSIONS.
Referenced by ROEdge::buildTimeLines(), ROEdge::getFuelEffort(), MSVehicle::getHBEFA_FuelConsumption(), traci::TraCIServer::handleVehicleDomain(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), TraCIServerAPI_Vehicle::processGet(), and MSDevice_HBEFA::wrappedComputeCommandExecute().
00241 { 00242 switch (c) { 00243 case SVE_ZERO_EMISSIONS: 00244 return 0; 00245 case SVE_UNKNOWN: 00246 c = SVE_P_LDV_7_7; 00247 break; 00248 default: 00249 break; 00250 } 00251 return (SUMOReal)(computeUsing(getParameterForClass(c)+FUEL_OFFSET,v,a) / 790.); 00252 }
| SUMOReal HelpersHBEFA::computeHC | ( | SUMOEmissionClass | c, | |
| double | v, | |||
| double | a | |||
| ) | throw () [static] |
Returns the amount of emitted HC given the vehicle type and state (in g/s).
| [in] | c | The vehicle emission class |
| [in] | v | The vehicle's current velocity |
| [in] | a | The vehicle's current acceleration |
Definition at line 196 of file HelpersHBEFA.cpp.
References HC_OFFSET, SUMOReal, SVE_P_LDV_7_7, SVE_UNKNOWN, and SVE_ZERO_EMISSIONS.
Referenced by ROEdge::buildTimeLines(), MSVehicle::getHBEFA_HCEmissions(), ROEdge::getHCEffort(), traci::TraCIServer::handleVehicleDomain(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), TraCIServerAPI_Vehicle::processGet(), and MSDevice_HBEFA::wrappedComputeCommandExecute().
00196 { 00197 switch (c) { 00198 case SVE_ZERO_EMISSIONS: 00199 return 0; 00200 case SVE_UNKNOWN: 00201 c = SVE_P_LDV_7_7; 00202 break; 00203 default: 00204 break; 00205 } 00206 return (SUMOReal) computeUsing(getParameterForClass(c)+HC_OFFSET,v,a); 00207 }
| SUMOReal HelpersHBEFA::computeNOx | ( | SUMOEmissionClass | c, | |
| double | v, | |||
| double | a | |||
| ) | throw () [static] |
Returns the amount of emitted NOx given the vehicle type and state (in g/s).
| [in] | c | The vehicle emission class |
| [in] | v | The vehicle's current velocity |
| [in] | a | The vehicle's current acceleration |
Definition at line 211 of file HelpersHBEFA.cpp.
References NOx_OFFSET, SUMOReal, SVE_P_LDV_7_7, SVE_UNKNOWN, and SVE_ZERO_EMISSIONS.
Referenced by ROEdge::buildTimeLines(), MSVehicle::getHBEFA_NOxEmissions(), ROEdge::getNOxEffort(), traci::TraCIServer::handleVehicleDomain(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), TraCIServerAPI_Vehicle::processGet(), and MSDevice_HBEFA::wrappedComputeCommandExecute().
00211 { 00212 switch (c) { 00213 case SVE_ZERO_EMISSIONS: 00214 return 0; 00215 case SVE_UNKNOWN: 00216 c = SVE_P_LDV_7_7; 00217 break; 00218 default: 00219 break; 00220 } 00221 return (SUMOReal) computeUsing(getParameterForClass(c)+NOx_OFFSET,v,a); 00222 }
| SUMOReal HelpersHBEFA::computePMx | ( | SUMOEmissionClass | c, | |
| double | v, | |||
| double | a | |||
| ) | throw () [static] |
Returns the amount of emitted PMx given the vehicle type and state (in g/s).
| [in] | c | The vehicle emission class |
| [in] | v | The vehicle's current velocity |
| [in] | a | The vehicle's current acceleration |
Definition at line 226 of file HelpersHBEFA.cpp.
References PMx_OFFSET, SUMOReal, SVE_P_LDV_7_7, SVE_UNKNOWN, and SVE_ZERO_EMISSIONS.
Referenced by ROEdge::buildTimeLines(), MSVehicle::getHBEFA_PMxEmissions(), ROEdge::getPMxEffort(), traci::TraCIServer::handleVehicleDomain(), MSMeanData_HBEFA::MSLaneMeanDataValues::isStillActive(), TraCIServerAPI_Vehicle::processGet(), and MSDevice_HBEFA::wrappedComputeCommandExecute().
00226 { 00227 switch (c) { 00228 case SVE_ZERO_EMISSIONS: 00229 return 0; 00230 case SVE_UNKNOWN: 00231 c = SVE_P_LDV_7_7; 00232 break; 00233 default: 00234 break; 00235 } 00236 return (SUMOReal) computeUsing(getParameterForClass(c)+PMx_OFFSET,v,a); 00237 }
| static double HelpersHBEFA::computeUsing | ( | double * | f, | |
| double | v, | |||
| double | a | |||
| ) | throw () [inline, static, private] |
Computes the emitted pollutant amount using the given values.
As the functions are defining emissions/hour, the function's result is normed by 3600 (seconds in an hour) yielding in <measure>/s.
| [in] | f | Pointer to the function parameters to use |
| [in] | v | The vehicle's current velocity |
| [in] | a | The vehicle's current acceleration |
Definition at line 134 of file HelpersHBEFA.h.
00134 { 00135 if (a<0) { 00136 return 0.; 00137 } 00138 v = v * 3.6; 00139 double alpha = asin(a/9.81)*180./PI; 00140 return MAX2(((f[0] + f[1]*alpha*v + f[2]*alpha*alpha*v + f[3]*v + f[4]*v*v + f[5]*v*v*v) / 3600.), 0.); 00141 }
| static double* HelpersHBEFA::getParameterForClass | ( | SUMOEmissionClass | c | ) | throw () [inline, static, private] |
Returns the parameter for the given vehicle emission class.
| [in] | c | The vehicle emission class |
Definition at line 120 of file HelpersHBEFA.h.
References myFunctionParameter.
00120 { 00121 return myFunctionParameter[c]; 00122 }
double HelpersHBEFA::myFunctionParameter [static, private] |
The function parameter.
Definition at line 146 of file HelpersHBEFA.h.
Referenced by getParameterForClass().
1.5.6