From be81fe8cc77881a46c7e9ee1651c58febc501c3c Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 28 Aug 2019 15:15:11 +0200 Subject: [PATCH] adding highway flag to cycle reader --- .../Reader/ComponentData/DrivingCycleDataReader.cs | 7 +++++-- .../Models/SimulationComponent/Data/DrivingCycleData.cs | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/VectoCore/VectoCore/InputData/Reader/ComponentData/DrivingCycleDataReader.cs b/VectoCore/VectoCore/InputData/Reader/ComponentData/DrivingCycleDataReader.cs index a67b9bd23d..3ecbf0a4a4 100644 --- a/VectoCore/VectoCore/InputData/Reader/ComponentData/DrivingCycleDataReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ComponentData/DrivingCycleDataReader.cs @@ -344,6 +344,7 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData public const string EngineTorque = "Me"; public const string TorqueConverterActive = "tc_active"; public const string PTOActive = "PTO"; + public const string Highway = "HW"; } #region DataParser @@ -433,7 +434,8 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData crossWindRequired ? row.ParseDouble(Fields.AirSpeedRelativeToVehicle).KMPHtoMeterPerSecond() : null, WindYawAngle = crossWindRequired ? row.ParseDoubleOrGetDefault(Fields.WindYawAngle) : 0, AuxiliarySupplyPower = row.GetAuxiliaries(), - PTOActive = table.Columns.Contains(Fields.PTOActive) && row.Field<string>(Fields.PTOActive) == "1" + PTOActive = table.Columns.Contains(Fields.PTOActive) && row.Field<string>(Fields.PTOActive) == "1", + Highway = table.Columns.Contains(Fields.Highway) && row.Field<string>(Fields.Highway) == "1" }); } @@ -453,7 +455,8 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData Fields.RoadGradient, Fields.AirSpeedRelativeToVehicle, Fields.WindYawAngle, - Fields.PTOActive + Fields.PTOActive, + Fields.Highway, }; const bool allowAux = true; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs index 523c879b7a..a1a86308d6 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/DrivingCycleData.cs @@ -178,6 +178,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data /// </summary> public Meter Altitude; + /// <summary> + /// this section of the cycle is considered to be highway driving (used for PCC atm) + /// </summary> + public bool Highway; + /// <summary> /// Required for distance-based cycles. Not used in time based cycles. "stop" defines the time the vehicle spends in stop phases. /// </summary> -- GitLab