Eclipse SUMO - Simulation of Urban MObility
CEP.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2016-2019 German Aerospace Center (DLR) and others.
4 // PHEMlight module
5 // Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 // SPDX-License-Identifier: EPL-2.0
11 /****************************************************************************/
18 //
19 /****************************************************************************/
20 
21 
22 #include "CEP.h"
23 #include "Constants.h"
24 #include "Helpers.h"
25 
26 
27 namespace PHEMlightdll {
28 
29  CEP::CEP(bool heavyVehicle, double vehicleMass, double vehicleLoading, double vehicleMassRot, double crossArea, double cWValue, double f0, double f1, double f2, double f3, double f4, double axleRatio, std::vector<double>& transmissionGearRatios, double auxPower, double ratedPower, double engineIdlingSpeed, double engineRatedSpeed, double effictiveWheelDiameter, double pNormV0, double pNormP0, double pNormV1, double pNormP1, const std::string& vehicelFuelType, std::vector<std::vector<double> >& matrixFC, std::vector<std::string>& headerLinePollutants, std::vector<std::vector<double> >& matrixPollutants, std::vector<std::vector<double> >& matrixSpeedRotational, std::vector<std::vector<double> >& normedDragTable, double idlingFC, std::vector<double>& idlingPollutants) {
30  transmissionGearRatios.size(); // just to make the compiler happy about the unused parameter
32  _resistanceF0 = f0;
33  _resistanceF1 = f1;
34  _resistanceF2 = f2;
35  _resistanceF3 = f3;
36  _resistanceF4 = f4;
37  _cWValue = cWValue;
38  _crossSectionalArea = crossArea;
39  _massVehicle = vehicleMass;
40  _vehicleLoading = vehicleLoading;
41  _vehicleMassRot = vehicleMassRot;
42  _ratedPower = ratedPower;
43  _engineIdlingSpeed = engineIdlingSpeed;
44  _engineRatedSpeed = engineRatedSpeed;
45  _effectiveWheelDiameter = effictiveWheelDiameter;
46  _heavyVehicle = heavyVehicle;
47  _fuelType = vehicelFuelType;
48  _axleRatio = axleRatio;
49  _auxPower = auxPower;
50 
51  _pNormV0 = pNormV0 / 3.6;
52  _pNormP0 = pNormP0;
53  _pNormV1 = pNormV1 / 3.6;
54  _pNormP1 = pNormP1;
55 
56  std::vector<std::string> pollutantIdentifier;
57  std::vector<std::vector<double> > pollutantMeasures;
58  std::vector<std::vector<double> > normalizedPollutantMeasures;
59 
60  // init pollutant identifiers
61  for (int i = 0; i < (int)headerLinePollutants.size(); i++) {
62  pollutantIdentifier.push_back(headerLinePollutants[i]);
63  }
64 
65  // initialize measures
66  for (int i = 0; i < (int)headerLinePollutants.size(); i++) {
67  pollutantMeasures.push_back(std::vector<double>());
68  normalizedPollutantMeasures.push_back(std::vector<double>());
69  }
70 
71  // looping through matrix and assigning values for speed rotational table
72  _speedCurveRotational = std::vector<double>();
73  _speedPatternRotational = std::vector<double>();
74  _gearTransmissionCurve = std::vector<double>();
75  for (int i = 0; i < (int)matrixSpeedRotational.size(); i++) {
76  if (matrixSpeedRotational[i].size() != 3) {
77  return;
78  }
79 
80  _speedPatternRotational.push_back(matrixSpeedRotational[i][0] / 3.6);
81  _gearTransmissionCurve.push_back(matrixSpeedRotational[i][1]);
82  _speedCurveRotational.push_back(matrixSpeedRotational[i][2]);
83  }
84 
85  // looping through matrix and assigning values for drag table
86  _nNormTable = std::vector<double>();
87  _dragNormTable = std::vector<double>();
88  for (int i = 0; i < (int)normedDragTable.size(); i++) {
89  if (normedDragTable[i].size() != 2) {
90  return;
91  }
92 
93  _nNormTable.push_back(normedDragTable[i][0]);
94  _dragNormTable.push_back(normedDragTable[i][1]);
95  }
96 
97  // looping through matrix and assigning values for Fuel consumption
98  _cepCurveFC = std::vector<double>();
99  _normedCepCurveFC = std::vector<double>();
100  _powerPatternFC = std::vector<double>();
101  _normalizedPowerPatternFC = std::vector<double>();
102  for (int i = 0; i < (int)matrixFC.size(); i++) {
103  if (matrixFC[i].size() != 2) {
104  return;
105  }
106 
107  _powerPatternFC.push_back(matrixFC[i][0] * _ratedPower);
108  _normalizedPowerPatternFC.push_back(matrixFC[i][0]);
109  _cepCurveFC.push_back(matrixFC[i][1] * _ratedPower);
110  _normedCepCurveFC.push_back(matrixFC[i][1]);
111 
112  }
113 
114  _powerPatternPollutants = std::vector<double>();
115 
116  double pollutantMultiplyer = 1;
117 
119 
120  // looping through matrix and assigning values for pollutants
121  if (heavyVehicle) {
124  pollutantMultiplyer = _ratedPower;
125  }
126  else {
129  }
130 
131  _normailzedPowerPatternPollutants = std::vector<double>();
132 
133  _cepNormalizedCurvePollutants = std::map<std::string, std::vector<double> >();
134 
135  int headerCount = (int)headerLinePollutants.size();
136  for (int i = 0; i < (int)matrixPollutants.size(); i++) {
137  for (int j = 0; j < (int)matrixPollutants[i].size(); j++) {
138  if ((int)matrixPollutants[i].size() != headerCount + 1) {
139  return;
140  }
141 
142  if (j == 0) {
143  _normailzedPowerPatternPollutants.push_back(matrixPollutants[i][j]);
144  _powerPatternPollutants.push_back(matrixPollutants[i][j] * getNormalizingPower());
145  }
146  else {
147  pollutantMeasures[j - 1].push_back(matrixPollutants[i][j] * pollutantMultiplyer);
148  normalizedPollutantMeasures[j - 1].push_back(matrixPollutants[i][j]);
149  }
150  }
151  }
152 
153  _cepCurvePollutants = std::map<std::string, std::vector<double> >();
154  _idlingValuesPollutants = std::map<std::string, double>();
155 
156  for (int i = 0; i < (int)headerLinePollutants.size(); i++) {
157  _cepCurvePollutants.insert(std::make_pair(pollutantIdentifier[i], pollutantMeasures[i]));
158  _cepNormalizedCurvePollutants.insert(std::make_pair(pollutantIdentifier[i], normalizedPollutantMeasures[i]));
159  _idlingValuesPollutants.insert(std::make_pair(pollutantIdentifier[i], idlingPollutants[i] * pollutantMultiplyer));
160  }
161 
162  _idlingValueFC = idlingFC * _ratedPower;
163  }
164 
165  const bool& CEP::getHeavyVehicle() const {
166  return _heavyVehicle;
167  }
168 
169  const std::string& CEP::getFuelType() const {
170  return _fuelType;
171  }
172 
174  return _normalizingType;
175  }
176 
177  const double& CEP::getRatedPower() const {
178  return _ratedPower;
179  }
180 
181  void CEP::setRatedPower(const double& value) {
182  _ratedPower = value;
183  }
184 
185  const double& CEP::getNormalizingPower() const {
186  return _normalizingPower;
187  }
188 
189  const double& CEP::getDrivingPower() const {
190  return _drivingPower;
191  }
192 
193  void CEP::setDrivingPower(const double& value) {
194  _drivingPower = value;
195  }
196 
197  double CEP::CalcPower(double speed, double acc, double gradient) {
198  //Declaration
199  double power = 0;
200  double rotFactor = GetRotationalCoeffecient(speed);
201  double powerAux = (_auxPower * _ratedPower);
202 
203  //Calculate the power
204  power += (_massVehicle + _vehicleLoading) * Constants::GRAVITY_CONST * (_resistanceF0 + _resistanceF1 * speed + _resistanceF4 * std::pow(speed, 4)) * speed;
205  power += (_crossSectionalArea * _cWValue * Constants::AIR_DENSITY_CONST / 2) * std::pow(speed, 3);
206  power += (_massVehicle * rotFactor + _vehicleMassRot + _vehicleLoading) * acc * speed;
207  power += (_massVehicle + _vehicleLoading) * Constants::GRAVITY_CONST * gradient * 0.01 * speed;
208  power /= 1000;
210  power += powerAux;
211 
212  //Return result
213  return power;
214  }
215 
216  double CEP::CalcEngPower(double power) {
217  if (power < _powerPatternFC.front()) {
218  return _powerPatternFC.front();
219  }
220  if (power > _powerPatternFC.back()) {
221  return _powerPatternFC.back();
222  }
223 
224  return power;
225  }
226 
227  double CEP::GetEmission(const std::string& pollutant, double power, double speed, Helpers* VehicleClass) {
228  //Declaration
229  std::vector<double> emissionCurve;
230  std::vector<double> powerPattern;
231 
232  // bisection search to find correct position in power pattern
233  int upperIndex;
234  int lowerIndex;
235 
236  if (_fuelType != Constants::strBEV) {
237  if (std::abs(speed) <= Constants::ZERO_SPEED_ACCURACY) {
238  if (pollutant == "FC") {
239  return _idlingValueFC;
240  }
241  else {
242  if (_cepCurvePollutants.find(pollutant) == _cepCurvePollutants.end()) {
243  VehicleClass->setErrMsg(std::string("Emission pollutant ") + pollutant + std::string(" not found!"));
244  return 0;
245  }
246 
247  return _idlingValuesPollutants[pollutant];
248  }
249  }
250  }
251 
252  if (pollutant == "FC") {
253  emissionCurve = _cepCurveFC;
254  powerPattern = _powerPatternFC;
255  }
256  else {
257  if (_cepCurvePollutants.find(pollutant) == _cepCurvePollutants.end()) {
258  VehicleClass->setErrMsg(std::string("Emission pollutant ") + pollutant + std::string(" not found!"));
259  return 0;
260  }
261 
262  emissionCurve = _cepCurvePollutants[pollutant];
263  powerPattern = _powerPatternPollutants;
264  }
265 
266  if (emissionCurve.empty()) {
267  VehicleClass->setErrMsg(std::string("Empty emission curve for ") + pollutant + std::string(" found!"));
268  return 0;
269  }
270  if (emissionCurve.size() == 1) {
271  return emissionCurve[0];
272  }
273 
274  // in case that the demanded power is smaller than the first entry (smallest) in the power pattern the first is returned (should never happen)
275  if (power <= powerPattern.front()) {
276  return emissionCurve[0];
277  }
278 
279  // if power bigger than all entries in power pattern return the last (should never happen)
280  if (power >= powerPattern.back()) {
281  return emissionCurve.back();
282  }
283 
284  FindLowerUpperInPattern(lowerIndex, upperIndex, powerPattern, power);
285  return Interpolate(power, powerPattern[lowerIndex], powerPattern[upperIndex], emissionCurve[lowerIndex], emissionCurve[upperIndex]);
286  }
287 
288  double CEP::GetCO2Emission(double _FC, double _CO, double _HC, Helpers* VehicleClass) {
289  //Declaration
290  double fCBr;
291  double fCHC = 0.866;
292  double fCCO = 0.429;
293  double fCCO2 = 0.273;
294 
295 //C# TO C++ CONVERTER NOTE: The following 'switch' operated on a string variable and was converted to C++ 'if-else' logic:
296 // switch (_fuelType)
297 //ORIGINAL LINE: case Constants.strGasoline:
299  fCBr = 0.865;
300  }
301 //ORIGINAL LINE: case Constants.strDiesel:
302  else if (_fuelType == Constants::strDiesel) {
303  fCBr = 0.863;
304  }
305 //ORIGINAL LINE: case Constants.strCNG:
306  else if (_fuelType == Constants::strCNG) {
307  fCBr = 0.693;
308  fCHC = 0.803;
309  }
310 //ORIGINAL LINE: case Constants.strLPG:
311  else if (_fuelType == Constants::strLPG) {
312  fCBr = 0.825;
313  fCHC = 0.825;
314  }
315  else {
316  VehicleClass->setErrMsg(std::string("The propolsion type is not known! (") + _fuelType + std::string(")"));
317  return 0;
318  }
319 
320  return (_FC * fCBr - _CO * fCCO - _HC * fCHC) / fCCO2;
321  }
322 
323  double CEP::GetDecelCoast(double speed, double acc, double gradient) {
324  //Declaration
325  int upperIndex;
326  int lowerIndex;
327 
328  if (speed < Constants::SPEED_DCEL_MIN) {
329  return speed / Constants::SPEED_DCEL_MIN * GetDecelCoast(Constants::SPEED_DCEL_MIN, acc, gradient);
330  }
331 
332  double rotCoeff = GetRotationalCoeffecient(speed);
333  FindLowerUpperInPattern(lowerIndex, upperIndex, _speedPatternRotational, speed);
334  double iGear = Interpolate(speed, _speedPatternRotational[lowerIndex], _speedPatternRotational[upperIndex], _gearTransmissionCurve[lowerIndex], _gearTransmissionCurve[upperIndex]);
335 
336  double iTot = iGear * _axleRatio;
337 
338  double n = (30 * speed * iTot) / ((_effectiveWheelDiameter / 2) * M_PI);
339  double nNorm = (n - _engineIdlingSpeed) / (_engineRatedSpeed - _engineIdlingSpeed);
340 
341  FindLowerUpperInPattern(lowerIndex, upperIndex, _nNormTable, nNorm);
342 
343  double fMot = 0;
344 
345  if (speed >= 10e-2) {
346  fMot = (-Interpolate(nNorm, _nNormTable[lowerIndex], _nNormTable[upperIndex], _dragNormTable[lowerIndex], _dragNormTable[upperIndex]) * _ratedPower * 1000 / speed) / 0.9;
347  }
348 
349  double fRoll = (_resistanceF0 + _resistanceF1 * speed + std::pow(_resistanceF2 * speed, 2) + std::pow(_resistanceF3 * speed, 3) + std::pow(_resistanceF4 * speed, 4)) * (_massVehicle + _vehicleLoading) * Constants::GRAVITY_CONST;
350 
351  double fAir = _cWValue * _crossSectionalArea * 1.2 * 0.5 * std::pow(speed, 2);
352 
353  double fGrad = (_massVehicle + _vehicleLoading) * Constants::GRAVITY_CONST * gradient / 100;
354 
355  return -(fMot + fRoll + fAir + fGrad) / ((_massVehicle + _vehicleLoading) * rotCoeff);
356  }
357 
358  double CEP::GetRotationalCoeffecient(double speed) {
359  //Declaration
360  int upperIndex;
361  int lowerIndex;
362 
363  FindLowerUpperInPattern(lowerIndex, upperIndex, _speedPatternRotational, speed);
364  return Interpolate(speed, _speedPatternRotational[lowerIndex], _speedPatternRotational[upperIndex], _speedCurveRotational[lowerIndex], _speedCurveRotational[upperIndex]);
365  }
366 
367  void CEP::FindLowerUpperInPattern(int& lowerIndex, int& upperIndex, std::vector<double>& pattern, double value) {
368  lowerIndex = 0;
369  upperIndex = 0;
370 
371  if (value <= pattern.front()) {
372  lowerIndex = 0;
373  upperIndex = 0;
374  return;
375  }
376 
377  if (value >= pattern.back()) {
378  lowerIndex = (int)pattern.size() - 1;
379  upperIndex = (int)pattern.size() - 1;
380  return;
381  }
382 
383  // bisection search to find correct position in power pattern
384  int middleIndex = ((int)pattern.size() - 1) / 2;
385  upperIndex = (int)pattern.size() - 1;
386  lowerIndex = 0;
387 
388  while (upperIndex - lowerIndex > 1) {
389  if (pattern[middleIndex] == value) {
390  lowerIndex = middleIndex;
391  upperIndex = middleIndex;
392  return;
393  }
394  else if (pattern[middleIndex] < value) {
395  lowerIndex = middleIndex;
396  middleIndex = (upperIndex - lowerIndex) / 2 + lowerIndex;
397  }
398  else {
399  upperIndex = middleIndex;
400  middleIndex = (upperIndex - lowerIndex) / 2 + lowerIndex;
401  }
402  }
403 
404  if (pattern[lowerIndex] <= value && value < pattern[upperIndex]) {
405  return;
406  }
407  }
408 
409  double CEP::Interpolate(double px, double p1, double p2, double e1, double e2) {
410  if (p2 == p1) {
411  return e1;
412  }
413 
414  return e1 + (px - p1) / (p2 - p1) * (e2 - e1);
415  }
416 
417  double CEP::GetMaxAccel(double speed, double gradient) {
418  double rotFactor = GetRotationalCoeffecient(speed);
419  double pMaxForAcc = GetPMaxNorm(speed) * _ratedPower - CalcPower(speed, 0, gradient);
420 
421  return (pMaxForAcc * 1000) / ((_massVehicle * rotFactor + _vehicleMassRot + _vehicleLoading) * speed);
422  }
423 
424  double CEP::GetPMaxNorm(double speed) {
425  // Linear function between v0 and v1, constant elsewhere
426  if (speed <= _pNormV0) {
427  return _pNormP0;
428  }
429  else if (speed >= _pNormV1) {
430  return _pNormP1;
431  }
432  else {
433  return Interpolate(speed, _pNormV0, _pNormV1, _pNormP0, _pNormP1);
434  }
435  }
436 
438  _heavyVehicle = false;
439  _normalizingType = static_cast<NormalizingType>(0);
440  _ratedPower = 0;
441  _normalizingPower = 0;
442  _drivingPower = 0;
443  _massVehicle = 0;
444  _vehicleLoading = 0;
445  _vehicleMassRot = 0;
447  _cWValue = 0;
448  _resistanceF0 = 0;
449  _resistanceF1 = 0;
450  _resistanceF2 = 0;
451  _resistanceF3 = 0;
452  _resistanceF4 = 0;
453  _axleRatio = 0;
454  _auxPower = 0;
455  _pNormV0 = 0;
456  _pNormP0 = 0;
457  _pNormV1 = 0;
458  _pNormP1 = 0;
459  _engineRatedSpeed = 0;
460  _engineIdlingSpeed = 0;
462  _idlingValueFC = 0;
463  }
464 }
PHEMlightdll::CEP::GetRotationalCoeffecient
double GetRotationalCoeffecient(double speed)
Definition: CEP.cpp:358
PHEMlightdll::CEP::setDrivingPower
void setDrivingPower(const double &value)
Definition: CEP.cpp:193
PHEMlightdll::CEP::_cepNormalizedCurvePollutants
std::map< std::string, std::vector< double > > _cepNormalizedCurvePollutants
Definition: CEP.h:122
PHEMlightdll::CEP::_ratedPower
double _ratedPower
Definition: CEP.h:71
PHEMlightdll::Constants::NORMALIZING_SPEED
static const double NORMALIZING_SPEED
Definition: Constants.h:35
PHEMlightdll::CEP::_idlingValueFC
double _idlingValueFC
Definition: CEP.h:123
PHEMlightdll::CEP::_cWValue
double _cWValue
Definition: CEP.h:94
PHEMlightdll::Constants::strBEV
static const std::string strBEV
Definition: Constants.h:63
PHEMlightdll::CEP::_speedPatternRotational
std::vector< double > _speedPatternRotational
Definition: CEP.h:111
PHEMlightdll::CEP::_vehicleLoading
double _vehicleLoading
Definition: CEP.h:91
PHEMlightdll::CEP::_dragNormTable
std::vector< double > _dragNormTable
Definition: CEP.h:127
PHEMlightdll::CEP::GetEmission
double GetEmission(const std::string &pollutant, double power, double speed, Helpers *VehicleClass)
Definition: CEP.cpp:227
PHEMlightdll::CEP::setRatedPower
void setRatedPower(const double &value)
Definition: CEP.cpp:181
PHEMlightdll::CEP::_engineRatedSpeed
double _engineRatedSpeed
Definition: CEP.h:107
PHEMlightdll::CEP::_auxPower
double _auxPower
Definition: CEP.h:101
PHEMlightdll::CEP::_pNormP0
double _pNormP0
Definition: CEP.h:103
PHEMlightdll::CEP::_nNormTable
std::vector< double > _nNormTable
Definition: CEP.h:126
PHEMlightdll::CEP::getRatedPower
const double & getRatedPower() const
Definition: CEP.cpp:177
PHEMlightdll::CEP::_normailzedPowerPatternPollutants
std::vector< double > _normailzedPowerPatternPollutants
Definition: CEP.h:114
PHEMlightdll::Constants::NORMALIZING_ACCELARATION
static const double NORMALIZING_ACCELARATION
Definition: Constants.h:36
PHEMlightdll::CEP::_axleRatio
double _axleRatio
Definition: CEP.h:100
PHEMlightdll::CEP::GetPMaxNorm
double GetPMaxNorm(double speed)
Definition: CEP.cpp:424
PHEMlightdll::CEP::NormalizingType
NormalizingType
Definition: CEP.h:61
PHEMlightdll::CEP::getFuelType
const std::string & getFuelType() const
Definition: CEP.cpp:169
PHEMlightdll::CEP::_drivingPower
double _drivingPower
Definition: CEP.h:82
PHEMlightdll::CEP::InitializeInstanceFields
void InitializeInstanceFields()
Definition: CEP.cpp:437
PHEMlightdll::CEP::FindLowerUpperInPattern
void FindLowerUpperInPattern(int &lowerIndex, int &upperIndex, std::vector< double > &pattern, double value)
Definition: CEP.cpp:367
PHEMlightdll::CEP::getNormalizingPower
const double & getNormalizingPower() const
Definition: CEP.cpp:185
PHEMlightdll::CEP::_cepCurvePollutants
std::map< std::string, std::vector< double > > _cepCurvePollutants
Definition: CEP.h:121
PHEMlightdll::CEP::getHeavyVehicle
const bool & getHeavyVehicle() const
Definition: CEP.cpp:165
PHEMlightdll::CEP::_resistanceF0
double _resistanceF0
Definition: CEP.h:95
Helpers.h
PHEMlightdll::Constants::strLPG
static const std::string strLPG
Definition: Constants.h:61
PHEMlightdll::CEP::getNormalizingTypeX
const NormalizingType & getNormalizingTypeX() const
Definition: CEP.cpp:173
PHEMlightdll::CEP::_fuelType
std::string _fuelType
Definition: CEP.h:56
PHEMlightdll::CEP::_resistanceF2
double _resistanceF2
Definition: CEP.h:97
PHEMlightdll::CEP::GetCO2Emission
double GetCO2Emission(double _FC, double _CO, double _HC, Helpers *VehicleClass)
Definition: CEP.cpp:288
PHEMlightdll::Helpers::setErrMsg
void setErrMsg(const std::string &value)
Definition: Helpers.cpp:72
PHEMlightdll::CEP::_powerPatternPollutants
std::vector< double > _powerPatternPollutants
Definition: CEP.h:115
PHEMlightdll::CEP::_pNormV0
double _pNormV0
Definition: CEP.h:102
PHEMlightdll::CEP::GetMaxAccel
double GetMaxAccel(double speed, double gradient)
Definition: CEP.cpp:417
PHEMlightdll::Constants::_DRIVE_TRAIN_EFFICIENCY
static double _DRIVE_TRAIN_EFFICIENCY
Definition: Constants.h:75
PHEMlightdll::CEP::getDrivingPower
const double & getDrivingPower() const
Definition: CEP.cpp:189
PHEMlightdll::CEP::_cepCurveFC
std::vector< double > _cepCurveFC
Definition: CEP.h:117
PHEMlightdll::Constants::strCNG
static const std::string strCNG
Definition: Constants.h:60
PHEMlightdll
Definition: CEP.cpp:27
PHEMlightdll::Constants::GRAVITY_CONST
static const double GRAVITY_CONST
Definition: Constants.h:33
PHEMlightdll::Constants::strDiesel
static const std::string strDiesel
Definition: Constants.h:59
PHEMlightdll::CEP::GetDecelCoast
double GetDecelCoast(double speed, double acc, double gradient)
Definition: CEP.cpp:323
PHEMlightdll::CEP::Interpolate
double Interpolate(double px, double p1, double p2, double e1, double e2)
Definition: CEP.cpp:409
PHEMlightdll::Constants::strGasoline
static const std::string strGasoline
Definition: Constants.h:58
PHEMlightdll::CEP::_heavyVehicle
bool _heavyVehicle
Definition: CEP.h:51
PHEMlightdll::Helpers
Definition: Helpers.h:29
PHEMlightdll::CEP::_vehicleMassRot
double _vehicleMassRot
Definition: CEP.h:92
M_PI
#define M_PI
Definition: odrSpiral.cpp:40
PHEMlightdll::CEP.NormalizingType::NormalizingType_DrivingPower
Definition: CEP.h:63
PHEMlightdll::CEP::_normedCepCurveFC
std::vector< double > _normedCepCurveFC
Definition: CEP.h:118
PHEMlightdll::Constants::SPEED_DCEL_MIN
static const double SPEED_DCEL_MIN
Definition: Constants.h:37
PHEMlightdll::CEP::CalcPower
double CalcPower(double speed, double acc, double gradient)
Definition: CEP.cpp:197
PHEMlightdll::CEP.NormalizingType::NormalizingType_RatedPower
Definition: CEP.h:62
PHEMlightdll::CEP::_pNormV1
double _pNormV1
Definition: CEP.h:104
PHEMlightdll::CEP::_resistanceF3
double _resistanceF3
Definition: CEP.h:98
PHEMlightdll::CEP::_resistanceF4
double _resistanceF4
Definition: CEP.h:99
PHEMlightdll::CEP::_speedCurveRotational
std::vector< double > _speedCurveRotational
Definition: CEP.h:120
PHEMlightdll::CEP::_crossSectionalArea
double _crossSectionalArea
Definition: CEP.h:93
PHEMlightdll::Constants::AIR_DENSITY_CONST
static const double AIR_DENSITY_CONST
Definition: Constants.h:34
PHEMlightdll::CEP::_resistanceF1
double _resistanceF1
Definition: CEP.h:96
PHEMlightdll::CEP::_normalizingType
NormalizingType _normalizingType
Definition: CEP.h:66
PHEMlightdll::CEP::_normalizingPower
double _normalizingPower
Definition: CEP.h:77
PHEMlightdll::CEP::_normalizedPowerPatternFC
std::vector< double > _normalizedPowerPatternFC
Definition: CEP.h:113
Constants.h
PHEMlightdll::CEP::_powerPatternFC
std::vector< double > _powerPatternFC
Definition: CEP.h:112
PHEMlightdll::CEP::_idlingValuesPollutants
std::map< std::string, double > _idlingValuesPollutants
Definition: CEP.h:124
PHEMlightdll::CEP::_pNormP1
double _pNormP1
Definition: CEP.h:105
PHEMlightdll::CEP::_gearTransmissionCurve
std::vector< double > _gearTransmissionCurve
Definition: CEP.h:119
PHEMlightdll::CEP::_massVehicle
double _massVehicle
Definition: CEP.h:90
PHEMlightdll::Constants::ZERO_SPEED_ACCURACY
static const double ZERO_SPEED_ACCURACY
Definition: Constants.h:38
PHEMlightdll::CEP::_effectiveWheelDiameter
double _effectiveWheelDiameter
Definition: CEP.h:109
PHEMlightdll::CEP::CEP
CEP(bool heavyVehicle, double vehicleMass, double vehicleLoading, double vehicleMassRot, double crossArea, double cWValue, double f0, double f1, double f2, double f3, double f4, double axleRatio, std::vector< double > &transmissionGearRatios, double auxPower, double ratedPower, double engineIdlingSpeed, double engineRatedSpeed, double effictiveWheelDiameter, double pNormV0, double pNormP0, double pNormV1, double pNormP1, const std::string &vehicelFuelType, std::vector< std::vector< double > > &matrixFC, std::vector< std::string > &headerLinePollutants, std::vector< std::vector< double > > &matrixPollutants, std::vector< std::vector< double > > &matrixSpeedRotational, std::vector< std::vector< double > > &normedDragTable, double idlingFC, std::vector< double > &idlingPollutants)
Definition: CEP.cpp:29
PHEMlightdll::CEP::_engineIdlingSpeed
double _engineIdlingSpeed
Definition: CEP.h:108
CEP.h
PHEMlightdll::CEP::CalcEngPower
double CalcEngPower(double power)
Definition: CEP.cpp:216