SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHEMCEP Class Reference

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...
 

Detailed Description

Data Handler for a single CEP emission data set.

Definition at line 46 of file PHEMCEP.h.

Constructor & Destructor Documentation

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 
)
PHEMCEP::~PHEMCEP ( )

Member Function Documentation

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.

Parameters
[in]vThe vehicle's average velocity
[in]aThe vehicle's average acceleration
[in]slopeThe road's slope at vehicle's position [°]
in]vehicleCep vehicles CEP data
in]loading vehicle loading [kg]
Returns
The power demand for desired state [kW]

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().

void PHEMCEP::FindLowerUpperInPattern ( int lowerIndex,
int upperIndex,
std::vector< double >  pattern,
double  value 
) const
private

Finds bounding upper and lower index in pattern for value.

Parameters
[out]lowerIndexout variable for lower index
[out]upperIndexout variable for lower index
[in]patternto search
[in]valueto search

Definition at line 256 of file PHEMCEP.cpp.

Referenced by GetEmission(), and GetRotationalCoeffecient().

double PHEMCEP::GetCdValue ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
Cw value
Todo:
: Why is it named "cdValue", here?

Definition at line 169 of file PHEMCEP.h.

References _cwValue.

double PHEMCEP::GetCrossSectionalArea ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
crosssectional area of vehicle

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.

Parameters
[in]pollutantIdentifierDesired pollutant, e.g. NOx
[in]powerin [kW]
Returns
emission in [g/h]

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().

SUMOEmissionClass PHEMCEP::GetEmissionClass ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
PHEM emission class of vehicle

Definition at line 120 of file PHEMCEP.h.

References _emissionClass.

double PHEMCEP::GetMassRot ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
rotational mass of vehicle

Definition at line 199 of file PHEMCEP.h.

References _massRot.

double PHEMCEP::GetMassVehicle ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
vehicle mass

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.

Parameters
[in]vThe vehicle's average velocity
[in]aThe vehicle's average acceleration
[in]slopeThe road's slope at vehicle's position [°]
in]vehicleCep vehicles CEP data
in]loading vehicle loading [kg]
Returns
The maximum accelaration for desired state [kW]

Definition at line 170 of file PHEMCEP.cpp.

References _massRot, _massVehicle, _ratedPower, _vehicleLoading, CalcPower(), GetPMaxNorm(), GetRotationalCoeffecient(), and UNUSED_PARAMETER.

Referenced by HelpersPHEMlight::getMaxAccel().

double PHEMCEP::GetPMaxNorm ( double  speed) const
private

Calculates maximum available rated power for speed.

Parameters
[in]speeddesired speed

Definition at line 297 of file PHEMCEP.cpp.

References _pNormP0, _pNormP1, _pNormV0, _pNormV1, and Interpolate().

Referenced by GetMaxAccel().

double PHEMCEP::GetRatedPower ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
rated power of vehicle

Definition at line 207 of file PHEMCEP.h.

References _ratedPower.

double PHEMCEP::GetResistanceF0 ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
Rolling resistance f0

Definition at line 128 of file PHEMCEP.h.

References _resistanceF0.

double PHEMCEP::GetResistanceF1 ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
Rolling resistance f1

Definition at line 136 of file PHEMCEP.h.

References _resistanceF1.

double PHEMCEP::GetResistanceF2 ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
Rolling resistance f2

Definition at line 144 of file PHEMCEP.h.

References _resistanceF2.

double PHEMCEP::GetResistanceF3 ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
Rolling resistance f3

Definition at line 152 of file PHEMCEP.h.

References _resistanceF3.

double PHEMCEP::GetResistanceF4 ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
Rolling resistance f4

Definition at line 160 of file PHEMCEP.h.

References _resistanceF4.

double PHEMCEP::GetRotationalCoeffecient ( double  speed) const
private

Calculates rotational index for speed.

Parameters
[in]speeddesired speed

Definition at line 242 of file PHEMCEP.cpp.

References _speedCurveRotational, _speedPatternRotational, FindLowerUpperInPattern(), and Interpolate().

Referenced by CalcPower(), and GetMaxAccel().

std::string PHEMCEP::GetVehicleFuelType ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
fuel type of vehicle

Definition at line 214 of file PHEMCEP.h.

References _vehicleFuelType.

Referenced by HelpersPHEMlight::computeFuel().

double PHEMCEP::GetVehicleLoading ( ) const
inline

Getter function to recieve vehicle data from CEP.

Returns
vehicle loading

Definition at line 191 of file PHEMCEP.h.

References _vehicleLoading.

double PHEMCEP::Interpolate ( double  px,
double  p1,
double  p2,
double  e1,
double  e2 
) const
private

Interpolates emission linearly between two known power-emission pairs.

Parameters
[in]pxpower-value to interpolate
[in]p1first known power value
[in]p2second known power value
[in]e1emission value for p1
[in]e2emission value for p2
Returns
emission value for px

Definition at line 233 of file PHEMCEP.cpp.

Referenced by GetEmission(), GetPMaxNorm(), and GetRotationalCoeffecient().

