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