SUMO - Simulation of Urban MObility
|
Data Handler for a single CEP emission data set. More...
#include <PHEMCEP.h>
Public Member Functions | |
double | CalcPower (double v, double a, double slope) const |
Returns the power of used for a vehicle at state v,a, slope and loading. More... | |
double | GetCdValue () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetCrossSectionalArea () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetEmission (const std::string &pollutantIdentifier, double power) const |
Returns a emission measure for power[kW] level. More... | |
SUMOEmissionClass | GetEmissionClass () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetMassRot () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetMassVehicle () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetMaxAccel (double v, double a, double gradient) const |
Returns the maximum accelaration for a vehicle at state v,a, slope and loading. More... | |
double | GetRatedPower () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetResistanceF0 () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetResistanceF1 () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetResistanceF2 () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetResistanceF3 () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetResistanceF4 () const |
Getter function to recieve vehicle data from CEP. More... | |
std::string | GetVehicleFuelType () const |
Getter function to recieve vehicle data from CEP. More... | |
double | GetVehicleLoading () const |
Getter function to recieve vehicle data from CEP. More... | |
PHEMCEP (bool heavyVehicel, SUMOEmissionClass emissionClass, double vehicleMass, double vehicleLoading, double vehicleMassRot, double crossArea, double cWValue, double f0, double f1, double f2, double f3, double f4, double ratedPower, double pNormV0, double pNormP0, double pNormV1, double pNormP1, std::string vehicelFuelType, const std::vector< std::vector< double > > &matrixFC, const std::vector< std::string > &headerLinePollutants, const std::vector< std::vector< double > > &matrixPollutants, const std::vector< std::vector< double > > matrixSpeedRotational) | |
~PHEMCEP () | |
Destructor. More... | |
Private Member Functions | |
void | FindLowerUpperInPattern (int &lowerIndex, int &upperIndex, std::vector< double > pattern, double value) const |
Finds bounding upper and lower index in pattern for value. More... | |
double | GetPMaxNorm (double speed) const |
Calculates maximum available rated power for speed. More... | |
double | GetRotationalCoeffecient (double speed) const |
Calculates rotational index for speed. More... | |
double | Interpolate (double px, double p1, double p2, double e1, double e2) const |
Interpolates emission linearly between two known power-emission pairs. More... | |
Private Attributes | |
std::vector< double > | _cepCurveFC |
StringBijection< std::vector < double > > | _cepCurvePollutants |
double | _crossSectionalArea |
crosssectional area of vehicle More... | |
double | _cwValue |
Cw value. More... | |
SUMOEmissionClass | _emissionClass |
PHEM emission class of vehicle. More... | |
double | _massRot |
rotational mass of vehicle More... | |
double | _massVehicle |
vehicle mass More... | |
double | _pNormP0 |
Step functions parameter for maximum rated power. More... | |
double | _pNormP1 |
Step functions parameter for maximum rated power. More... | |
double | _pNormV0 |
Step functions parameter for maximum rated power. More... | |
double | _pNormV1 |
Step functions parameter for maximum rated power. More... | |
std::vector< double > | _powerPatternFC |
std::vector< double > | _powerPatternPollutants |
double | _ratedPower |
rated power of vehicle More... | |
double | _resistanceF0 |
Rolling resistance f0. More... | |
double | _resistanceF1 |
Rolling resistance f1. More... | |
double | _resistanceF2 |
Rolling resistance f2. More... | |
double | _resistanceF3 |
Rolling resistance f3. More... | |
double | _resistanceF4 |
Rolling resistance f4. More... | |
int | _sizeOfPatternFC |
int | _sizeOfPatternPollutants |
std::vector< double > | _speedCurveRotational |
std::vector< double > | _speedPatternRotational |
std::string | _vehicleFuelType |
double | _vehicleLoading |
vehicle loading More... | |
PHEMCEP::PHEMCEP | ( | bool | heavyVehicel, |
SUMOEmissionClass | emissionClass, | ||
double | vehicleMass, | ||
double | vehicleLoading, | ||
double | vehicleMassRot, | ||
double | crossArea, | ||
double | cWValue, | ||
double | f0, | ||
double | f1, | ||
double | f2, | ||
double | f3, | ||
double | f4, | ||
double | ratedPower, | ||
double | pNormV0, | ||
double | pNormP0, | ||
double | pNormV1, | ||
double | pNormP1, | ||
std::string | vehicelFuelType, | ||
const std::vector< std::vector< double > > & | matrixFC, | ||
const std::vector< std::string > & | headerLinePollutants, | ||
const std::vector< std::vector< double > > & | matrixPollutants, | ||
const std::vector< std::vector< double > > | matrixSpeedRotational | ||
) |
Definition at line 45 of file PHEMCEP.cpp.
References _cepCurveFC, _cepCurvePollutants, _crossSectionalArea, _cwValue, _emissionClass, _massRot, _massVehicle, _pNormP0, _pNormP1, _pNormV0, _pNormV1, _powerPatternFC, _powerPatternPollutants, _ratedPower, _resistanceF0, _resistanceF1, _resistanceF2, _resistanceF3, _resistanceF4, _sizeOfPatternFC, _sizeOfPatternPollutants, _speedCurveRotational, _speedPatternRotational, _vehicleFuelType, _vehicleLoading, CalcPower(), StringBijection< T >::insert(), NORMALIZING_ACCELARATION, NORMALIZING_SPEED, and SumoEmissionClassStrings.
PHEMCEP::~PHEMCEP | ( | ) |
Destructor.
Definition at line 148 of file PHEMCEP.cpp.
References _cepCurveFC, _powerPatternFC, _powerPatternPollutants, _speedCurveRotational, and _speedPatternRotational.
double PHEMCEP::CalcPower | ( | double | v, |
double | a, | ||
double | slope | ||
) | const |
Returns the power of used for a vehicle at state v,a, slope and loading.
[in] | v | The vehicle's average velocity |
[in] | a | The vehicle's average acceleration |
[in] | slope | The road's slope at vehicle's position [°] |
in] | vehicleCep vehicles CEP data | |
in] | loading vehicle loading [kg] |
Definition at line 159 of file PHEMCEP.cpp.
References _crossSectionalArea, _cwValue, _massRot, _massVehicle, _resistanceF0, _resistanceF1, _resistanceF4, _vehicleLoading, AIR_DENSITY_CONST, GetRotationalCoeffecient(), and GRAVITY_CONST.
Referenced by HelpersPHEMlight::computeCO(), HelpersPHEMlight::computeCO2(), HelpersPHEMlight::computeFuel(), HelpersPHEMlight::computeHC(), HelpersPHEMlight::computeNOx(), HelpersPHEMlight::computePMx(), GetMaxAccel(), and PHEMCEP().
|
private |
Finds bounding upper and lower index in pattern for value.
[out] | lowerIndex | out variable for lower index |
[out] | upperIndex | out variable for lower index |
[in] | pattern | to search |
[in] | value | to search |
Definition at line 256 of file PHEMCEP.cpp.
Referenced by GetEmission(), and GetRotationalCoeffecient().
|
inline |
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 176 of file PHEMCEP.h.
References _crossSectionalArea.
double PHEMCEP::GetEmission | ( | const std::string & | pollutantIdentifier, |
double | power | ||
) | const |
Returns a emission measure for power[kW] level.
[in] | pollutantIdentifier | Desired pollutant, e.g. NOx |
[in] | power | in [kW] |
Definition at line 178 of file PHEMCEP.cpp.
References _cepCurveFC, _cepCurvePollutants, _powerPatternFC, _powerPatternPollutants, FindLowerUpperInPattern(), StringBijection< T >::get(), StringBijection< T >::hasString(), and Interpolate().
Referenced by HelpersPHEMlight::computeCO(), HelpersPHEMlight::computeCO2(), HelpersPHEMlight::computeFuel(), HelpersPHEMlight::computeHC(), HelpersPHEMlight::computeNOx(), and HelpersPHEMlight::computePMx().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 120 of file PHEMCEP.h.
References _emissionClass.
|
inline |
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 184 of file PHEMCEP.h.
References _massVehicle.
double PHEMCEP::GetMaxAccel | ( | double | v, |
double | a, | ||
double | gradient | ||
) | const |
Returns the maximum accelaration for a vehicle at state v,a, slope and loading.
[in] | v | The vehicle's average velocity |
[in] | a | The vehicle's average acceleration |
[in] | slope | The road's slope at vehicle's position [°] |
in] | vehicleCep vehicles CEP data | |
in] | loading vehicle loading [kg] |
Definition at line 170 of file PHEMCEP.cpp.
References _massRot, _massVehicle, _ratedPower, _vehicleLoading, CalcPower(), GetPMaxNorm(), GetRotationalCoeffecient(), and UNUSED_PARAMETER.
Referenced by HelpersPHEMlight::getMaxAccel().
|
private |
Calculates maximum available rated power for speed.
[in] | speed | desired speed |
Definition at line 297 of file PHEMCEP.cpp.
References _pNormP0, _pNormP1, _pNormV0, _pNormV1, and Interpolate().
Referenced by GetMaxAccel().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 207 of file PHEMCEP.h.
References _ratedPower.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 128 of file PHEMCEP.h.
References _resistanceF0.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 136 of file PHEMCEP.h.
References _resistanceF1.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 144 of file PHEMCEP.h.
References _resistanceF2.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 152 of file PHEMCEP.h.
References _resistanceF3.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 160 of file PHEMCEP.h.
References _resistanceF4.
|
private |
Calculates rotational index for speed.
[in] | speed | desired speed |
Definition at line 242 of file PHEMCEP.cpp.
References _speedCurveRotational, _speedPatternRotational, FindLowerUpperInPattern(), and Interpolate().
Referenced by CalcPower(), and GetMaxAccel().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 214 of file PHEMCEP.h.
References _vehicleFuelType.
Referenced by HelpersPHEMlight::computeFuel().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 191 of file PHEMCEP.h.
References _vehicleLoading.
|
private |
Interpolates emission linearly between two known power-emission pairs.
[in] | px | power-value to interpolate |
[in] | p1 | first known power value |
[in] | p2 | second known power value |
[in] | e1 | emission value for p1 |
[in] | e2 | emission value for p2 |
Definition at line 233 of file PHEMCEP.cpp.
Referenced by GetEmission(), GetPMaxNorm(), and GetRotationalCoeffecient().
|
private |
Definition at line 289 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
|
private |
crosssectional area of vehicle
Definition at line 263 of file PHEMCEP.h.
Referenced by CalcPower(), GetCrossSectionalArea(), and PHEMCEP().
|
private |
Cw value.
Definition at line 261 of file PHEMCEP.h.
Referenced by CalcPower(), GetCdValue(), and PHEMCEP().
|
private |
PHEM emission class of vehicle.
Definition at line 249 of file PHEMCEP.h.
Referenced by GetEmissionClass(), and PHEMCEP().
|
private |
rotational mass of vehicle
Definition at line 269 of file PHEMCEP.h.
Referenced by CalcPower(), GetMassRot(), GetMaxAccel(), and PHEMCEP().
|
private |
vehicle mass
Definition at line 265 of file PHEMCEP.h.
Referenced by CalcPower(), GetMassVehicle(), GetMaxAccel(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 275 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 279 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 273 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 277 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Definition at line 285 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 287 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
rated power of vehicle
Definition at line 271 of file PHEMCEP.h.
Referenced by GetMaxAccel(), GetRatedPower(), and PHEMCEP().
|
private |
Rolling resistance f0.
Definition at line 251 of file PHEMCEP.h.
Referenced by CalcPower(), GetResistanceF0(), and PHEMCEP().
|
private |
Rolling resistance f1.
Definition at line 253 of file PHEMCEP.h.
Referenced by CalcPower(), GetResistanceF1(), and PHEMCEP().
|
private |
Rolling resistance f2.
Definition at line 255 of file PHEMCEP.h.
Referenced by GetResistanceF2(), and PHEMCEP().
|
private |
Rolling resistance f3.
Definition at line 257 of file PHEMCEP.h.
Referenced by GetResistanceF3(), and PHEMCEP().
|
private |
Rolling resistance f4.
Definition at line 259 of file PHEMCEP.h.
Referenced by CalcPower(), GetResistanceF4(), and PHEMCEP().
|
private |
|
private |
|
private |
Definition at line 295 of file PHEMCEP.h.
Referenced by GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 293 of file PHEMCEP.h.
Referenced by GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 297 of file PHEMCEP.h.
Referenced by GetVehicleFuelType(), and PHEMCEP().
|
private |
vehicle loading
Definition at line 267 of file PHEMCEP.h.
Referenced by CalcPower(), GetMaxAccel(), GetVehicleLoading(), and PHEMCEP().