Eclipse SUMO - Simulation of Urban MObility
V5/cpp/CEPHandler.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-2022 German Aerospace Center (DLR) and others.
4// PHEMlight module
5// Copyright (C) 2016-2022 Technische Universitaet Graz, https://www.tugraz.at/
6// This program and the accompanying materials are made available under the
7// terms of the Eclipse Public License 2.0 which is available at
8// https://www.eclipse.org/legal/epl-2.0/
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License 2.0 are satisfied: GNU General Public License, version 2
12// or later which is available at
13// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
14// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
15/****************************************************************************/
21//
22/****************************************************************************/
23#include <config.h>
24
25#include <fstream>
26#include <sstream>
27#define JSON_USE_IMPLICIT_CONVERSIONS 0
30#include "CEPHandler.h"
31#include "CEP.h"
32#include "Correction.h"
33#include "Helpers.h"
34
35
36namespace PHEMlightdllV5 {
37
39 }
40
41 const std::map<std::string, CEP*>& CEPHandler::getCEPS() const {
42 return _ceps;
43 }
44
45 bool CEPHandler::GetCEP(std::vector<std::string>& DataPath, Helpers* Helper, Correction* DataCor) {
46 if (getCEPS().find(Helper->getgClass()) == getCEPS().end()) {
47 if (!Load(DataPath, Helper, DataCor)) {
48 return false;
49 }
50 }
51 return true;
52 }
53
55 if (DataCor->getUseDet()) {
56 DataCor->setVehMileage(-1);
57 if (vehicle_Data->getMileage() > 0.) {
58 DataCor->setVehMileage(vehicle_Data->getMileage());
59 }
60
61 if (!DataCor->IniDETfactor(Helper)) {
62 return false;
63 }
64 }
65 if (DataCor->getUseTNOx()) {
66 if (!DataCor->IniTNOxfactor(Helper)) {
67 return false;
68 }
69 }
70
71 //Return value
72 return true;
73 }
74
75 bool CEPHandler::Load(std::vector<std::string>& DataPath, Helpers* Helper, Correction* DataCor, bool fleetMix) {
76 //Deklaration
77 // get string identifier for PHEM emission class
78 std::string emissionRep = Helper->getgClass();
79
80 // to hold everything.
81 std::vector<std::vector<double> > matrixFCvalues;
82 std::vector<std::vector<double> > matrixPollutants;
83 std::vector<double> idlingValuesFCvalues;
84 std::vector<double> idlingValuesPollutants;
85 std::vector<std::string> headerFCvalues;
86 std::vector<std::string> headerPollutants;
88
89 if (!ReadVehicleFile(DataPath, emissionRep, Helper, fleetMix, Vehicle)) {
90 delete Vehicle;
91 return false;
92 }
93
94 if (DataCor != nullptr) {
95 if (!CalcCorrection(DataCor, Helper, Vehicle->getVehicleData())) {
96 delete Vehicle;
97 return false;
98 }
99 }
100
101 if (!ReadEmissionData(true, DataPath, emissionRep, Helper, fleetMix, DataCor, headerFCvalues, matrixFCvalues, idlingValuesFCvalues)) {
102 delete Vehicle;
103 return false;
104 }
105 if (!ReadEmissionData(false, DataPath, emissionRep, Helper, fleetMix, DataCor, headerPollutants, matrixPollutants, idlingValuesPollutants)) {
106 delete Vehicle;
107 return false;
108 }
109
110 _ceps.insert(std::make_pair(Helper->getgClass(), new CEP(Vehicle, headerFCvalues, matrixFCvalues, headerPollutants, matrixPollutants, idlingValuesFCvalues, idlingValuesPollutants)));
111 return true;
112 }
113
114 double json2double(const nlohmann::json& vd, const std::string& key) {
115 if (vd.contains(key)) {
116 return vd.at(key).get<double>();
117 }
118 return 0.;
119 }
120
121 bool CEPHandler::ReadVehicleFile(const std::vector<std::string>& DataPath, const std::string& emissionClass, Helpers* Helper, bool /* fleetMix */, VEHPHEMLightJSON::VEH*& Vehicle) {
122 std::string path = "";
124
125 //Open file
126 std::ifstream vehicleReader;
127 for (std::vector<std::string>::const_iterator i = DataPath.begin(); i != DataPath.end(); i++) {
128 vehicleReader.open(((*i) + emissionClass + ".PHEMLight.veh").c_str());
129 if (vehicleReader.good()) {
130 break;
131 }
132 }
133 if (!vehicleReader.good()) {
134 Helper->setErrMsg("File does not exist! (" + emissionClass + ".PHEMLight.veh)");
135 return false;
136 }
137
138 //**** VEH Datei einlesen ****
139 nlohmann::json json;
140 try {
141 vehicleReader >> json;
142 } catch (...) {
143 Helper->setErrMsg("Error during file read! (" + emissionClass + ".PHEMLight.veh)");
144 return false;
145 }
146
147 //*** Get the vehicle data
148 nlohmann::json::iterator vehDataIt = json.find("VehicleData");
149 if (vehDataIt == json.end()) {
150 Helper->setErrMsg("No VehicleData in " + emissionClass + ".PHEMLight.veh!");
151 return false;
152 }
153 const nlohmann::json& vd = *vehDataIt;
154 Vehicle->getVehicleData()->setMassType(vd.contains("MassType") ? vd.at("MassType").get<std::string>() : "LV");
155 Vehicle->getVehicleData()->setFuelType(vd.contains("FuelType") ? vd.at("FuelType").get<std::string>() : "D");
156 Vehicle->getVehicleData()->setCalcType(vd.contains("CalcType") ? vd.at("CalcType").get<std::string>() : "Conv");
157 Vehicle->getVehicleData()->setMass(json2double(vd, "Mass"));
158 Vehicle->getVehicleData()->setLoading(json2double(vd, "Loading"));
159 Vehicle->getVehicleData()->setRedMassWheel(json2double(vd, "RedMassWheel"));
160 Vehicle->getVehicleData()->setWheelDiameter(json2double(vd, "WheelDiameter"));
161 Vehicle->getVehicleData()->setCw(json2double(vd, "Cw"));
162 Vehicle->getVehicleData()->setA(json2double(vd, "A"));
163 Vehicle->getVehicleData()->setMileage(json2double(vd, "Mileage"));
164
165 // Auxiliaries
166 nlohmann::json::iterator auxDataIt = json.find("AuxiliariesData");
167 if (auxDataIt == json.end() || !auxDataIt->contains("Pauxnorm")) {
168 Vehicle->getAuxiliariesData()->setPauxnorm(0.);
169 } else {
170 Vehicle->getAuxiliariesData()->setPauxnorm(auxDataIt->at("Pauxnorm").get<double>());
171 }
172
173 // Engine Data
174 nlohmann::json::iterator engDataIt = json.find("EngineData");
175 if (engDataIt == json.end() || !engDataIt->contains("ICEData") || !engDataIt->contains("EMData")) {
176 Helper->setErrMsg("Incomplete EngineData in " + emissionClass + ".PHEMLight.veh!");
177 return false;
178 }
179 const nlohmann::json& iced = (*engDataIt)["ICEData"];
180 const nlohmann::json& emd = (*engDataIt)["EMData"];
181 Vehicle->getEngineData()->getICEData()->setPrated(json2double(iced, "Prated"));
182 Vehicle->getEngineData()->getICEData()->setnrated(json2double(iced, "nrated"));
183 Vehicle->getEngineData()->getICEData()->setIdling(json2double(iced, "Idling"));
184 Vehicle->getEngineData()->getEMData()->setPrated(json2double(emd, "Prated"));
185 Vehicle->getEngineData()->getEMData()->setnrated(json2double(emd, "nrated"));
186
187 // Rolling resistance
188 nlohmann::json::iterator rrDataIt = json.find("RollingResData");
189 if (rrDataIt == json.end()) {
190 Helper->setErrMsg("No RollingResData in " + emissionClass + ".PHEMLight.veh!");
191 return false;
192 }
193 const nlohmann::json& rrd = *rrDataIt;
194 Vehicle->getRollingResData()->setFr0(json2double(rrd, "Fr0"));
195 Vehicle->getRollingResData()->setFr1(json2double(rrd, "Fr1"));
196 Vehicle->getRollingResData()->setFr2(json2double(rrd, "Fr2"));
197 Vehicle->getRollingResData()->setFr3(json2double(rrd, "Fr3"));
198 Vehicle->getRollingResData()->setFr4(json2double(rrd, "Fr4"));
199
200 // Transmission
201 nlohmann::json::iterator trDataIt = json.find("TransmissionData");
202 if (trDataIt == json.end()) {
203 Helper->setErrMsg("No TransmissionData in " + emissionClass + ".PHEMLight.veh!");
204 return false;
205 }
206 Vehicle->getTransmissionData()->setAxelRatio(json2double(*trDataIt, "AxelRatio"));
207 nlohmann::json::iterator transmIt = trDataIt->find("Transm");
208 if (transmIt == trDataIt->end()) {
209 Helper->setErrMsg(std::string("Transmission ratios missing in vehicle file! Calculation stopped! (") + path + std::string(")"));
210 return false;
211 } else {
212 if (!transmIt->contains("Speed")) {
213 Helper->setErrMsg(std::string("No Speed signal in transmission data given! Calculation stopped! (") + path + std::string(")"));
214 return false;
215 }
216 if (!transmIt->contains("GearRatio")) {
217 Helper->setErrMsg(std::string("No GearRatio signal in transmission data given! Calculation stopped! (") + path + std::string(")"));
218 return false;
219 }
220 if (!transmIt->contains("RotMassF")) {
221 Helper->setErrMsg(std::string("No RotMassF signal in transmission data given! Calculation stopped! (") + path + std::string(")"));
222 return false;
223 }
224 }
225 Vehicle->getTransmissionData()->setTransm(transmIt->get<std::map<std::string, std::vector<double> > >());
226
227 // Full load and drag
228 nlohmann::json::iterator fldDataIt = json.find("FLDData");
229 if (fldDataIt == json.end()) {
230 Helper->setErrMsg("No FLDData in " + emissionClass + ".PHEMLight.veh!");
231 return false;
232 }
233 const nlohmann::json& fld = *fldDataIt;
234 Vehicle->getFLDData()->setP_n_max_v0(json2double(fld, "P_n_max_v0"));
235 Vehicle->getFLDData()->setP_n_max_p0(json2double(fld, "P_n_max_p0"));
236 Vehicle->getFLDData()->setP_n_max_v1(json2double(fld, "P_n_max_v1"));
237 Vehicle->getFLDData()->setP_n_max_p1(json2double(fld, "P_n_max_p1"));
238 nlohmann::json::iterator dragIt = fldDataIt->find("DragCurve");
239 if (dragIt == fldDataIt->end()) {
240 Helper->setErrMsg(std::string("Drag curve missing in vehicle file! Calculation stopped! (") + path + std::string(")"));
241 return false;
242 } else {
243 if (!dragIt->contains("n_norm")) {
244 Helper->setErrMsg(std::string("No n_norm signal in drag curve data given! Calculation stopped! (") + path + std::string(")"));
245 return false;
246 }
247 if (!dragIt->contains("pe_drag_norm")) {
248 Helper->setErrMsg(std::string("No pe_drag_norm signal in drag curve data given! Calculation stopped! (") + path + std::string(")"));
249 return false;
250 }
251 }
252 Vehicle->getFLDData()->setDragCurve(dragIt->get<std::map<std::string, std::vector<double> > >());
253
254 return true;
255 }
256
257 bool CEPHandler::ReadEmissionData(bool readFC, const std::vector<std::string>& DataPath, const std::string& emissionClass, Helpers* Helper, bool /* fleetMix */, Correction* DataCor, std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues) {
258 // declare file stream
259 std::string line;
260 std::string path = "";
261 header = std::vector<std::string>();
262 matrix = std::vector<std::vector<double> >();
263 idlingValues = std::vector<double>();
264
265 std::string pollutantExtension = "";
266 if (readFC) {
267 pollutantExtension += std::string("_FC");
268 }
269
270 std::ifstream fileReader;
271 for (std::vector<std::string>::const_iterator i = DataPath.begin(); i != DataPath.end(); i++) {
272 fileReader.open(((*i) + emissionClass + pollutantExtension + ".csv").c_str());
273 if (fileReader.good()) {
274 break;
275 }
276 }
277 if (!fileReader.good()) {
278 Helper->setErrMsg("File does not exist! (" + emissionClass + pollutantExtension + ".csv)");
279 return false;
280 }
281
282 // read header line for pollutant identifiers
283 if ((line = ReadLine(fileReader)) != "") {
284 const std::vector<std::string>& entries = split(line, ',');
285 // skip first entry "Pe"
286 for (int i = 1; i < (int)entries.size(); i++) {
287 header.push_back(entries[i]);
288 }
289 }
290
291 // skip units
292 ReadLine(fileReader);
293
294 // skip comment
295 ReadLine(fileReader);
296
297 //readIdlingValues
298 line = ReadLine(fileReader);
299
300 std::vector<std::string> stringIdlings = split(line, ',');
301 stringIdlings.erase(stringIdlings.begin());
302
303 idlingValues = todoubleList(stringIdlings);
304
305 while ((line = ReadLine(fileReader)) != "") {
306 matrix.push_back(todoubleList(split(line, ',')));
307 }
308
309 //Data correction (Det & TNOx)
310 if (!CorrectEmissionData(DataCor, header, matrix, idlingValues)) {
311 Helper->setErrMsg("Error in correction calculation");
312 return false;
313 }
314
315 //Return value
316 return true;
317 }
318
319 bool CEPHandler::CorrectEmissionData(Correction* DataCor, std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues) {
320 for (int i = 0; i < (int)header.size(); i++) {
321 double CorF = GetDetTempCor(DataCor, header[i]);
322 if (CorF != 1) {
323 for (int j = 0; j < (int)matrix.size(); j++) {
324 matrix[j][i + 1] *= CorF;
325 }
326 idlingValues[i] *= CorF;
327 }
328 }
329
330 //Return value
331 return true;
332 }
333
334 double CEPHandler::GetDetTempCor(Correction* DataCor, const std::string& Emi) {
335 //Initialisation
336 double CorF = 1;
337 std::string emi = Emi;
338 std::transform(emi.begin(), emi.end(), emi.begin(), [](char c) { return (char)::toupper(c); });
339
340 if (DataCor != 0) {
341 if (DataCor->getUseDet() && DataCor->DETFactors.count(emi) > 0) {
342 CorF += DataCor->DETFactors[emi] - 1;
343 }
344 if (DataCor->getUseTNOx()) {
345 if (emi.find("NOX") != std::string::npos) {
346 CorF += (DataCor->getTNOxFactor() - 1);
347 }
348 }
349 }
350
351 //Return value
352 return CorF;
353 }
354
355 const std::vector<std::string> CEPHandler::split(const std::string& s, char delim) {
356 std::vector<std::string> elems;
357 std::stringstream ss(s);
358 std::string item;
359 while (std::getline(ss, item, delim)) {
360 elems.push_back(item);
361 }
362 return elems;
363 }
364
365 double CEPHandler::todouble(const std::string& s) {
366 std::stringstream ss(s);
367 double item;
368 ss >> item;
369 return item;
370 }
371
372 std::vector<double> CEPHandler::todoubleList(const std::vector<std::string>& s) {
373 std::vector<double> result;
374 for (std::vector<std::string>::const_iterator i = s.begin(); i != s.end(); ++i) {
375 result.push_back(todouble(*i));
376 }
377 return result;
378 }
379
380 std::string CEPHandler::ReadLine(std::ifstream& s) {
381 std::string line;
382 std::getline(s, line);
383 size_t lastNWChar = line.find_last_not_of(" \n\r\t");
384 if (lastNWChar != std::string::npos) {
385 line.erase(lastNWChar + 1);
386 }
387 return line;
388 }
389
390 const std::string& VEHPHEMLightJSON::VEH::getType() const {
391 return privateType;
392 }
393
394 void VEHPHEMLightJSON::VEH::setType(const std::string& value) {
395 privateType = value;
396 }
397
398 const std::string& VEHPHEMLightJSON::VEH::getVersion() const {
399 return privateVersion;
400 }
401
402 void VEHPHEMLightJSON::VEH::setVersion(const std::string& value) {
403 privateVersion = value;
404 }
405
407 return privateVehicleData;
408 }
409
411 privateVehicleData = value;
412 }
413
415 return privateAuxiliariesData;
416 }
417
419 privateAuxiliariesData = value;
420 }
421
423 return privateEngineData;
424 }
425
427 privateEngineData = value;
428 }
429
431 return privateRollingResData;
432 }
433
435 privateRollingResData = value;
436 }
437
439 return privateFLDData;
440 }
441
443 privateFLDData = value;
444 }
445
447 return privateTransmissionData;
448 }
449
451 privateTransmissionData = value;
452 }
453
455 setVehicleData(new Vehicle_Data());
456 setRollingResData(new Rollres_Data());
457 setEngineData(new Engine_Data());
458 setAuxiliariesData(new Aux_Data());
459 setFLDData(new FullLoadDrag_Data());
460 setTransmissionData(new Transmission_Data());
461 }
462
464 return privateMassType;
465 }
466
467 void VEHPHEMLightJSON::Vehicle_Data::setMassType(const std::string& value) {
468 privateMassType = value;
469 }
470
472 return privateFuelType;
473 }
474
475 void VEHPHEMLightJSON::Vehicle_Data::setFuelType(const std::string& value) {
476 privateFuelType = value;
477 }
478
480 return privateCalcType;
481 }
482
483 void VEHPHEMLightJSON::Vehicle_Data::setCalcType(const std::string& value) {
484 privateCalcType = value;
485 }
486
488 return privateMass;
489 }
490
491 void VEHPHEMLightJSON::Vehicle_Data::setMass(const double& value) {
492 privateMass = value;
493 }
494
496 return privateLoading;
497 }
498
500 privateLoading = value;
501 }
502
504 return privateRedMassWheel;
505 }
506
508 privateRedMassWheel = value;
509 }
510
512 return privateWheelDiameter;
513 }
514
516 privateWheelDiameter = value;
517 }
518
520 return privateCw;
521 }
522
523 void VEHPHEMLightJSON::Vehicle_Data::setCw(const double& value) {
524 privateCw = value;
525 }
526
528 return privateA;
529 }
530
531 void VEHPHEMLightJSON::Vehicle_Data::setA(const double& value) {
532 privateA = value;
533 }
534
536 return privateMileage;
537 }
538
540 privateMileage = value;
541 }
542
544 return privateFr0;
545 }
546
547 void VEHPHEMLightJSON::Rollres_Data::setFr0(const double& value) {
548 privateFr0 = value;
549 }
550
552 return privateFr1;
553 }
554
555 void VEHPHEMLightJSON::Rollres_Data::setFr1(const double& value) {
556 privateFr1 = value;
557 }
558
560 return privateFr2;
561 }
562
563 void VEHPHEMLightJSON::Rollres_Data::setFr2(const double& value) {
564 privateFr2 = value;
565 }
566
568 return privateFr3;
569 }
570
571 void VEHPHEMLightJSON::Rollres_Data::setFr3(const double& value) {
572 privateFr3 = value;
573 }
574
576 return privateFr4;
577 }
578
579 void VEHPHEMLightJSON::Rollres_Data::setFr4(const double& value) {
580 privateFr4 = value;
581 }
582
584 return privateICEData;
585 }
586
588 privateICEData = value;
589 }
590
592 return privateEMData;
593 }
594
596 privateEMData = value;
597 }
598
600 setICEData(new ICE_Data());
601 setEMData(new EM_Data());
602 }
603
605 return privatePrated;
606 }
607
608 void VEHPHEMLightJSON::ICE_Data::setPrated(const double& value) {
609 privatePrated = value;
610 }
611
613 return privatenrated;
614 }
615
616 void VEHPHEMLightJSON::ICE_Data::setnrated(const double& value) {
617 privatenrated = value;
618 }
619
621 return privateIdling;
622 }
623
624 void VEHPHEMLightJSON::ICE_Data::setIdling(const double& value) {
625 privateIdling = value;
626 }
627
629 return privatePrated;
630 }
631
632 void VEHPHEMLightJSON::EM_Data::setPrated(const double& value) {
633 privatePrated = value;
634 }
635
637 return privatenrated;
638 }
639
640 void VEHPHEMLightJSON::EM_Data::setnrated(const double& value) {
641 privatenrated = value;
642 }
643
645 return privatePauxnorm;
646 }
647
648 void VEHPHEMLightJSON::Aux_Data::setPauxnorm(const double& value) {
649 privatePauxnorm = value;
650 }
651
653 return privateP_n_max_v0;
654 }
655
657 privateP_n_max_v0 = value;
658 }
659
661 return privateP_n_max_p0;
662 }
663
665 privateP_n_max_p0 = value;
666 }
667
669 return privateP_n_max_v1;
670 }
671
673 privateP_n_max_v1 = value;
674 }
675
677 return privateP_n_max_p1;
678 }
679
681 privateP_n_max_p1 = value;
682 }
683
684 std::map<std::string, std::vector<double> >& VEHPHEMLightJSON::FullLoadDrag_Data::getDragCurve() {
685 return privateDragCurve;
686 }
687
688 void VEHPHEMLightJSON::FullLoadDrag_Data::setDragCurve(const std::map<std::string, std::vector<double> >& value) {
689 privateDragCurve = value;
690 }
691
693 setDragCurve(std::map<std::string, std::vector<double> >());
694 }
695
697 return privateAxelRatio;
698 }
699
701 privateAxelRatio = value;
702 }
703
704 std::map<std::string, std::vector<double> >& VEHPHEMLightJSON::Transmission_Data::getTransm() {
705 return privateTransm;
706 }
707
708 void VEHPHEMLightJSON::Transmission_Data::setTransm(const std::map<std::string, std::vector<double> >& value) {
709 privateTransm = value;
710 }
711
713 setTransm(std::map<std::string, std::vector<double> >());
714 }
715}
bool Load(std::vector< std::string > &DataPath, Helpers *Helper, Correction *DataCor, bool fleetMix=false)
const std::map< std::string, CEP * > & getCEPS() const
bool ReadVehicleFile(const std::vector< std::string > &DataPath, const std::string &emissionClass, Helpers *Helper, bool fleetMix, VEHPHEMLightJSON::VEH *&Vehicle)
std::string ReadLine(std::ifstream &s)
std::vector< double > todoubleList(const std::vector< std::string > &s)
double todouble(const std::string &s)
bool CorrectEmissionData(Correction *DataCor, std::vector< std::string > &header, std::vector< std::vector< double > > &matrix, std::vector< double > &idlingValues)
bool CalcCorrection(Correction *DataCor, Helpers *Helper, VEHPHEMLightJSON::Vehicle_Data *vehicle_Data)
std::map< std::string, CEP * > _ceps
bool GetCEP(std::vector< std::string > &DataPath, Helpers *Helper, Correction *DataCor)
const std::vector< std::string > split(const std::string &s, char delim)
double GetDetTempCor(Correction *DataCor, const std::string &Emi)
bool ReadEmissionData(bool readFC, const std::vector< std::string > &DataPath, const std::string &emissionClass, Helpers *Helper, bool fleetMix, Correction *DataCor, std::vector< std::string > &header, std::vector< std::vector< double > > &matrix, std::vector< double > &idlingValues)
bool IniDETfactor(Helpers *Helper)
Definition: Correction.cpp:152
const bool & getUseTNOx() const
Definition: Correction.cpp:266
bool IniTNOxfactor(Helpers *Helper)
Definition: Correction.cpp:324
std::map< std::string, double > DETFactors
Definition: Correction.h:52
const double & getTNOxFactor() const
Definition: Correction.cpp:290
void setVehMileage(const double &value)
Definition: Correction.cpp:82
const bool & getUseDet() const
Definition: Correction.cpp:46
const std::string & getgClass() const
void setErrMsg(const std::string &value)
std::map< std::string, std::vector< double > > & getDragCurve()
void setDragCurve(const std::map< std::string, std::vector< double > > &value)
void setTransm(const std::map< std::string, std::vector< double > > &value)
std::map< std::string, std::vector< double > > & getTransm()
void setTransmissionData(Transmission_Data *value)
void setType(const std::string &value)
void setVersion(const std::string &value)
void setFLDData(FullLoadDrag_Data *value)
void setVehicleData(Vehicle_Data *value)
FullLoadDrag_Data * getFLDData() const
Transmission_Data * getTransmissionData() const
void setRollingResData(Rollres_Data *value)
const std::string & getVersion() const
C++ TraCI client API implementation.
a class to store JSON values
Definition: json.hpp:17282
bool contains(KeyT &&key) const
check the existence of an element in a JSON object
Definition: json.hpp:19640
reference at(size_type idx)
access specified array element with bounds checking
Definition: json.hpp:19090
auto get() const noexcept(noexcept(std::declval< const basic_json_t & >().template get_impl< ValueType >(detail::priority_tag< 4 > {}))) -> decltype(std::declval< const basic_json_t & >().template get_impl< ValueType >(detail::priority_tag< 4 > {}))
get a (pointer) value (explicit)
Definition: json.hpp:18898
a template for a bidirectional iterator for the basic_json class This class implements a both iterato...
Definition: json.hpp:11407
double json2double(const nlohmann::json &vd, const std::string &key)