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, const std::string &emissionClassIdentifier, 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, | ||
const std::string & | emissionClassIdentifier, | ||
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 49 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, and NORMALIZING_SPEED.
PHEMCEP::~PHEMCEP | ( | ) |
Destructor.
Definition at line 152 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 163 of file PHEMCEP.cpp.
References _crossSectionalArea, _cwValue, _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 260 of file PHEMCEP.cpp.
Referenced by GetEmission(), and GetRotationalCoeffecient().
|
inline |
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 179 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 182 of file PHEMCEP.cpp.
References _cepCurveFC, _cepCurvePollutants, _powerPatternFC, _powerPatternPollutants, FindLowerUpperInPattern(), StringBijection< T >::get(), StringBijection< T >::hasString(), and Interpolate().
Referenced by HelpersPHEMlight::compute().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 123 of file PHEMCEP.h.
References _emissionClass.
|
inline |
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 187 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 174 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 301 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 210 of file PHEMCEP.h.
References _ratedPower.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 131 of file PHEMCEP.h.
References _resistanceF0.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 139 of file PHEMCEP.h.
References _resistanceF1.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 147 of file PHEMCEP.h.
References _resistanceF2.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 155 of file PHEMCEP.h.
References _resistanceF3.
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 163 of file PHEMCEP.h.
References _resistanceF4.
|
private |
Calculates rotational index for speed.
[in] | speed | desired speed |
Definition at line 246 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 217 of file PHEMCEP.h.
References _vehicleFuelType.
Referenced by HelpersPHEMlight::compute().
|
inline |
Getter function to recieve vehicle data from CEP.
Definition at line 194 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 237 of file PHEMCEP.cpp.
Referenced by GetEmission(), GetPMaxNorm(), and GetRotationalCoeffecient().
|
private |
Definition at line 292 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
|
private |
crosssectional area of vehicle
Definition at line 266 of file PHEMCEP.h.
Referenced by CalcPower(), GetCrossSectionalArea(), and PHEMCEP().
|
private |
Cw value.
Definition at line 264 of file PHEMCEP.h.
Referenced by CalcPower(), GetCdValue(), and PHEMCEP().
|
private |
PHEM emission class of vehicle.
Definition at line 252 of file PHEMCEP.h.
Referenced by GetEmissionClass(), and PHEMCEP().
|
private |
rotational mass of vehicle
Definition at line 272 of file PHEMCEP.h.
Referenced by CalcPower(), GetMassRot(), GetMaxAccel(), and PHEMCEP().
|
private |
vehicle mass
Definition at line 268 of file PHEMCEP.h.
Referenced by CalcPower(), GetMassVehicle(), GetMaxAccel(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 278 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 276 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Step functions parameter for maximum rated power.
Definition at line 280 of file PHEMCEP.h.
Referenced by GetPMaxNorm(), and PHEMCEP().
|
private |
Definition at line 288 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 290 of file PHEMCEP.h.
Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().
|
private |
rated power of vehicle
Definition at line 274 of file PHEMCEP.h.
Referenced by GetMaxAccel(), GetRatedPower(), and PHEMCEP().
|
private |
Rolling resistance f0.
Definition at line 254 of file PHEMCEP.h.
Referenced by CalcPower(), GetResistanceF0(), and PHEMCEP().
|
private |
Rolling resistance f1.
Definition at line 256 of file PHEMCEP.h.
Referenced by CalcPower(), GetResistanceF1(), and PHEMCEP().
|
private |
Rolling resistance f2.
Definition at line 258 of file PHEMCEP.h.
Referenced by GetResistanceF2(), and PHEMCEP().
|
private |
Rolling resistance f3.
Definition at line 260 of file PHEMCEP.h.
Referenced by GetResistanceF3(), and PHEMCEP().
|
private |
Rolling resistance f4.
Definition at line 262 of file PHEMCEP.h.
Referenced by CalcPower(), GetResistanceF4(), and PHEMCEP().
|
private |
|
private |
|
private |
Definition at line 298 of file PHEMCEP.h.
Referenced by GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 296 of file PHEMCEP.h.
Referenced by GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().
|
private |
Definition at line 300 of file PHEMCEP.h.
Referenced by GetVehicleFuelType(), and PHEMCEP().
|
private |
vehicle loading
Definition at line 270 of file PHEMCEP.h.
Referenced by CalcPower(), GetMaxAccel(), GetVehicleLoading(), and PHEMCEP().