Eclipse 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. | |
double | GetCdValue () const |
Getter function to recieve vehicle data from CEP. | |
double | GetCrossSectionalArea () const |
Getter function to recieve vehicle data from CEP. | |
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. | |
SUMOEmissionClass | GetEmissionClass () const |
Getter function to recieve vehicle data from CEP. | |
double | GetMassRot () const |
Getter function to recieve vehicle data from CEP. | |
double | GetMassVehicle () const |
Getter function to recieve vehicle data from CEP. | |
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. | |
double | GetRatedPower () const |
Getter function to recieve vehicle data from CEP. | |
double | GetResistanceF0 () const |
Getter function to recieve vehicle data from CEP. | |
double | GetResistanceF1 () const |
Getter function to recieve vehicle data from CEP. | |
double | GetResistanceF2 () const |
Getter function to recieve vehicle data from CEP. | |
double | GetResistanceF3 () const |
Getter function to recieve vehicle data from CEP. | |
double | GetResistanceF4 () const |
Getter function to recieve vehicle data from CEP. | |
const std::string & | GetVehicleFuelType () const |
Getter function to recieve vehicle data from CEP. | |
double | GetVehicleLoading () const |
Getter function to recieve vehicle data from CEP. | |
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. | |
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. | |
double | GetDragCoeffecient (double nNorm) const |
double | GetGearCoeffecient (double speed) const |
double | GetPMaxNorm (double speed) const |
Calculates maximum available rated power for speed. | |
double | GetRotationalCoeffecient (double speed) const |
Calculates rotational index for speed. | |
double | Interpolate (double px, double p1, double p2, double e1, double e2) const |
Interpolates emission linearly between two known power-emission pairs. | |
Private Attributes | |
double | _axleRatio |
double | _cdValue |
Cw value. | |
std::vector< double > | _cepCurveFC |
StringBijection< std::vector< double > > | _cepCurvePollutants |
double | _crossSectionalArea |
crosssectional area of vehicle | |
std::vector< double > | _dragNormTable |
double | _drivingPower |
double | _effictiveWheelDiameter |
SUMOEmissionClass | _emissionClass |
PHEM emission class of vehicle. | |
double | _engineIdlingSpeed |
double | _engineRatedSpeed |
std::vector< double > | _gearTransmissionCurve |
bool | _heavyVehicle |
double | _idlingFC |
StringBijection< double > | _idlingValuesPollutants |
double | _massRot |
rotational mass of vehicle | |
double | _massVehicle |
vehicle mass | |
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. | |
double | _pNormP1 |
Step functions parameter for maximum rated power. | |
double | _pNormV0 |
Step functions parameter for maximum rated power. | |
double | _pNormV1 |
Step functions parameter for maximum rated power. | |
std::vector< double > | _powerPatternFC |
std::vector< double > | _powerPatternPollutants |
double | _ratedPower |
rated power of vehicle | |
double | _resistanceF0 |
Rolling resistance f0. | |
double | _resistanceF1 |
Rolling resistance f1. | |
double | _resistanceF2 |
Rolling resistance f2. | |
double | _resistanceF3 |
Rolling resistance f3. | |
double | _resistanceF4 |
Rolling resistance f4. | |
int | _sizeOfPatternFC |
int | _sizeOfPatternPollutants |
std::vector< double > | _speedCurveRotational |
std::vector< double > | _speedPatternRotational |
std::string | _vehicleFuelType |
double | _vehicleLoading |
vehicle loading | |
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 37 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 185 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] |
{in] | vehicleCep vehicles CEP data | |
{in] | loading vehicle loading [kg] |
Definition at line 399 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 357 of file PHEMCEP.cpp.
Referenced by GetDecelCoast(), GetDragCoeffecient(), GetEmission(), GetGearCoeffecient(), and GetRotationalCoeffecient().
|
inline |
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 182 of file PHEMCEP.h.
References _crossSectionalArea.
double PHEMCEP::GetDecelCoast | ( | double | speed, |
double | acc, | ||
double | gradient, | ||
double | vehicleLoading | ||
) | const |
Definition at line 278 of file PHEMCEP.cpp.
References _axleRatio, _cdValue, _crossSectionalArea, _effictiveWheelDiameter, _engineIdlingSpeed, _engineRatedSpeed, _massVehicle, _nNormTable, _ratedPower, _resistanceF0, _resistanceF1, _resistanceF2, _resistanceF3, _resistanceF4, _vehicleLoading, FindLowerUpperInPattern(), GetDecelCoast(), GetDragCoeffecient(), GetGearCoeffecient(), GetRotationalCoeffecient(), GRAVITY_CONST, M_PI2, and SPEED_DCEL_MIN.
Referenced by GetDecelCoast().
|
private |
Definition at line 344 of file PHEMCEP.cpp.
References _dragNormTable, _nNormTable, FindLowerUpperInPattern(), and Interpolate().
Referenced by GetDecelCoast().
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 196 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 126 of file PHEMCEP.h.
References _emissionClass.
|
private |
Definition at line 331 of file PHEMCEP.cpp.
References _gearTransmissionCurve, _speedPatternRotational, FindLowerUpperInPattern(), and Interpolate().
Referenced by GetDecelCoast().
|
inline |
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 190 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] |
{in] | vehicleCep vehicles CEP data | |
{in] | loading vehicle loading [kg] |
Definition at line 410 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 419 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 213 of file PHEMCEP.h.
References _ratedPower.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 134 of file PHEMCEP.h.
References _resistanceF0.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 142 of file PHEMCEP.h.
References _resistanceF1.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 150 of file PHEMCEP.h.
References _resistanceF2.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 158 of file PHEMCEP.h.
References _resistanceF3.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 166 of file PHEMCEP.h.
References _resistanceF4.
|
private |
Calculates rotational index for speed.
[in] | speed | desired speed |
Definition at line 318 of file PHEMCEP.cpp.
References _speedCurveRotational, _speedPatternRotational, FindLowerUpperInPattern(), and Interpolate().
Referenced by CalcPower(), GetDecelCoast(), and GetMaxAccel().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 220 of file PHEMCEP.h.
References _vehicleFuelType.
Referenced by HelpersPHEMlight::compute().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 197 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 270 of file PHEMCEP.cpp.
Referenced by GetDragCoeffecient(), GetEmission(), GetGearCoeffecient(), GetPMaxNorm(), and GetRotationalCoeffecient().
|
private |
Definition at line 289 of file PHEMCEP.h.
Referenced by GetDecelCoast(), and PHEMCEP().
|
private |
Cw value.
Definition at line 270 of file PHEMCEP.h.
Referenced by CalcPower(), GetCdValue(), GetDecelCoast(), and PHEMCEP().
|
private |
Definition at line 309 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 316 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
crosssectional area of vehicle
Definition at line 272 of file PHEMCEP.h.
Referenced by CalcPower(), GetCrossSectionalArea(), GetDecelCoast(), and PHEMCEP().
|
private |
Definition at line 315 of file PHEMCEP.h.
Referenced by GetDragCoeffecient(), and PHEMCEP().
|
private |
|
private |
Definition at line 292 of file PHEMCEP.h.
Referenced by GetDecelCoast(), and PHEMCEP().
|
private |
PHEM emission class of vehicle.
Definition at line 257 of file PHEMCEP.h.
Referenced by GetEmissionClass(), and PHEMCEP().
|
private |
Definition at line 290 of file PHEMCEP.h.
Referenced by GetDecelCoast(), and PHEMCEP().
|
private |
Definition at line 291 of file PHEMCEP.h.
Referenced by GetDecelCoast(), and PHEMCEP().
|
private |
Definition at line 313 of file PHEMCEP.h.
Referenced by GetGearCoeffecient(), and PHEMCEP().
|
private |
|
private |
Definition at line 293 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
Definition at line 318 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
rotational mass of vehicle
Definition at line 278 of file PHEMCEP.h.
Referenced by CalcPower(), GetMassRot(), GetMaxAccel(), and PHEMCEP().
|
private |
vehicle mass
Definition at line 274 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetMassVehicle(), GetMaxAccel(), and PHEMCEP().
|
private |
Definition at line 314 of file PHEMCEP.h.
Referenced by GetDecelCoast(), GetDragCoeffecient(), and PHEMCEP().
|
private |
Definition at line 307 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
Definition at line 317 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
Definition at line 306 of file PHEMCEP.h.
Referenced by GetEmission(), and PHEMCEP().
|
private |
|
private |
|
private |
|
private |
Step functions parameter for maximum rated power.
Definition at line 284 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 288 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 282 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 286 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Definition at line 303 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 305 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
rated power of vehicle
Definition at line 280 of file PHEMCEP.h.
Referenced by GetDecelCoast(), GetMaxAccel(), GetRatedPower(), and PHEMCEP().
|
private |
Rolling resistance f0.
Definition at line 260 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetResistanceF0(), and PHEMCEP().
|
private |
Rolling resistance f1.
Definition at line 262 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetResistanceF1(), and PHEMCEP().
|
private |
Rolling resistance f2.
Definition at line 264 of file PHEMCEP.h.
Referenced by GetDecelCoast(), GetResistanceF2(), and PHEMCEP().
|
private |
Rolling resistance f3.
Definition at line 266 of file PHEMCEP.h.
Referenced by GetDecelCoast(), GetResistanceF3(), and PHEMCEP().
|
private |
Rolling resistance f4.
Definition at line 268 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetResistanceF4(), and PHEMCEP().
|
private |
|
private |
|
private |
Definition at line 312 of file PHEMCEP.h.
Referenced by GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 301 of file PHEMCEP.h.
Referenced by GetGearCoeffecient(), GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 294 of file PHEMCEP.h.
Referenced by GetVehicleFuelType(), and PHEMCEP().
|
private |
vehicle loading
Definition at line 276 of file PHEMCEP.h.
Referenced by CalcPower(), GetDecelCoast(), GetMaxAccel(), GetVehicleLoading(), and PHEMCEP().