Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/foreign/PHEMlight/cpp/conversion.patch
169685 views
1
diff --git b/src/foreign/PHEMlight/cpp/CEP.cpp a/src/foreign/PHEMlight/cpp/CEP.cpp
2
index eafe2e787f..5a0aef688e 100644
3
--- b/src/foreign/PHEMlight/cpp/CEP.cpp
4
+++ a/src/foreign/PHEMlight/cpp/CEP.cpp
5
@@ -1,4 +1,25 @@
6
-#include "CEP.h"
7
+/****************************************************************************/
8
+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
9
+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.
10
+// PHEMlight module
11
+// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/
12
+// This program and the accompanying materials
13
+// are made available under the terms of the Eclipse Public License v2.0
14
+// which accompanies this distribution, and is available at
15
+// http://www.eclipse.org/legal/epl-v20.html
16
+// SPDX-License-Identifier: EPL-2.0
17
+/****************************************************************************/
18
+/// @file CEP.cpp
19
+/// @author Martin Dippold
20
+/// @author Michael Behrisch
21
+/// @date July 2016
22
+/// @version $Id$
23
+///
24
+//
25
+/****************************************************************************/
26
+
27
+
28
+#include "CEP.h"
29
#include "Constants.h"
30
#include "Helpers.h"
31
32
@@ -6,6 +27,7 @@
33
namespace PHEMlightdll {
34
35
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) {
36
+ (void)transmissionGearRatios; // just to make the compiler happy about the unused parameter
37
InitializeInstanceFields();
38
_resistanceF0 = f0;
39
_resistanceF1 = f1;
40
@@ -36,12 +58,12 @@ namespace PHEMlightdll {
41
std::vector<std::vector<double> > normalizedPollutantMeasures;
42
43
// init pollutant identifiers
44
- for (int i = 0; i < headerLinePollutants.size(); i++) {
45
+ for (int i = 0; i < (int)headerLinePollutants.size(); i++) {
46
pollutantIdentifier.push_back(headerLinePollutants[i]);
47
}
48
49
// initialize measures
50
- for (int i = 0; i < headerLinePollutants.size(); i++) {
51
+ for (int i = 0; i < (int)headerLinePollutants.size(); i++) {
52
pollutantMeasures.push_back(std::vector<double>());
53
normalizedPollutantMeasures.push_back(std::vector<double>());
54
}
55
@@ -50,7 +72,7 @@ namespace PHEMlightdll {
56
_speedCurveRotational = std::vector<double>();
57
_speedPatternRotational = std::vector<double>();
58
_gearTransmissionCurve = std::vector<double>();
59
- for (int i = 0; i < matrixSpeedRotational.size(); i++) {
60
+ for (int i = 0; i < (int)matrixSpeedRotational.size(); i++) {
61
if (matrixSpeedRotational[i].size() != 3) {
62
return;
63
}
64
@@ -63,7 +85,7 @@ namespace PHEMlightdll {
65
// looping through matrix and assigning values for drag table
66
_nNormTable = std::vector<double>();
67
_dragNormTable = std::vector<double>();
68
- for (int i = 0; i < normedDragTable.size(); i++) {
69
+ for (int i = 0; i < (int)normedDragTable.size(); i++) {
70
if (normedDragTable[i].size() != 2) {
71
return;
72
}
73
@@ -77,7 +99,7 @@ namespace PHEMlightdll {
74
_normedCepCurveFC = std::vector<double>();
75
_powerPatternFC = std::vector<double>();
76
_normalizedPowerPatternFC = std::vector<double>();
77
- for (int i = 0; i < matrixFC.size(); i++) {
78
+ for (int i = 0; i < (int)matrixFC.size(); i++) {
79
if (matrixFC[i].size() != 2) {
80
return;
81
}
82
@@ -110,10 +132,10 @@ namespace PHEMlightdll {
83
84
_cepNormalizedCurvePollutants = std::map<std::string, std::vector<double> >();
85
86
- int headerCount = headerLinePollutants.size();
87
- for (int i = 0; i < matrixPollutants.size(); i++) {
88
- for (int j = 0; j < matrixPollutants[i].size(); j++) {
89
- if (matrixPollutants[i].size() != headerCount + 1) {
90
+ int headerCount = (int)headerLinePollutants.size();
91
+ for (int i = 0; i < (int)matrixPollutants.size(); i++) {
92
+ for (int j = 0; j < (int)matrixPollutants[i].size(); j++) {
93
+ if ((int)matrixPollutants[i].size() != headerCount + 1) {
94
return;
95
}
96
97
@@ -131,7 +153,7 @@ namespace PHEMlightdll {
98
_cepCurvePollutants = std::map<std::string, std::vector<double> >();
99
_idlingValuesPollutants = std::map<std::string, double>();
100
101
- for (int i = 0; i < headerLinePollutants.size(); i++) {
102
+ for (int i = 0; i < (int)headerLinePollutants.size(); i++) {
103
_cepCurvePollutants.insert(std::make_pair(pollutantIdentifier[i], pollutantMeasures[i]));
104
_cepNormalizedCurvePollutants.insert(std::make_pair(pollutantIdentifier[i], normalizedPollutantMeasures[i]));
105
_idlingValuesPollutants.insert(std::make_pair(pollutantIdentifier[i], idlingPollutants[i] * pollutantMultiplyer));
106
@@ -211,7 +233,7 @@ namespace PHEMlightdll {
107
int upperIndex;
108
int lowerIndex;
109
110
- if (VehicleClass->gettClass() != Constants::strBEV) {
111
+ if (_fuelType != Constants::strBEV) {
112
if (std::abs(speed) <= Constants::ZERO_SPEED_ACCURACY) {
113
if (pollutant == "FC") {
114
return _idlingValueFC;
115
@@ -353,14 +375,14 @@ namespace PHEMlightdll {
116
}
117
118
if (value >= pattern.back()) {
119
- lowerIndex = pattern.size() - 1;
120
- upperIndex = pattern.size() - 1;
121
+ lowerIndex = (int)pattern.size() - 1;
122
+ upperIndex = (int)pattern.size() - 1;
123
return;
124
}
125
126
// bisection search to find correct position in power pattern
127
- int middleIndex = (pattern.size() - 1) / 2;
128
- upperIndex = pattern.size() - 1;
129
+ int middleIndex = ((int)pattern.size() - 1) / 2;
130
+ upperIndex = (int)pattern.size() - 1;
131
lowerIndex = 0;
132
133
while (upperIndex - lowerIndex > 1) {
134
diff --git b/src/foreign/PHEMlight/cpp/CEP.h a/src/foreign/PHEMlight/cpp/CEP.h
135
index f24983953b..84aa342689 100644
136
--- b/src/foreign/PHEMlight/cpp/CEP.h
137
+++ a/src/foreign/PHEMlight/cpp/CEP.h
138
@@ -1,4 +1,25 @@
139
-#ifndef PHEMlightCEP
140
+/****************************************************************************/
141
+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
142
+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.
143
+// PHEMlight module
144
+// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/
145
+// This program and the accompanying materials
146
+// are made available under the terms of the Eclipse Public License v2.0
147
+// which accompanies this distribution, and is available at
148
+// http://www.eclipse.org/legal/epl-v20.html
149
+// SPDX-License-Identifier: EPL-2.0
150
+/****************************************************************************/
151
+/// @file CEP.h
152
+/// @author Martin Dippold
153
+/// @author Michael Behrisch
154
+/// @date July 2016
155
+/// @version $Id$
156
+///
157
+//
158
+/****************************************************************************/
159
+
160
+
161
+#ifndef PHEMlightCEP
162
#define PHEMlightCEP
163
164
#define _USE_MATH_DEFINES
165
@@ -11,7 +32,6 @@
166
//C# TO C++ CONVERTER NOTE: Forward class declarations:
167
namespace PHEMlightdll { class Helpers; }
168
169
-#define FLEET
170
171
namespace PHEMlightdll {
172
class CEP {
173
diff --git b/src/foreign/PHEMlight/cpp/CEPHandler.cpp a/src/foreign/PHEMlight/cpp/CEPHandler.cpp
174
index 53a739894b..fa5ee8e2ae 100644
175
--- b/src/foreign/PHEMlight/cpp/CEPHandler.cpp
176
+++ a/src/foreign/PHEMlight/cpp/CEPHandler.cpp
177
@@ -1,4 +1,27 @@
178
-#include "CEPHandler.h"
179
+/****************************************************************************/
180
+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
181
+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.
182
+// PHEMlight module
183
+// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/
184
+// This program and the accompanying materials
185
+// are made available under the terms of the Eclipse Public License v2.0
186
+// which accompanies this distribution, and is available at
187
+// http://www.eclipse.org/legal/epl-v20.html
188
+// SPDX-License-Identifier: EPL-2.0
189
+/****************************************************************************/
190
+/// @file CEPHandler.cpp
191
+/// @author Martin Dippold
192
+/// @author Michael Behrisch
193
+/// @date July 2016
194
+/// @version $Id$
195
+///
196
+//
197
+/****************************************************************************/
198
+
199
+
200
+#include <fstream>
201
+#include <sstream>
202
+#include "CEPHandler.h"
203
#include "CEP.h"
204
#include "Helpers.h"
205
#include "Constants.h"
206
@@ -10,11 +33,11 @@ namespace PHEMlightdll {
207
_ceps = std::map<std::string, CEP*>();
208
}
209
210
- std::map<std::string, CEP*> CEPHandler::getCEPS() const {
211
+ const std::map<std::string, CEP*>& CEPHandler::getCEPS() const {
212
return _ceps;
213
}
214
215
- bool CEPHandler::GetCEP(const std::string& DataPath, Helpers* Helper) {
216
+ bool CEPHandler::GetCEP(const std::vector<std::string>& DataPath, Helpers* Helper) {
217
if (getCEPS().find(Helper->getgClass()) == getCEPS().end()) {
218
if (!Load(DataPath, Helper)) {
219
return false;
220
@@ -23,11 +46,11 @@ namespace PHEMlightdll {
221
return true;
222
}
223
224
- bool CEPHandler::Load(const std::string& DataPath, Helpers* Helper) {
225
+ bool CEPHandler::Load(const std::vector<std::string>& DataPath, Helpers* Helper) {
226
//Deklaration
227
// get string identifier for PHEM emission class
228
//C# TO C++ CONVERTER TODO TASK: There is no native C++ equivalent to 'ToString':
229
- std::string emissionRep = Helper->getgClass().ToString();
230
+ std::string emissionRep = Helper->getgClass();
231
232
// to hold everything.
233
std::vector<std::vector<double> > matrixSpeedInertiaTable;
234
@@ -80,7 +103,7 @@ namespace PHEMlightdll {
235
return true;
236
}
237
238
- bool CEPHandler::ReadVehicleFile(const std::string& DataPath, const std::string& emissionClass, Helpers* Helper, double& vehicleMass, double& vehicleLoading, double& vehicleMassRot, double& crossArea, double& cWValue, double& f0, double& f1, double& f2, double& f3, double& f4, double& axleRatio, double& auxPower, double& ratedPower, double& engineIdlingSpeed, double& engineRatedSpeed, double& effectiveWheelDiameter, std::vector<double>& transmissionGearRatios, std::string& vehicleMassType, std::string& vehicleFuelType, double& pNormV0, double& pNormP0, double& pNormV1, double& pNormP1, std::vector<std::vector<double> >& matrixSpeedInertiaTable, std::vector<std::vector<double> >& normedDragTable) {
239
+ bool CEPHandler::ReadVehicleFile(const std::vector<std::string>& DataPath, const std::string& emissionClass, Helpers* Helper, double& vehicleMass, double& vehicleLoading, double& vehicleMassRot, double& crossArea, double& cWValue, double& f0, double& f1, double& f2, double& f3, double& f4, double& axleRatio, double& auxPower, double& ratedPower, double& engineIdlingSpeed, double& engineRatedSpeed, double& effectiveWheelDiameter, std::vector<double>& transmissionGearRatios, std::string& vehicleMassType, std::string& vehicleFuelType, double& pNormV0, double& pNormP0, double& pNormV1, double& pNormP1, std::vector<std::vector<double> >& matrixSpeedInertiaTable, std::vector<std::vector<double> >& normedDragTable) {
240
vehicleMass = 0;
241
vehicleLoading = 0;
242
vehicleMassRot = 0;
243
@@ -111,12 +134,17 @@ namespace PHEMlightdll {
244
int dataCount = 0;
245
246
//Open file
247
- std::string path = DataPath + std::string("\\") + emissionClass + std::string(".PHEMLight.veh");
248
- if (!File::Exists(path)) {
249
- Helper->setErrMsg(std::string("File do not exist! (") + path + std::string(")"));
250
+ std::ifstream vehicleReader;
251
+ for (std::vector<std::string>::const_iterator i = DataPath.begin(); i != DataPath.end(); i++) {
252
+ vehicleReader.open(((*i) + emissionClass + ".PHEMLight.veh").c_str());
253
+ if (vehicleReader.good()) {
254
+ break;
255
+ }
256
+ }
257
+ if (!vehicleReader.good()) {
258
+ Helper->setErrMsg("File does not exist! (" + emissionClass + ".PHEMLight.veh)");
259
return false;
260
}
261
- StreamReader* vehicleReader = File::OpenText(path);
262
263
// skip header
264
ReadLine(vehicleReader);
265
@@ -262,11 +290,10 @@ namespace PHEMlightdll {
266
normedDragTable.push_back(todoubleList(split(line, ',')));
267
}
268
269
- vehicleReader->Close();
270
return true;
271
}
272
273
- bool CEPHandler::ReadEmissionData(bool readFC, const std::string& DataPath, const std::string& emissionClass, Helpers* Helper, std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues) {
274
+ bool CEPHandler::ReadEmissionData(bool readFC, const std::vector<std::string>& DataPath, const std::string& emissionClass, Helpers* Helper, std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues) {
275
// declare file stream
276
std::string line;
277
header = std::vector<std::string>();
278
@@ -278,18 +305,23 @@ namespace PHEMlightdll {
279
pollutantExtension += std::string("_FC");
280
}
281
282
- std::string path = DataPath + std::string("\\") + emissionClass + pollutantExtension + std::string(".csv");
283
- if (!File::Exists(path)) {
284
- Helper->setErrMsg(std::string("File do not exist! (") + path + std::string(")"));
285
+ std::ifstream fileReader;
286
+ for (std::vector<std::string>::const_iterator i = DataPath.begin(); i != DataPath.end(); i++) {
287
+ fileReader.open(((*i) + emissionClass + pollutantExtension + ".csv").c_str());
288
+ if (fileReader.good()) {
289
+ break;
290
+ }
291
+ }
292
+ if (!fileReader.good()) {
293
+ Helper->setErrMsg("File does not exist! (" + emissionClass + pollutantExtension + ".csv)");
294
return false;
295
}
296
- StreamReader* fileReader = File::OpenText(path);
297
298
// read header line for pollutant identifiers
299
if ((line = ReadLine(fileReader)) != "") {
300
- std::vector<std::string>& entries = split(line, ',');
301
+ std::vector<std::string> entries = split(line, ',');
302
// skip first entry "Pe"
303
- for (int i = 1; i < entries.size(); i++) {
304
+ for (int i = 1; i < (int)entries.size(); i++) {
305
header.push_back(entries[i]);
306
}
307
}
308
@@ -303,7 +335,7 @@ namespace PHEMlightdll {
309
//readIdlingValues
310
line = ReadLine(fileReader);
311
312
- std::vector<std::string> stringIdlings = split(line, ',').ToList();
313
+ std::vector<std::string> stringIdlings = split(line, ',');
314
stringIdlings.erase(stringIdlings.begin());
315
316
idlingValues = todoubleList(stringIdlings);
317
@@ -311,26 +343,38 @@ namespace PHEMlightdll {
318
while ((line = ReadLine(fileReader)) != "") {
319
matrix.push_back(todoubleList(split(line, ',')));
320
}
321
- fileReader->Close();
322
return true;
323
}
324
325
std::vector<std::string> CEPHandler::split(const std::string& s, char delim) {
326
-//C# TO C++ CONVERTER TODO TASK: There is no direct native C++ equivalent to this .NET String method:
327
- return s.Split(delim).ToList();
328
+ std::vector<std::string> elems;
329
+ std::stringstream ss(s);
330
+ std::string item;
331
+ while (std::getline(ss, item, delim)) {
332
+ elems.push_back(item);
333
+ }
334
+ return elems;
335
}
336
337
double CEPHandler::todouble(const std::string& s) {
338
- return static_cast<double>(s, CultureInfo::InvariantCulture);
339
+ std::stringstream ss(s);
340
+ double item;
341
+ ss >> item;
342
+ return item;
343
}
344
345
- std::vector<double> CEPHandler::todoubleList(std::vector<std::string>& s) {
346
- return s.Select([&] (void* p) {
347
- todouble(p);
348
- }).Cast<double>().ToList();
349
+ std::vector<double> CEPHandler::todoubleList(const std::vector<std::string>& s) {
350
+ std::vector<double> result;
351
+ for (std::vector<std::string>::const_iterator i = s.begin(); i != s.end(); ++i) {
352
+ result.push_back(todouble(*i));
353
+ }
354
+ return result;
355
}
356
357
- std::string CEPHandler::ReadLine(StreamReader* s) {
358
- return s->ReadLine();
359
+ std::string CEPHandler::ReadLine(std::ifstream& s) {
360
+ std::string line;
361
+ std::getline(s, line);
362
+ line.erase(line.find_last_not_of(" \n\r\t") + 1);
363
+ return line;
364
}
365
}
366
diff --git b/src/foreign/PHEMlight/cpp/CEPHandler.h a/src/foreign/PHEMlight/cpp/CEPHandler.h
367
index bd46d8d9b9..d2e0fd3fb6 100644
368
--- b/src/foreign/PHEMlight/cpp/CEPHandler.h
369
+++ a/src/foreign/PHEMlight/cpp/CEPHandler.h
370
@@ -1,4 +1,25 @@
371
-#ifndef PHEMlightCEPHANDLER
372
+/****************************************************************************/
373
+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
374
+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.
375
+// PHEMlight module
376
+// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/
377
+// This program and the accompanying materials
378
+// are made available under the terms of the Eclipse Public License v2.0
379
+// which accompanies this distribution, and is available at
380
+// http://www.eclipse.org/legal/epl-v20.html
381
+// SPDX-License-Identifier: EPL-2.0
382
+/****************************************************************************/
383
+/// @file CEPHandler.h
384
+/// @author Martin Dippold
385
+/// @author Michael Behrisch
386
+/// @date July 2016
387
+/// @version $Id$
388
+///
389
+//
390
+/****************************************************************************/
391
+
392
+
393
+#ifndef PHEMlightCEPHANDLER
394
#define PHEMlightCEPHANDLER
395
396
#include <string>
397
@@ -10,7 +31,6 @@
398
namespace PHEMlightdll { class CEP; }
399
namespace PHEMlightdll { class Helpers; }
400
401
-#define FLEET
402
403
namespace PHEMlightdll {
404
class CEPHandler {
405
@@ -28,14 +48,14 @@ namespace PHEMlightdll {
406
private:
407
std::map<std::string, CEP*> _ceps;
408
public:
409
- std::map<std::string, CEP*> getCEPS() const;
410
+ const std::map<std::string, CEP*>& getCEPS() const;
411
412
413
//--------------------------------------------------------------------------------------------------
414
// Methods
415
//--------------------------------------------------------------------------------------------------
416
417
- bool GetCEP(const std::string& DataPath, Helpers* Helper);
418
+ bool GetCEP(const std::vector<std::string>& DataPath, Helpers* Helper);
419
420
421
//--------------------------------------------------------------------------------------------------
422
@@ -43,11 +63,11 @@ namespace PHEMlightdll {
423
//--------------------------------------------------------------------------------------------------
424
425
private:
426
- bool Load(const std::string& DataPath, Helpers* Helper);
427
+ bool Load(const std::vector<std::string>& DataPath, Helpers* Helper);
428
429
- bool ReadVehicleFile(const std::string& DataPath, const std::string& emissionClass, Helpers* Helper, double& vehicleMass, double& vehicleLoading, double& vehicleMassRot, double& crossArea, double& cWValue, double& f0, double& f1, double& f2, double& f3, double& f4, double& axleRatio, double& auxPower, double& ratedPower, double& engineIdlingSpeed, double& engineRatedSpeed, double& effectiveWheelDiameter, std::vector<double>& transmissionGearRatios, std::string& vehicleMassType, std::string& vehicleFuelType, double& pNormV0, double& pNormP0, double& pNormV1, double& pNormP1, std::vector<std::vector<double> >& matrixSpeedInertiaTable, std::vector<std::vector<double> >& normedDragTable);
430
+ bool ReadVehicleFile(const std::vector<std::string>& DataPath, const std::string& emissionClass, Helpers* Helper, double& vehicleMass, double& vehicleLoading, double& vehicleMassRot, double& crossArea, double& cWValue, double& f0, double& f1, double& f2, double& f3, double& f4, double& axleRatio, double& auxPower, double& ratedPower, double& engineIdlingSpeed, double& engineRatedSpeed, double& effectiveWheelDiameter, std::vector<double>& transmissionGearRatios, std::string& vehicleMassType, std::string& vehicleFuelType, double& pNormV0, double& pNormP0, double& pNormV1, double& pNormP1, std::vector<std::vector<double> >& matrixSpeedInertiaTable, std::vector<std::vector<double> >& normedDragTable);
431
432
- bool ReadEmissionData(bool readFC, const std::string& DataPath, const std::string& emissionClass, Helpers* Helper, std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues);
433
+ bool ReadEmissionData(bool readFC, const std::vector<std::string>& DataPath, const std::string& emissionClass, Helpers* Helper, std::vector<std::string>& header, std::vector<std::vector<double> >& matrix, std::vector<double>& idlingValues);
434
435
436
//--------------------------------------------------------------------------------------------------
437
@@ -61,10 +81,10 @@ namespace PHEMlightdll {
438
double todouble(const std::string& s);
439
440
//Convert string to double list
441
- std::vector<double> todoubleList(std::vector<std::string>& s);
442
+ std::vector<double> todoubleList(const std::vector<std::string>& s);
443
444
//Read a line from file
445
- std::string ReadLine(StreamReader* s);
446
+ std::string ReadLine(std::ifstream& s);
447
};
448
}
449
450
diff --git b/src/foreign/PHEMlight/cpp/Constants.cpp a/src/foreign/PHEMlight/cpp/Constants.cpp
451
index e534017678..936416fe08 100644
452
--- b/src/foreign/PHEMlight/cpp/Constants.cpp
453
+++ a/src/foreign/PHEMlight/cpp/Constants.cpp
454
@@ -1,4 +1,25 @@
455
-#include "Constants.h"
456
+/****************************************************************************/
457
+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
458
+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.
459
+// PHEMlight module
460
+// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/
461
+// This program and the accompanying materials
462
+// are made available under the terms of the Eclipse Public License v2.0
463
+// which accompanies this distribution, and is available at
464
+// http://www.eclipse.org/legal/epl-v20.html
465
+// SPDX-License-Identifier: EPL-2.0
466
+/****************************************************************************/
467
+/// @file Constants.cpp
468
+/// @author Martin Dippold
469
+/// @author Michael Behrisch
470
+/// @date July 2016
471
+/// @version $Id$
472
+///
473
+//
474
+/****************************************************************************/
475
+
476
+
477
+#include "Constants.h"
478
479
480
namespace PHEMlightdll {
481
diff --git b/src/foreign/PHEMlight/cpp/Constants.h a/src/foreign/PHEMlight/cpp/Constants.h
482
index bd3387c15b..113c4247c7 100644
483
--- b/src/foreign/PHEMlight/cpp/Constants.h
484
+++ a/src/foreign/PHEMlight/cpp/Constants.h
485
@@ -1,4 +1,25 @@
486
-#ifndef PHEMlightCONSTANTS
487
+/****************************************************************************/
488
+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
489
+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.
490
+// PHEMlight module
491
+// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/
492
+// This program and the accompanying materials
493
+// are made available under the terms of the Eclipse Public License v2.0
494
+// which accompanies this distribution, and is available at
495
+// http://www.eclipse.org/legal/epl-v20.html
496
+// SPDX-License-Identifier: EPL-2.0
497
+/****************************************************************************/
498
+/// @file Constants.h
499
+/// @author Martin Dippold
500
+/// @author Michael Behrisch
501
+/// @date July 2016
502
+/// @version $Id$
503
+///
504
+//
505
+/****************************************************************************/
506
+
507
+
508
+#ifndef PHEMlightCONSTANTS
509
#define PHEMlightCONSTANTS
510
511
#include <string>
512
diff --git b/src/foreign/PHEMlight/cpp/Helpers.cpp a/src/foreign/PHEMlight/cpp/Helpers.cpp
513
index b3872222ff..c3e6912ce8 100644
514
--- b/src/foreign/PHEMlight/cpp/Helpers.cpp
515
+++ a/src/foreign/PHEMlight/cpp/Helpers.cpp
516
@@ -1,4 +1,25 @@
517
-#include "Helpers.h"
518
+/****************************************************************************/
519
+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
520
+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.
521
+// PHEMlight module
522
+// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/
523
+// This program and the accompanying materials
524
+// are made available under the terms of the Eclipse Public License v2.0
525
+// which accompanies this distribution, and is available at
526
+// http://www.eclipse.org/legal/epl-v20.html
527
+// SPDX-License-Identifier: EPL-2.0
528
+/****************************************************************************/
529
+/// @file Helpers.cpp
530
+/// @author Martin Dippold
531
+/// @author Michael Behrisch
532
+/// @date July 2016
533
+/// @version $Id$
534
+///
535
+//
536
+/****************************************************************************/
537
+
538
+
539
+#include "Helpers.h"
540
#include "Constants.h"
541
542
543
diff --git b/src/foreign/PHEMlight/cpp/Helpers.h a/src/foreign/PHEMlight/cpp/Helpers.h
544
index 0f6ad8eefb..23b41471a2 100644
545
--- b/src/foreign/PHEMlight/cpp/Helpers.h
546
+++ a/src/foreign/PHEMlight/cpp/Helpers.h
547
@@ -1,4 +1,25 @@
548
-#ifndef PHEMlightHELPERS
549
+/****************************************************************************/
550
+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
551
+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.
552
+// PHEMlight module
553
+// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/
554
+// This program and the accompanying materials
555
+// are made available under the terms of the Eclipse Public License v2.0
556
+// which accompanies this distribution, and is available at
557
+// http://www.eclipse.org/legal/epl-v20.html
558
+// SPDX-License-Identifier: EPL-2.0
559
+/****************************************************************************/
560
+/// @file Helpers.h
561
+/// @author Martin Dippold
562
+/// @author Michael Behrisch
563
+/// @date July 2016
564
+/// @version $Id$
565
+///
566
+//
567
+/****************************************************************************/
568
+
569
+
570
+#ifndef PHEMlightHELPERS
571
#define PHEMlightHELPERS
572
573
#include <string>
574
575