Path: blob/main/src/foreign/PHEMlight/cpp/conversion.patch
169685 views
diff --git b/src/foreign/PHEMlight/cpp/CEP.cpp a/src/foreign/PHEMlight/cpp/CEP.cpp1index eafe2e787f..5a0aef688e 1006442--- b/src/foreign/PHEMlight/cpp/CEP.cpp3+++ a/src/foreign/PHEMlight/cpp/CEP.cpp4@@ -1,4 +1,25 @@5-#include "CEP.h"6+/****************************************************************************/7+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo8+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.9+// PHEMlight module10+// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/11+// This program and the accompanying materials12+// are made available under the terms of the Eclipse Public License v2.013+// which accompanies this distribution, and is available at14+// http://www.eclipse.org/legal/epl-v20.html15+// SPDX-License-Identifier: EPL-2.016+/****************************************************************************/17+/// @file CEP.cpp18+/// @author Martin Dippold19+/// @author Michael Behrisch20+/// @date July 201621+/// @version $Id$22+///23+//24+/****************************************************************************/25+26+27+#include "CEP.h"28#include "Constants.h"29#include "Helpers.h"3031@@ -6,6 +27,7 @@32namespace PHEMlightdll {3334CEP::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) {35+ (void)transmissionGearRatios; // just to make the compiler happy about the unused parameter36InitializeInstanceFields();37_resistanceF0 = f0;38_resistanceF1 = f1;39@@ -36,12 +58,12 @@ namespace PHEMlightdll {40std::vector<std::vector<double> > normalizedPollutantMeasures;4142// init pollutant identifiers43- for (int i = 0; i < headerLinePollutants.size(); i++) {44+ for (int i = 0; i < (int)headerLinePollutants.size(); i++) {45pollutantIdentifier.push_back(headerLinePollutants[i]);46}4748// initialize measures49- for (int i = 0; i < headerLinePollutants.size(); i++) {50+ for (int i = 0; i < (int)headerLinePollutants.size(); i++) {51pollutantMeasures.push_back(std::vector<double>());52normalizedPollutantMeasures.push_back(std::vector<double>());53}54@@ -50,7 +72,7 @@ namespace PHEMlightdll {55_speedCurveRotational = std::vector<double>();56_speedPatternRotational = std::vector<double>();57_gearTransmissionCurve = std::vector<double>();58- for (int i = 0; i < matrixSpeedRotational.size(); i++) {59+ for (int i = 0; i < (int)matrixSpeedRotational.size(); i++) {60if (matrixSpeedRotational[i].size() != 3) {61return;62}63@@ -63,7 +85,7 @@ namespace PHEMlightdll {64// looping through matrix and assigning values for drag table65_nNormTable = std::vector<double>();66_dragNormTable = std::vector<double>();67- for (int i = 0; i < normedDragTable.size(); i++) {68+ for (int i = 0; i < (int)normedDragTable.size(); i++) {69if (normedDragTable[i].size() != 2) {70return;71}72@@ -77,7 +99,7 @@ namespace PHEMlightdll {73_normedCepCurveFC = std::vector<double>();74_powerPatternFC = std::vector<double>();75_normalizedPowerPatternFC = std::vector<double>();76- for (int i = 0; i < matrixFC.size(); i++) {77+ for (int i = 0; i < (int)matrixFC.size(); i++) {78if (matrixFC[i].size() != 2) {79return;80}81@@ -110,10 +132,10 @@ namespace PHEMlightdll {8283_cepNormalizedCurvePollutants = std::map<std::string, std::vector<double> >();8485- int headerCount = headerLinePollutants.size();86- for (int i = 0; i < matrixPollutants.size(); i++) {87- for (int j = 0; j < matrixPollutants[i].size(); j++) {88- if (matrixPollutants[i].size() != headerCount + 1) {89+ int headerCount = (int)headerLinePollutants.size();90+ for (int i = 0; i < (int)matrixPollutants.size(); i++) {91+ for (int j = 0; j < (int)matrixPollutants[i].size(); j++) {92+ if ((int)matrixPollutants[i].size() != headerCount + 1) {93return;94}9596@@ -131,7 +153,7 @@ namespace PHEMlightdll {97_cepCurvePollutants = std::map<std::string, std::vector<double> >();98_idlingValuesPollutants = std::map<std::string, double>();99100- for (int i = 0; i < headerLinePollutants.size(); i++) {101+ for (int i = 0; i < (int)headerLinePollutants.size(); i++) {102_cepCurvePollutants.insert(std::make_pair(pollutantIdentifier[i], pollutantMeasures[i]));103_cepNormalizedCurvePollutants.insert(std::make_pair(pollutantIdentifier[i], normalizedPollutantMeasures[i]));104_idlingValuesPollutants.insert(std::make_pair(pollutantIdentifier[i], idlingPollutants[i] * pollutantMultiplyer));105@@ -211,7 +233,7 @@ namespace PHEMlightdll {106int upperIndex;107int lowerIndex;108109- if (VehicleClass->gettClass() != Constants::strBEV) {110+ if (_fuelType != Constants::strBEV) {111if (std::abs(speed) <= Constants::ZERO_SPEED_ACCURACY) {112if (pollutant == "FC") {113return _idlingValueFC;114@@ -353,14 +375,14 @@ namespace PHEMlightdll {115}116117if (value >= pattern.back()) {118- lowerIndex = pattern.size() - 1;119- upperIndex = pattern.size() - 1;120+ lowerIndex = (int)pattern.size() - 1;121+ upperIndex = (int)pattern.size() - 1;122return;123}124125// bisection search to find correct position in power pattern126- int middleIndex = (pattern.size() - 1) / 2;127- upperIndex = pattern.size() - 1;128+ int middleIndex = ((int)pattern.size() - 1) / 2;129+ upperIndex = (int)pattern.size() - 1;130lowerIndex = 0;131132while (upperIndex - lowerIndex > 1) {133diff --git b/src/foreign/PHEMlight/cpp/CEP.h a/src/foreign/PHEMlight/cpp/CEP.h134index f24983953b..84aa342689 100644135--- b/src/foreign/PHEMlight/cpp/CEP.h136+++ a/src/foreign/PHEMlight/cpp/CEP.h137@@ -1,4 +1,25 @@138-#ifndef PHEMlightCEP139+/****************************************************************************/140+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo141+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.142+// PHEMlight module143+// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/144+// This program and the accompanying materials145+// are made available under the terms of the Eclipse Public License v2.0146+// which accompanies this distribution, and is available at147+// http://www.eclipse.org/legal/epl-v20.html148+// SPDX-License-Identifier: EPL-2.0149+/****************************************************************************/150+/// @file CEP.h151+/// @author Martin Dippold152+/// @author Michael Behrisch153+/// @date July 2016154+/// @version $Id$155+///156+//157+/****************************************************************************/158+159+160+#ifndef PHEMlightCEP161#define PHEMlightCEP162163#define _USE_MATH_DEFINES164@@ -11,7 +32,6 @@165//C# TO C++ CONVERTER NOTE: Forward class declarations:166namespace PHEMlightdll { class Helpers; }167168-#define FLEET169170namespace PHEMlightdll {171class CEP {172diff --git b/src/foreign/PHEMlight/cpp/CEPHandler.cpp a/src/foreign/PHEMlight/cpp/CEPHandler.cpp173index 53a739894b..fa5ee8e2ae 100644174--- b/src/foreign/PHEMlight/cpp/CEPHandler.cpp175+++ a/src/foreign/PHEMlight/cpp/CEPHandler.cpp176@@ -1,4 +1,27 @@177-#include "CEPHandler.h"178+/****************************************************************************/179+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo180+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.181+// PHEMlight module182+// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/183+// This program and the accompanying materials184+// are made available under the terms of the Eclipse Public License v2.0185+// which accompanies this distribution, and is available at186+// http://www.eclipse.org/legal/epl-v20.html187+// SPDX-License-Identifier: EPL-2.0188+/****************************************************************************/189+/// @file CEPHandler.cpp190+/// @author Martin Dippold191+/// @author Michael Behrisch192+/// @date July 2016193+/// @version $Id$194+///195+//196+/****************************************************************************/197+198+199+#include <fstream>200+#include <sstream>201+#include "CEPHandler.h"202#include "CEP.h"203#include "Helpers.h"204#include "Constants.h"205@@ -10,11 +33,11 @@ namespace PHEMlightdll {206_ceps = std::map<std::string, CEP*>();207}208209- std::map<std::string, CEP*> CEPHandler::getCEPS() const {210+ const std::map<std::string, CEP*>& CEPHandler::getCEPS() const {211return _ceps;212}213214- bool CEPHandler::GetCEP(const std::string& DataPath, Helpers* Helper) {215+ bool CEPHandler::GetCEP(const std::vector<std::string>& DataPath, Helpers* Helper) {216if (getCEPS().find(Helper->getgClass()) == getCEPS().end()) {217if (!Load(DataPath, Helper)) {218return false;219@@ -23,11 +46,11 @@ namespace PHEMlightdll {220return true;221}222223- bool CEPHandler::Load(const std::string& DataPath, Helpers* Helper) {224+ bool CEPHandler::Load(const std::vector<std::string>& DataPath, Helpers* Helper) {225//Deklaration226// get string identifier for PHEM emission class227//C# TO C++ CONVERTER TODO TASK: There is no native C++ equivalent to 'ToString':228- std::string emissionRep = Helper->getgClass().ToString();229+ std::string emissionRep = Helper->getgClass();230231// to hold everything.232std::vector<std::vector<double> > matrixSpeedInertiaTable;233@@ -80,7 +103,7 @@ namespace PHEMlightdll {234return true;235}236237- 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) {238+ 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) {239vehicleMass = 0;240vehicleLoading = 0;241vehicleMassRot = 0;242@@ -111,12 +134,17 @@ namespace PHEMlightdll {243int dataCount = 0;244245//Open file246- std::string path = DataPath + std::string("\\") + emissionClass + std::string(".PHEMLight.veh");247- if (!File::Exists(path)) {248- Helper->setErrMsg(std::string("File do not exist! (") + path + std::string(")"));249+ std::ifstream vehicleReader;250+ for (std::vector<std::string>::const_iterator i = DataPath.begin(); i != DataPath.end(); i++) {251+ vehicleReader.open(((*i) + emissionClass + ".PHEMLight.veh").c_str());252+ if (vehicleReader.good()) {253+ break;254+ }255+ }256+ if (!vehicleReader.good()) {257+ Helper->setErrMsg("File does not exist! (" + emissionClass + ".PHEMLight.veh)");258return false;259}260- StreamReader* vehicleReader = File::OpenText(path);261262// skip header263ReadLine(vehicleReader);264@@ -262,11 +290,10 @@ namespace PHEMlightdll {265normedDragTable.push_back(todoubleList(split(line, ',')));266}267268- vehicleReader->Close();269return true;270}271272- 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) {273+ 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) {274// declare file stream275std::string line;276header = std::vector<std::string>();277@@ -278,18 +305,23 @@ namespace PHEMlightdll {278pollutantExtension += std::string("_FC");279}280281- std::string path = DataPath + std::string("\\") + emissionClass + pollutantExtension + std::string(".csv");282- if (!File::Exists(path)) {283- Helper->setErrMsg(std::string("File do not exist! (") + path + std::string(")"));284+ std::ifstream fileReader;285+ for (std::vector<std::string>::const_iterator i = DataPath.begin(); i != DataPath.end(); i++) {286+ fileReader.open(((*i) + emissionClass + pollutantExtension + ".csv").c_str());287+ if (fileReader.good()) {288+ break;289+ }290+ }291+ if (!fileReader.good()) {292+ Helper->setErrMsg("File does not exist! (" + emissionClass + pollutantExtension + ".csv)");293return false;294}295- StreamReader* fileReader = File::OpenText(path);296297// read header line for pollutant identifiers298if ((line = ReadLine(fileReader)) != "") {299- std::vector<std::string>& entries = split(line, ',');300+ std::vector<std::string> entries = split(line, ',');301// skip first entry "Pe"302- for (int i = 1; i < entries.size(); i++) {303+ for (int i = 1; i < (int)entries.size(); i++) {304header.push_back(entries[i]);305}306}307@@ -303,7 +335,7 @@ namespace PHEMlightdll {308//readIdlingValues309line = ReadLine(fileReader);310311- std::vector<std::string> stringIdlings = split(line, ',').ToList();312+ std::vector<std::string> stringIdlings = split(line, ',');313stringIdlings.erase(stringIdlings.begin());314315idlingValues = todoubleList(stringIdlings);316@@ -311,26 +343,38 @@ namespace PHEMlightdll {317while ((line = ReadLine(fileReader)) != "") {318matrix.push_back(todoubleList(split(line, ',')));319}320- fileReader->Close();321return true;322}323324std::vector<std::string> CEPHandler::split(const std::string& s, char delim) {325-//C# TO C++ CONVERTER TODO TASK: There is no direct native C++ equivalent to this .NET String method:326- return s.Split(delim).ToList();327+ std::vector<std::string> elems;328+ std::stringstream ss(s);329+ std::string item;330+ while (std::getline(ss, item, delim)) {331+ elems.push_back(item);332+ }333+ return elems;334}335336double CEPHandler::todouble(const std::string& s) {337- return static_cast<double>(s, CultureInfo::InvariantCulture);338+ std::stringstream ss(s);339+ double item;340+ ss >> item;341+ return item;342}343344- std::vector<double> CEPHandler::todoubleList(std::vector<std::string>& s) {345- return s.Select([&] (void* p) {346- todouble(p);347- }).Cast<double>().ToList();348+ std::vector<double> CEPHandler::todoubleList(const std::vector<std::string>& s) {349+ std::vector<double> result;350+ for (std::vector<std::string>::const_iterator i = s.begin(); i != s.end(); ++i) {351+ result.push_back(todouble(*i));352+ }353+ return result;354}355356- std::string CEPHandler::ReadLine(StreamReader* s) {357- return s->ReadLine();358+ std::string CEPHandler::ReadLine(std::ifstream& s) {359+ std::string line;360+ std::getline(s, line);361+ line.erase(line.find_last_not_of(" \n\r\t") + 1);362+ return line;363}364}365diff --git b/src/foreign/PHEMlight/cpp/CEPHandler.h a/src/foreign/PHEMlight/cpp/CEPHandler.h366index bd46d8d9b9..d2e0fd3fb6 100644367--- b/src/foreign/PHEMlight/cpp/CEPHandler.h368+++ a/src/foreign/PHEMlight/cpp/CEPHandler.h369@@ -1,4 +1,25 @@370-#ifndef PHEMlightCEPHANDLER371+/****************************************************************************/372+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo373+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.374+// PHEMlight module375+// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/376+// This program and the accompanying materials377+// are made available under the terms of the Eclipse Public License v2.0378+// which accompanies this distribution, and is available at379+// http://www.eclipse.org/legal/epl-v20.html380+// SPDX-License-Identifier: EPL-2.0381+/****************************************************************************/382+/// @file CEPHandler.h383+/// @author Martin Dippold384+/// @author Michael Behrisch385+/// @date July 2016386+/// @version $Id$387+///388+//389+/****************************************************************************/390+391+392+#ifndef PHEMlightCEPHANDLER393#define PHEMlightCEPHANDLER394395#include <string>396@@ -10,7 +31,6 @@397namespace PHEMlightdll { class CEP; }398namespace PHEMlightdll { class Helpers; }399400-#define FLEET401402namespace PHEMlightdll {403class CEPHandler {404@@ -28,14 +48,14 @@ namespace PHEMlightdll {405private:406std::map<std::string, CEP*> _ceps;407public:408- std::map<std::string, CEP*> getCEPS() const;409+ const std::map<std::string, CEP*>& getCEPS() const;410411412//--------------------------------------------------------------------------------------------------413// Methods414//--------------------------------------------------------------------------------------------------415416- bool GetCEP(const std::string& DataPath, Helpers* Helper);417+ bool GetCEP(const std::vector<std::string>& DataPath, Helpers* Helper);418419420//--------------------------------------------------------------------------------------------------421@@ -43,11 +63,11 @@ namespace PHEMlightdll {422//--------------------------------------------------------------------------------------------------423424private:425- bool Load(const std::string& DataPath, Helpers* Helper);426+ bool Load(const std::vector<std::string>& DataPath, Helpers* Helper);427428- 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);429+ 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);430431- 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);432+ 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);433434435//--------------------------------------------------------------------------------------------------436@@ -61,10 +81,10 @@ namespace PHEMlightdll {437double todouble(const std::string& s);438439//Convert string to double list440- std::vector<double> todoubleList(std::vector<std::string>& s);441+ std::vector<double> todoubleList(const std::vector<std::string>& s);442443//Read a line from file444- std::string ReadLine(StreamReader* s);445+ std::string ReadLine(std::ifstream& s);446};447}448449diff --git b/src/foreign/PHEMlight/cpp/Constants.cpp a/src/foreign/PHEMlight/cpp/Constants.cpp450index e534017678..936416fe08 100644451--- b/src/foreign/PHEMlight/cpp/Constants.cpp452+++ a/src/foreign/PHEMlight/cpp/Constants.cpp453@@ -1,4 +1,25 @@454-#include "Constants.h"455+/****************************************************************************/456+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo457+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.458+// PHEMlight module459+// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/460+// This program and the accompanying materials461+// are made available under the terms of the Eclipse Public License v2.0462+// which accompanies this distribution, and is available at463+// http://www.eclipse.org/legal/epl-v20.html464+// SPDX-License-Identifier: EPL-2.0465+/****************************************************************************/466+/// @file Constants.cpp467+/// @author Martin Dippold468+/// @author Michael Behrisch469+/// @date July 2016470+/// @version $Id$471+///472+//473+/****************************************************************************/474+475+476+#include "Constants.h"477478479namespace PHEMlightdll {480diff --git b/src/foreign/PHEMlight/cpp/Constants.h a/src/foreign/PHEMlight/cpp/Constants.h481index bd3387c15b..113c4247c7 100644482--- b/src/foreign/PHEMlight/cpp/Constants.h483+++ a/src/foreign/PHEMlight/cpp/Constants.h484@@ -1,4 +1,25 @@485-#ifndef PHEMlightCONSTANTS486+/****************************************************************************/487+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo488+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.489+// PHEMlight module490+// Copyright (C) 2016-2017 Technische Universitaet Graz, https://www.tugraz.at/491+// This program and the accompanying materials492+// are made available under the terms of the Eclipse Public License v2.0493+// which accompanies this distribution, and is available at494+// http://www.eclipse.org/legal/epl-v20.html495+// SPDX-License-Identifier: EPL-2.0496+/****************************************************************************/497+/// @file Constants.h498+/// @author Martin Dippold499+/// @author Michael Behrisch500+/// @date July 2016501+/// @version $Id$502+///503+//504+/****************************************************************************/505+506+507+#ifndef PHEMlightCONSTANTS508#define PHEMlightCONSTANTS509510#include <string>511diff --git b/src/foreign/PHEMlight/cpp/Helpers.cpp a/src/foreign/PHEMlight/cpp/Helpers.cpp512index b3872222ff..c3e6912ce8 100644513--- b/src/foreign/PHEMlight/cpp/Helpers.cpp514+++ a/src/foreign/PHEMlight/cpp/Helpers.cpp515@@ -1,4 +1,25 @@516-#include "Helpers.h"517+/****************************************************************************/518+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo519+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.520+// PHEMlight module521+// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/522+// This program and the accompanying materials523+// are made available under the terms of the Eclipse Public License v2.0524+// which accompanies this distribution, and is available at525+// http://www.eclipse.org/legal/epl-v20.html526+// SPDX-License-Identifier: EPL-2.0527+/****************************************************************************/528+/// @file Helpers.cpp529+/// @author Martin Dippold530+/// @author Michael Behrisch531+/// @date July 2016532+/// @version $Id$533+///534+//535+/****************************************************************************/536+537+538+#include "Helpers.h"539#include "Constants.h"540541542diff --git b/src/foreign/PHEMlight/cpp/Helpers.h a/src/foreign/PHEMlight/cpp/Helpers.h543index 0f6ad8eefb..23b41471a2 100644544--- b/src/foreign/PHEMlight/cpp/Helpers.h545+++ a/src/foreign/PHEMlight/cpp/Helpers.h546@@ -1,4 +1,25 @@547-#ifndef PHEMlightHELPERS548+/****************************************************************************/549+// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo550+// Copyright (C) 2016-2018 German Aerospace Center (DLR) and others.551+// PHEMlight module552+// Copyright 2016 Technische Universitaet Graz, https://www.tugraz.at/553+// This program and the accompanying materials554+// are made available under the terms of the Eclipse Public License v2.0555+// which accompanies this distribution, and is available at556+// http://www.eclipse.org/legal/epl-v20.html557+// SPDX-License-Identifier: EPL-2.0558+/****************************************************************************/559+/// @file Helpers.h560+/// @author Martin Dippold561+/// @author Michael Behrisch562+/// @date July 2016563+/// @version $Id$564+///565+//566+/****************************************************************************/567+568+569+#ifndef PHEMlightHELPERS570#define PHEMlightHELPERS571572#include <string>573574575