![]() |
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, double vehicleLoading=0) 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 | GetDecelCoast (double speed, double acc, double gradient, double vehicleLoading) const |
double | GetEmission (const std::string &pollutantIdentifier, double power, double speed, bool normalized=false) 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, double vehicleLoading=0) 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... | |
const 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, const std::string &emissionClassIdentifier, double vehicleMass, double vehicleLoading, double vehicleMassRot, double crossArea, double cdValue, double f0, double f1, double f2, double f3, double f4, double ratedPower, double pNormV0, double pNormP0, double pNormV1, double pNormP1, double axleRatio, double engineIdlingSpeed, double engineRatedSpeed, double effectiveWheelDiameter, double idlingFC, const std::string &vehicleFuelType, 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, const std::vector< std::vector< double > > &normedDragTable, const std::vector< double > &idlingValuesPollutants) | |
~PHEMCEP () | |
Destructor. More... | |
Private Member Functions | |
void | FindLowerUpperInPattern (int &lowerIndex, int &upperIndex, const std::vector< double > &pattern, double value) const |
Finds bounding upper and lower index in pattern for value. More... | |
double | GetDragCoeffecient (double nNorm) const |
double | GetGearCoeffecient (double speed) const |
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 | |
double | _axleRatio |
double | _cdValue |
Cw value. More... | |
std::vector< double > | _cepCurveFC |
StringBijection< std::vector< double > > | _cepCurvePollutants |
double | _crossSectionalArea |
crosssectional area of vehicle More... | |
std::vector< double > | _dragNormTable |
double | _drivingPower |
double | _effictiveWheelDiameter |
SUMOEmissionClass | _emissionClass |
PHEM emission class of vehicle. More... | |
double | _engineIdlingSpeed |
double | _engineRatedSpeed |
std::vector< double > | _gearTransmissionCurve |
bool | _heavyVehicle |
double | _idlingFC |
StringBijection< double > | _idlingValuesPollutants |
double | _massRot |
rotational mass of vehicle More... | |
double | _massVehicle |
vehicle mass More... | |
std::vector< double > | _nNormTable |
std::vector< double > | _normailzedPowerPatternPollutants |
StringBijection< std::vector< double > > | _normalizedCepCurvePollutants |
std::vector< double > | _normalizedPowerPatternFC |
double | _normalizingPower |
NormalizingType | _normalizingType |
std::vector< double > | _normedCepCurveFC |
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, | ||
const std::string & | emissionClassIdentifier, | ||
double | vehicleMass, | ||
double | vehicleLoading, | ||
double | vehicleMassRot, | ||
double | crossArea, | ||
double | cdValue, | ||
double | f0, | ||
double | f1, | ||
double | f2, | ||
double | f3, | ||
double | f4, | ||
double | ratedPower, | ||
double | pNormV0, | ||
double | pNormP0, | ||
double | pNormV1, | ||
double | pNormP1, | ||
double | axleRatio, | ||
double | engineIdlingSpeed, | ||
double | engineRatedSpeed, | ||
double | effectiveWheelDiameter, | ||
double | idlingFC, | ||
const std::string & | vehicleFuelType, | ||
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, | ||
const std::vector< std::vector< double > > & | normedDragTable, | ||
const std::vector< double > & | idlingValuesPollutants | ||
) |
Definition at line 38 of file PHEMCEP.cpp.
References _axleRatio, _cdValue, _cepCurveFC, _cepCurvePollutants, _crossSectionalArea, _dragNormTable, _drivingPower, _effictiveWheelDiameter, _emissionClass, _engineIdlingSpeed, _engineRatedSpeed, _gearTransmissionCurve, _heavyVehicle, _idlingFC, _idlingValuesPollutants, _massRot, _massVehicle, _nNormTable, _normailzedPowerPatternPollutants, _normalizedCepCurvePollutants, _normalizedPowerPatternFC, _normalizingPower, _normalizingType, _normedCepCurveFC, _pNormP0, _pNormP1, _pNormV0, _pNormV1, _powerPatternFC, _powerPatternPollutants, _ratedPower, _resistanceF0, _resistanceF1, _resistanceF2, _resistanceF3, _resistanceF4, _sizeOfPatternFC, _sizeOfPatternPollutants, _speedCurveRotational, _speedPatternRotational, _vehicleFuelType, _vehicleLoading, CalcPower(), DrivingPower, StringBijection< T >::insert(), NORMALIZING_ACCELARATION, NORMALIZING_SPEED, and RatedPower.
PHEMCEP::~PHEMCEP | ( | ) |
Destructor.
Definition at line 186 of file PHEMCEP.cpp.
References _cepCurveFC, _powerPatternFC, _powerPatternPollutants, _speedCurveRotational, and _speedPatternRotational.
double PHEMCEP::CalcPower | ( | double | v, |
double | a, | ||
double | slope, | ||
double | vehicleLoading = 0 |
||
) | 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 [deg] |
Definition at line 400 of file PHEMCEP.cpp.
References _cdValue, _crossSectionalArea, _massRot, _massVehicle, _resistanceF0, _resistanceF1, _resistanceF4, _vehicleLoading, AIR_DENSITY_CONST, GetRotationalCoeffecient(), and GRAVITY_CONST.
Referenced by HelpersPHEMlight::compute(), 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 358 of file PHEMCEP.cpp.
Referenced by GetDecelCoast(), GetDragCoeffecient(), GetEmission(), GetGearCoeffecient(), GetRotationalCoeffecient(), and GetVehicleFuelType().
|
inline |
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 185 of file PHEMCEP.h.
References _crossSectionalArea.
double PHEMCEP::GetDecelCoast | ( | double | speed, |
double | acc, | ||
double | gradient, | ||
double | vehicleLoading | ||
) | const |
Definition at line 279 of file PHEMCEP.cpp.
References _axleRatio, _cdValue, _crossSectionalArea, _effictiveWheelDiameter, _engineIdlingSpeed, _engineRatedSpeed, _massVehicle, _nNormTable, _ratedPower, _resistanceF0, _resistanceF1, _resistanceF2, _resistanceF3, _resistanceF4, _vehicleLoading, FindLowerUpperInPattern(), GetDragCoeffecient(), GetGearCoeffecient(), GetRotationalCoeffecient(), GRAVITY_CONST, M_PI2, and SPEED_DCEL_MIN.
|
private |
Definition at line 345 of file PHEMCEP.cpp.
References _dragNormTable, _nNormTable, FindLowerUpperInPattern(), and Interpolate().
Referenced by GetDecelCoast(), and GetVehicleFuelType().
double PHEMCEP::GetEmission | ( | const std::string & | pollutantIdentifier, |
double | power, | ||
double | speed, | ||
bool | normalized = false |
||
) | const |
Returns a emission measure for power[kW] level.
[in] | pollutantIdentifier | Desired pollutant, e.g. NOx |
[in] | power | in [kW] |
Definition at line 197 of file PHEMCEP.cpp.
References _cepCurveFC, _cepCurvePollutants, _idlingFC, _idlingValuesPollutants, _normailzedPowerPatternPollutants, _normalizedCepCurvePollutants, _normalizedPowerPatternFC, _normedCepCurveFC, _powerPatternFC, _powerPatternPollutants, FindLowerUpperInPattern(), StringBijection< T >::get(), StringBijection< T >::hasString(), Interpolate(), and ZERO_SPEED_ACCURACY.
Referenced by HelpersPHEMlight::getEmission().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 129 of file PHEMCEP.h.
References _emissionClass.
|
private |
Definition at line 332 of file PHEMCEP.cpp.
References _gearTransmissionCurve, _speedPatternRotational, FindLowerUpperInPattern(), and Interpolate().
Referenced by GetDecelCoast(), and GetVehicleFuelType().
|
inline |
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 193 of file PHEMCEP.h.
References _massVehicle.
double PHEMCEP::GetMaxAccel | ( | double | v, |
double | a, | ||
double | gradient, | ||
double | vehicleLoading = 0 |
||
) | 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 [deg] |
Definition at line 411 of file PHEMCEP.cpp.
References _massRot, _massVehicle, _ratedPower, _vehicleLoading, CalcPower(), GetPMaxNorm(), GetRotationalCoeffecient(), and UNUSED_PARAMETER.
|
private |
Calculates maximum available rated power for speed.
[in] | speed | desired speed |
Definition at line 420 of file PHEMCEP.cpp.
References _pNormP0, _pNormP1, _pNormV0, _pNormV1, and Interpolate().
Referenced by GetMaxAccel(), and GetVehicleFuelType().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 216 of file PHEMCEP.h.
References _ratedPower.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 137 of file PHEMCEP.h.
References _resistanceF0.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 145 of file PHEMCEP.h.
References _resistanceF1.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 153 of file PHEMCEP.h.
References _resistanceF2.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 161 of file PHEMCEP.h.
References _resistanceF3.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 169 of file PHEMCEP.h.
References _resistanceF4.
|
private |
Calculates rotational index for speed.
[in] | speed | desired speed |
Definition at line 319 of file PHEMCEP.cpp.
References _speedCurveRotational, _speedPatternRotational, FindLowerUpperInPattern(), and Interpolate().
Referenced by CalcPower(), GetDecelCoast(), GetMaxAccel(), and GetVehicleFuelType().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 223 of file PHEMCEP.h.
References _vehicleFuelType, FindLowerUpperInPattern(), GetDragCoeffecient(), GetGearCoeffecient(), GetPMaxNorm(), GetRotationalCoeffecient(), and Interpolate().
Referenced by HelpersPHEMlight::compute().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 200 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 271 of file PHEMCEP.cpp.
Referenced by GetDragCoeffecient(), GetEmission(), GetGearCoeffecient(), GetPMaxNorm(), GetRotationalCoeffecient(), and GetVehicleFuelType().
|
private |
Definition at line 292 of file PHEMCEP.h.
Referenced by GetDecelCoast(), and PHEMCEP().
|
private |
Cw value.
Definition at line 273 of file PHEMCEP.h.
Referenced by CalcPower(), GetCdValue(), GetDecelCoast(), and PHEMCEP().
|
private |
Definition at line 312 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 319 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
crosssectional area of vehicle
Definition at line 275 of file PHEMCEP.h.
Referenced by CalcPower(), GetCrossSectionalArea(), GetDecelCoast(), and PHEMCEP().
|
private |
Definition at line 318 of file PHEMCEP.h.
Referenced by GetDragCoeffecient(), and PHEMCEP().
|
private |
|
private |
Definition at line 295 of file PHEMCEP.h.
Referenced by GetDecelCoast(), and PHEMCEP().
|
private |
PHEM emission class of vehicle.
Definition at line 260 of file PHEMCEP.h.
Referenced by GetEmissionClass(), and PHEMCEP().
|
private |
Definition at line 293 of file PHEMCEP.h.
Referenced by GetDecelCoast(), and PHEMCEP().
|
private |
Definition at line 294 of file PHEMCEP.h.
Referenced by GetDecelCoast(), and PHEMCEP().
|
private |
Definition at line 316 of file PHEMCEP.h.
Referenced by GetGearCoeffecient(), and PHEMCEP().
|
private |
|
private |
Definition at line 296 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
Definition at line 321 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
rotational mass of vehicle
Definition at line 281 of file PHEMCEP.h.
Referenced by CalcPower(), GetMassRot(), GetMaxAccel(), and PHEMCEP().
|
private |
vehicle mass
Definition at line 277 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetMassVehicle(), GetMaxAccel(), and PHEMCEP().
|
private |
Definition at line 317 of file PHEMCEP.h.
Referenced by GetDecelCoast(), GetDragCoeffecient(), and PHEMCEP().
|
private |
Definition at line 310 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
Definition at line 320 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
Definition at line 309 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
|
private |
|
private |
|
private |
Step functions parameter for maximum rated power.
Definition at line 287 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 291 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 285 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 289 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Definition at line 306 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 308 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
rated power of vehicle
Definition at line 283 of file PHEMCEP.h.
Referenced by GetDecelCoast(), GetMaxAccel(), GetRatedPower(), and PHEMCEP().
|
private |
Rolling resistance f0.
Definition at line 263 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetResistanceF0(), and PHEMCEP().
|
private |
Rolling resistance f1.
Definition at line 265 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetResistanceF1(), and PHEMCEP().
|
private |
Rolling resistance f2.
Definition at line 267 of file PHEMCEP.h.
Referenced by GetDecelCoast(), GetResistanceF2(), and PHEMCEP().
|
private |
Rolling resistance f3.
Definition at line 269 of file PHEMCEP.h.
Referenced by GetDecelCoast(), GetResistanceF3(), and PHEMCEP().
|
private |
Rolling resistance f4.
Definition at line 271 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetResistanceF4(), and PHEMCEP().
|
private |
|
private |
|
private |
Definition at line 315 of file PHEMCEP.h.
Referenced by GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 304 of file PHEMCEP.h.
Referenced by GetGearCoeffecient(), GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 297 of file PHEMCEP.h.
Referenced by GetVehicleFuelType(), and PHEMCEP().
|
private |
vehicle loading
Definition at line 279 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetMaxAccel(), GetVehicleLoading(), and PHEMCEP().