Field Documentation

std::vector<double> PHEMCEP::_cepCurveFC
private
Todo:
describe

Definition at line 289 of file PHEMCEP.h.

Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().

StringBijection< std::vector<double> > PHEMCEP::_cepCurvePollutants
private
Todo:
describe

Definition at line 291 of file PHEMCEP.h.

Referenced by GetEmission(), and PHEMCEP().

double PHEMCEP::_crossSectionalArea
private

crosssectional area of vehicle

Definition at line 263 of file PHEMCEP.h.

Referenced by CalcPower(), GetCrossSectionalArea(), and PHEMCEP().

double PHEMCEP::_cwValue
private

Cw value.

Definition at line 261 of file PHEMCEP.h.

Referenced by CalcPower(), GetCdValue(), and PHEMCEP().

SUMOEmissionClass PHEMCEP::_emissionClass
private

PHEM emission class of vehicle.

Definition at line 249 of file PHEMCEP.h.

Referenced by GetEmissionClass(), and PHEMCEP().

double PHEMCEP::_massRot
private

rotational mass of vehicle

Definition at line 269 of file PHEMCEP.h.

Referenced by CalcPower(), GetMassRot(), GetMaxAccel(), and PHEMCEP().

double PHEMCEP::_massVehicle
private

vehicle mass

Definition at line 265 of file PHEMCEP.h.

Referenced by CalcPower(), GetMassVehicle(), GetMaxAccel(), and PHEMCEP().

double PHEMCEP::_pNormP0
private

Step functions parameter for maximum rated power.

Definition at line 275 of file PHEMCEP.h.

Referenced by GetPMaxNorm(), and PHEMCEP().

double PHEMCEP::_pNormP1
private

Step functions parameter for maximum rated power.

Definition at line 279 of file PHEMCEP.h.

Referenced by GetPMaxNorm(), and PHEMCEP().

double PHEMCEP::_pNormV0
private

Step functions parameter for maximum rated power.

Definition at line 273 of file PHEMCEP.h.

Referenced by GetPMaxNorm(), and PHEMCEP().

double PHEMCEP::_pNormV1
private

Step functions parameter for maximum rated power.

Definition at line 277 of file PHEMCEP.h.

Referenced by GetPMaxNorm(), and PHEMCEP().

std::vector<double> PHEMCEP::_powerPatternFC
private
Todo:
describe

Definition at line 285 of file PHEMCEP.h.

Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().

std::vector<double> PHEMCEP::_powerPatternPollutants
private
Todo:
describe

Definition at line 287 of file PHEMCEP.h.

Referenced by GetEmission(), PHEMCEP(), and ~PHEMCEP().

double PHEMCEP::_ratedPower
private

rated power of vehicle

Definition at line 271 of file PHEMCEP.h.

Referenced by GetMaxAccel(), GetRatedPower(), and PHEMCEP().

double PHEMCEP::_resistanceF0
private

Rolling resistance f0.

Definition at line 251 of file PHEMCEP.h.

Referenced by CalcPower(), GetResistanceF0(), and PHEMCEP().

double PHEMCEP::_resistanceF1
private

Rolling resistance f1.

Definition at line 253 of file PHEMCEP.h.

Referenced by CalcPower(), GetResistanceF1(), and PHEMCEP().

double PHEMCEP::_resistanceF2
private

Rolling resistance f2.

Definition at line 255 of file PHEMCEP.h.

Referenced by GetResistanceF2(), and PHEMCEP().

double PHEMCEP::_resistanceF3
private

Rolling resistance f3.

Definition at line 257 of file PHEMCEP.h.

Referenced by GetResistanceF3(), and PHEMCEP().

double PHEMCEP::_resistanceF4
private

Rolling resistance f4.

Definition at line 259 of file PHEMCEP.h.

Referenced by CalcPower(), GetResistanceF4(), and PHEMCEP().

int PHEMCEP::_sizeOfPatternFC
private
Todo:
describe

Definition at line 281 of file PHEMCEP.h.

Referenced by PHEMCEP().

int PHEMCEP::_sizeOfPatternPollutants
private
Todo:
describe

Definition at line 283 of file PHEMCEP.h.

Referenced by PHEMCEP().

std::vector<double> PHEMCEP::_speedCurveRotational
private
Todo:
describe

Definition at line 295 of file PHEMCEP.h.

Referenced by GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().

std::vector<double> PHEMCEP::_speedPatternRotational
private
Todo:
describe

Definition at line 293 of file PHEMCEP.h.

Referenced by GetRotationalCoeffecient(), PHEMCEP(), and ~PHEMCEP().

std::string PHEMCEP::_vehicleFuelType
private
Todo:
describe

Definition at line 297 of file PHEMCEP.h.

Referenced by GetVehicleFuelType(), and PHEMCEP().

double PHEMCEP::_vehicleLoading
private

vehicle loading

Definition at line 267 of file PHEMCEP.h.

Referenced by CalcPower(), GetMaxAccel(), GetVehicleLoading(), and PHEMCEP().


The documentation for this class was generated from the following files: