diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs index 4c680443814b8c0afda04b06a366e3cdae7b7569..22b3891cf49d3e3ab87d1e7c7b418a2eee5c53a7 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs @@ -181,7 +181,6 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl { var vehicle = InputDataProvider.JobInputData.Vehicle; - var adasCombination = DeclarationData.ADASCombinations.Lookup(vehicle.ADAS); foreach (var mission in _segment.Missions) { if (mission.MissionType.IsEMS() && _engineData.RatedPowerDeclared.IsSmaller(DeclarationData.MinEnginePowerForEMS)) { @@ -226,8 +225,6 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl mission.MissionType.GetNonEMSMissionType(), _engineData.WHTCRural, _engineData.WHTCUrban, _engineData.WHTCMotorway) * _engineData.ColdHotCorrectionFactor * _engineData.CorrectionFactorRegPer; - simulationRunData.EngineData.ADASCorrectionFactor = DeclarationData.ADASBenefits.Lookup( - _segment.VehicleClass, adasCombination, mission.MissionType, loading.Key); simulationRunData.VehicleData.VehicleClass = _segment.VehicleClass; yield return simulationRunData; } diff --git a/VectoCore/VectoCore/Models/Declaration/ADASBenefits.cs b/VectoCore/VectoCore/Models/Declaration/ADASBenefits.cs deleted file mode 100644 index a285c6dc5cd58d2a91135daf6a18d6e5843a3f0d..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Models/Declaration/ADASBenefits.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 European Union -* -* Developed by Graz University of Technology, -* Institute of Internal Combustion Engines and Thermodynamics, -* Institute of Technical Informatics -* -* VECTO is licensed under the EUPL, Version 1.1 or - as soon they will be approved -* by the European Commission - subsequent versions of the EUPL (the "Licence"); -* You may not use VECTO except in compliance with the Licence. -* You may obtain a copy of the Licence at: -* -* https://joinup.ec.europa.eu/community/eupl/og_page/eupl -* -* Unless required by applicable law or agreed to in writing, VECTO -* distributed under the Licence is distributed on an "AS IS" basis, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the Licence for the specific language governing permissions and -* limitations under the Licence. -* -* Authors: -* Stefan Hausberger, hausberger@ivt.tugraz.at, IVT, Graz University of Technology -* Christian Kreiner, christian.kreiner@tugraz.at, ITI, Graz University of Technology -* Michael Krisper, michael.krisper@tugraz.at, ITI, Graz University of Technology -* Raphael Luz, luz@ivt.tugraz.at, IVT, Graz University of Technology -* Markus Quaritsch, markus.quaritsch@tugraz.at, IVT, Graz University of Technology -* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology -*/ - -using System; -using System.Collections.Generic; -using System.Data; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.Utils; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.Declaration -{ - public sealed class ADASBenefits : LookupData<VehicleClass, ADASCombination, MissionType, LoadingType, double> - { - private readonly Dictionary<Tuple<VehicleClass, ADASCombination>, Dictionary<Tuple<MissionType, LoadingType>, double>> _data = new Dictionary<Tuple<VehicleClass, ADASCombination>, Dictionary<Tuple<MissionType, LoadingType>, double>>(); - - #region Overrides of LookupData - - public override double Lookup(VehicleClass group, ADASCombination adasCombination, MissionType mission, LoadingType loading) - { - var groupAndAdas = Tuple.Create(group, adasCombination); - var missionAndLoading = Tuple.Create(mission, loading); - if (!_data.ContainsKey(groupAndAdas)) { - return 1.0; - } - if (!_data[groupAndAdas].ContainsKey(missionAndLoading)) { - return 1.0; - } - return _data[groupAndAdas][missionAndLoading]; - } - - protected override string ResourceId { get { return DeclarationData.DeclarationDataResourcePrefix + ".ADAS.ADAS_Benefits.csv"; } } - protected override string ErrorMessage { get { return "ADAS Benefits Lookup Error: No value found."; } } - protected override void ParseData(DataTable table) - { - var loadingTypes = new[] { LoadingType.LowLoading, LoadingType.ReferenceLoad }; - foreach (DataRow row in table.Rows) { - var groupAndAdas = Tuple.Create(VehicleClassHelper.Parse(row.Field<string>("vehiclegroup")), new ADASCombination() { ID = row.Field<string>("adascombination")}); - if (!_data.ContainsKey(groupAndAdas)) { - _data[groupAndAdas] = new Dictionary<Tuple<MissionType, LoadingType>, double>(); - } - foreach (var missionType in new[] { MissionType.LongHaul, MissionType.LongHaulEMS, MissionType.RegionalDelivery, MissionType.RegionalDeliveryEMS, MissionType.UrbanDelivery}) { - var benefits = row.Field<string>(missionType.GetName()); - if (string.IsNullOrWhiteSpace(benefits)) { - continue; - } - - var benefitsPerLoading = benefits.Split('/'); - for (var i = 0; i < loadingTypes.Length; i++) { - var cycleAndPayload = Tuple.Create(missionType, loadingTypes[i]); - _data[groupAndAdas][cycleAndPayload] = BenefitFacor(benefitsPerLoading[i]); - } - } - } - } - - private double BenefitFacor(string benefitStr) - { - var benefit = benefitStr.Replace("%", "").ToDouble(); - return 1 + benefit / 100.0; - } - - #endregion - - } -} diff --git a/VectoCore/VectoCore/Models/Declaration/ADASCombinations.cs b/VectoCore/VectoCore/Models/Declaration/ADASCombinations.cs deleted file mode 100644 index f76826c7cde3426b14dcb39febd95a0db92bb44c..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Models/Declaration/ADASCombinations.cs +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This file is part of VECTO. -* -* Copyright © 2012-2019 European Union -* -* Developed by Graz University of Technology, -* Institute of Internal Combustion Engines and Thermodynamics, -* Institute of Technical Informatics -* -* VECTO is licensed under the EUPL, Version 1.1 or - as soon they will be approved -* by the European Commission - subsequent versions of the EUPL (the "Licence"); -* You may not use VECTO except in compliance with the Licence. -* You may obtain a copy of the Licence at: -* -* https://joinup.ec.europa.eu/community/eupl/og_page/eupl -* -* Unless required by applicable law or agreed to in writing, VECTO -* distributed under the Licence is distributed on an "AS IS" basis, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the Licence for the specific language governing permissions and -* limitations under the Licence. -* -* Authors: -* Stefan Hausberger, hausberger@ivt.tugraz.at, IVT, Graz University of Technology -* Christian Kreiner, christian.kreiner@tugraz.at, ITI, Graz University of Technology -* Michael Krisper, michael.krisper@tugraz.at, ITI, Graz University of Technology -* Raphael Luz, luz@ivt.tugraz.at, IVT, Graz University of Technology -* Markus Quaritsch, markus.quaritsch@tugraz.at, IVT, Graz University of Technology -* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology -*/ - -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using TUGraz.VectoCommon.Exceptions; -using TUGraz.VectoCommon.InputData; -using TUGraz.VectoCore.Models.SimulationComponent.Data; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.Declaration -{ - - public struct ADASCombination - { - public string ID; - } - public sealed class ADASCombinations : LookupData<bool, EcoRollType, PredictiveCruiseControlType, ADASCombination> - { - private readonly List<Entry> _combinations = new List<Entry>(); - - #region Overrides of LookupData - - public override ADASCombination Lookup(bool enginestopstart, EcoRollType ecoRoll, PredictiveCruiseControlType pcc) - { - try { - var entry = _combinations.First( - x => x.EngineStopStart == enginestopstart && x.EcoRoll == ecoRoll && - x.PCCType == pcc); - return new ADASCombination {ID = entry.ADASCombination}; - } catch (Exception ) { - throw new VectoException(string.Format(ErrorMessage, enginestopstart, ecoRoll, pcc)); - } - } - - protected override string ResourceId - { - get { return DeclarationData.DeclarationDataResourcePrefix + ".ADAS.ADAS_Combinations.csv"; } - } - - protected override string ErrorMessage - { - get { - return - "ADAS Combination Lookup Error: No entry found for engine stop/start: {0}, eco roll: {1}, PCC: {2}"; - } - } - - protected override void ParseData(DataTable table) - { - foreach (DataRow row in table.Rows) { - _combinations.Add(new Entry() { - EngineStopStart = row.ParseBoolean("enginestopstart"), - EcoRoll = EcorollTypeHelper.Get(row.ParseBoolean("ecorollwithoutenginestop"), row.ParseBoolean("ecorollwithenginestop")), - PCCType = PredictiveCruiseControlTypeHelper.Parse(row.Field<string>("predictivecruisecontrol")), - ADASCombination = row.Field<string>("adascombination") - }); - } - } - - #endregion - - public struct Entry - { - public bool EngineStopStart; - public EcoRollType EcoRoll; - public PredictiveCruiseControlType PCCType; - public string ADASCombination; - - } - - public ADASCombination Lookup(IAdvancedDriverAssistantSystemDeclarationInputData adas) - { - return Lookup( - adas.EngineStopStart, adas.EcoRoll, adas.PredictiveCruiseControl); - } - - internal ADASCombination Lookup(VehicleData.ADASData adas) - { - return Lookup( - adas.EngineStopStart, adas.EcoRoll, adas.PredictiveCruiseControl); - } - } -} diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs index 31010b77dc19219c5b8d7ce36a54d3b0d442940b..22e6e42d3485720b10f48fa6f4d0681d5006d85e 100644 --- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs +++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs @@ -79,8 +79,6 @@ namespace TUGraz.VectoCore.Models.Declaration public static readonly PTOTransmission PTOTransmission = new PTOTransmission(); public const double LossMapExtrapolationFactor = 3; - public static readonly ADASCombinations ADASCombinations = new ADASCombinations(); - public static readonly ADASBenefits ADASBenefits = new ADASBenefits(); public static readonly WeightingGroups WeightingGroup = new WeightingGroups(); public static readonly WeightingFactors WeightingFactors = new WeightingFactors(); diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/CombustionEngineData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/CombustionEngineData.cs index f740f75e8c1174ebec885bf0529f99b37a61f671..d6bd674bc6945725ef424dfff546a0b6ad5b0064 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/CombustionEngineData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/CombustionEngineData.cs @@ -74,8 +74,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data public double FuelConsumptionCorrectionFactor { get; internal set; } - public double ADASCorrectionFactor { get; internal set; } - public PerSecond RatedSpeedDeclared { get; internal set; } public Watt RatedPowerDeclared { get; internal set; } @@ -91,7 +89,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data WHTCRural = 1; CorrectionFactorRegPer = 1; FuelConsumptionCorrectionFactor = 1; - ADASCorrectionFactor = 1; } public CombustionEngineData Copy() @@ -114,7 +111,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data RatedSpeedDeclared = RatedSpeedDeclared, MaxTorqueDeclared = MaxTorqueDeclared, FuelData = FuelData, - ADASCorrectionFactor = ADASCorrectionFactor, CertificationNumber = CertificationNumber, CertificationMethod = CertificationMethod, }; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs index 3511dfeedaed693a8442d97cb8f7d339e5368f32..ba9ab3c98237f3433e74751e9080aa538b68264a 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs @@ -405,14 +405,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl advancedAux.DoWriteModalResults(container); fcAAUX = advancedAux.AAuxFuelConsumption; } - var fcADAS = fcAAUX * ModelData.ADASCorrectionFactor; - var fcFinal = fcADAS; + var fcFinal = fcAAUX; container[ModalResultField.FCMap] = fc; container[ModalResultField.FCNCVc] = fcNCVcorr; container[ModalResultField.FCWHTCc] = fcWHTC; container[ModalResultField.FCAAUX] = fcAAUX; - container[ModalResultField.FCADAS] = fcADAS; container[ModalResultField.FCFinal] = fcFinal; } diff --git a/VectoCore/VectoCore/OutputData/SummaryDataContainer.cs b/VectoCore/VectoCore/OutputData/SummaryDataContainer.cs index 2cd0e98b3189a3c98b4879fda4864b1b71f1e986..97e626fd4f3a1ff245a1590a91c37a8e78c3c0b4 100644 --- a/VectoCore/VectoCore/OutputData/SummaryDataContainer.cs +++ b/VectoCore/VectoCore/OutputData/SummaryDataContainer.cs @@ -206,7 +206,7 @@ namespace TUGraz.VectoCore.OutputData public const string DECLARED_FZISO_AXLE3 = "Declared FzISO axle 3 [N]"; public const string DECLARED_RRC_AXLE4 = "Declared RRC axle 4 [-]"; public const string DECLARED_FZISO_AXLE4 = "Declared FzISO axle 4 [N]"; - public const string ADAS_TECHNOLOGY_COMBINATION = "ADAS technology combination [-]"; + //public const string ADAS_TECHNOLOGY_COMBINATION = "ADAS technology combination [-]"; public const string PTO_TECHNOLOGY = "PTOShaftsGearWheels"; @@ -323,7 +323,7 @@ namespace TUGraz.VectoCore.OutputData typeof(string)), Tuple.Create(string.Format(AUX_TECH_FORMAT, Constants.Auxiliaries.IDs.PneumaticSystem), typeof(string)), Tuple.Create(string.Format(AUX_TECH_FORMAT, Constants.Auxiliaries.IDs.ElectricSystem), typeof(string)), - Tuple.Create(ADAS_TECHNOLOGY_COMBINATION, typeof(string)), + //Tuple.Create(ADAS_TECHNOLOGY_COMBINATION, typeof(string)), Tuple.Create(PTO_TECHNOLOGY, typeof(string)), //Tuple.Create(PTO_OTHER_ELEMENTS, typeof(string)), @@ -712,7 +712,7 @@ namespace TUGraz.VectoCore.OutputData row[R_DYN] = (ConvertedSI)data.DynamicTyreRadius; - row[ADAS_TECHNOLOGY_COMBINATION] = data.ADAS != null ? DeclarationData.ADASCombinations.Lookup(data.ADAS).ID : ""; + //row[ADAS_TECHNOLOGY_COMBINATION] = data.ADAS != null ? DeclarationData.ADASCombinations.Lookup(data.ADAS).ID : ""; } private static void WriteAirdragData(AirdragData data, DataRow row) diff --git a/VectoCore/VectoCore/Resources/Declaration/ADAS/ADAS_Benefits.csv b/VectoCore/VectoCore/Resources/Declaration/ADAS/ADAS_Benefits.csv deleted file mode 100644 index 59ae667815c76d1f39ace918d974027b5f16eac2..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Resources/Declaration/ADAS/ADAS_Benefits.csv +++ /dev/null @@ -1,72 +0,0 @@ -Vehicle Group , ADAS Combination , LongHaul , LongHaul EMS , Regional Delivery , Regional Delivery EMS , Urban Delivery -4 , 1 , -0.1%/0.0% , , -0.5%/-0.5% , , -1.5%/-1.2% -4 , 2 , 0.0%/0.0% , , -0.1%/-0.1% , , 0.0%/0.0% -4 , 3 , 0.0%/-0.1% , , -0.1%/-0.2% , , 0.0%/0.0% -4 , 4/1 , -0.1%/-0.4% , , 0.0%/-0.1% , , 0.0%/0.0% -4 , 4/2 , -0.1%/-0.5% , , -0.1%/-0.2% , , 0.0%/0.0% -4 , 5 , -0.1%/-0.1% , , -0.6%/-0.6% , , -1.5%/-1.2% -4 , 6 , -0.1%/-0.1% , , -0.6%/-0.7% , , -1.5%/-1.2% -4 , 7/1 , -0.1%/-0.4% , , -0.5%/-0.6% , , -1.5%/-1.2% -4 , 7/2 , -0.1%/-0.6% , , -0.6%/-0.7% , , -1.5%/-1.2% -4 , 8/1 , -0.1%/-0.4% , , -0.1%/-0.2% , , 0.0%/0.0% -4 , 8/2 , -0.1%/-0.5% , , -0.1%/-0.3% , , 0.0%/0.0% -4 , 9/1 , -0.1%/-0.4% , , -0.2%/-0.3% , , 0.0%/0.0% -4 , 9/2 , -0.1%/-0.5% , , -0.2%/-0.4% , , 0.0%/0.0% -4 , 10/1 , -0.2%/-0.4% , , -0.6%/-0.7% , , -1.5%/-1.2% -4 , 10/2 , -0.2%/-0.6% , , -0.6%/-0.7% , , -1.5%/-1.2% -4 , 11/1 , -0.2%/-0.4% , , -0.7%/-0.8% , , -1.5%/-1.2% -4 , 11/2 , -0.2%/-0.6% , , -0.7%/-0.8% , , -1.5%/-1.2% -#---------------------------------------------------------------------------------------------------------------------------- -5 , 1 , -0.1%/0.0% , 0.0%/0.0% , -0.4%/-0.3% , -0.3%/-0.2% , -1.8%/-1.3% -5 , 2 , 0.0%/-0.1% , 0.0%/-0.1% , -0.1%/-0.1% , -0.2%/0.0% , 0.0%/0.0% -5 , 3 , -0.1%/-0.2% , 0.0%/-0.1% , -0.2%/-0.2% , -0.3%/-0.1% , 0.0%/0.0% -5 , 4/1 , -0.2%/-0.5% , -0.2%/-0.1% , -0.2%/-0.6% , -0.3%/-0.5% , 0.0%/0.0% -5 , 4/2 , -0.2%/-0.7% , -0.3%/-0.3% , -0.4%/-0.9% , -0.5%/-0.8% , 0.0%/0.0% -5 , 5 , -0.1%/-0.1% , 0.0%/-0.1% , -0.5%/-0.4% , -0.5%/-0.3% , -1.8%/-1.3% -5 , 6 , -0.1%/-0.2% , -0.1%/-0.2% , -0.6%/-0.5% , -0.6%/-0.4% , -1.8%/-1.3% -5 , 7/1 , -0.2%/-0.5% , -0.3%/-0.1% , -0.6%/-0.9% , -0.7%/-0.8% , -1.8%/-1.3% -5 , 7/2 , -0.3%/-0.7% , -0.3%/-0.4% , -0.8%/-1.3% , -0.8%/-1.1% , -1.8%/-1.3% -5 , 8/1 , -0.2%/-0.6% , -0.2%/-0.1% , -0.3%/-0.7% , -0.5%/-0.5% , 0.0%/0.0% -5 , 8/2 , -0.2%/-0.7% , -0.3%/-0.4% , -0.4%/-1.0% , -0.7%/-0.8% , 0.0%/0.0% -5 , 9/1 , -0.2%/-0.6% , -0.3%/-0.2% , -0.4%/-0.8% , -0.6%/-0.6% , 0.0%/0.0% -5 , 9/2 , -0.2%/-0.8% , -0.3%/-0.4% , -0.5%/-1.1% , -0.7%/-0.9% , 0.0%/0.0% -5 , 10/1 , -0.2%/-0.6% , -0.3%/-0.2% , -0.7%/-1.0% , -0.8%/-0.8% , -1.8%/-1.3% -5 , 10/2 , -0.3%/-0.8% , -0.3%/-0.4% , -0.8%/-1.3% , -1.0%/-1.1% , -1.8%/-1.3% -5 , 11/1 , -0.3%/-0.7% , -0.3%/-0.2% , -0.8%/-1.1% , -0.9%/-0.9% , -1.8%/-1.3% -5 , 11/2 , -0.3%/-0.8% , -0.4%/-0.5% , -0.9%/-1.4% , -1.0%/-1.2% , -1.8%/-1.3% -#---------------------------------------------------------------------------------------------------------------------------- -9 , 1 , -0.1%/0.0% , 0.0%/0.0% , -0.5%/-0.4% , -0.3%/-0.2% , -9 , 2 , 0.0%/-0.1% , 0.0%/0.0% , -0.1%/-0.1% , 0.0%/0.0% , -9 , 3 , 0.0%/-0.2% , 0.0%/-0.1% , -0.2%/-0.2% , -0.2%/-0.2% , -9 , 4/1 , -0.1%/-0.4% , -0.2%/-0.1% , -0.1%/-0.3% , -0.3%/-0.6% , -9 , 4/2 , -0.1%/-0.6% , -0.3%/-0.3% , -0.2%/-0.5% , -0.5%/-0.9% , -9 , 5 , -0.1%/-0.1% , -0.1%/-0.1% , -0.6%/-0.5% , -0.3%/-0.3% , -9 , 6 , -0.1%/-0.2% , -0.1%/-0.2% , -0.7%/-0.6% , -0.5%/-0.4% , -9 , 7/1 , -0.2%/-0.5% , -0.3%/-0.1% , -0.6%/-0.7% , -0.6%/-0.8% , -9 , 7/2 , -0.2%/-0.6% , -0.3%/-0.4% , -0.7%/-0.9% , -0.8%/-1.1% , -9 , 8/1 , -0.1%/-0.5% , -0.2%/-0.1% , -0.2%/-0.4% , -0.3%/-0.6% , -9 , 8/2 , -0.1%/-0.7% , -0.3%/-0.4% , -0.2%/-0.5% , -0.5%/-0.9% , -9 , 9/1 , -0.1%/-0.6% , -0.3%/-0.2% , -0.3%/-0.5% , -0.4%/-0.7% , -9 , 9/2 , -0.2%/-0.7% , -0.3%/-0.4% , -0.3%/-0.6% , -0.6%/-1.0% , -9 , 10/1 , -0.2%/-0.5% , -0.3%/-0.2% , -0.6%/-0.8% , -0.6%/-0.8% , -9 , 10/2 , -0.2%/-0.7% , -0.3%/-0.4% , -0.7%/-0.9% , -0.8%/-1.1% , -9 , 11/1 , -0.2%/-0.6% , -0.3%/-0.2% , -0.7%/-0.9% , -0.7%/-0.9% , -9 , 11/2 , -0.2%/-0.8% , -0.3%/-0.4% , -0.8%/-1.0% , -0.9%/-1.2% , -#---------------------------------------------------------------------------------------------------------------------------- -10 , 1 , -0.1%/0.0% , 0.0%/0.0% , -0.4%/-0.3% , -0.3%/-0.2% , -10 , 2 , 0.0%/-0.1% , 0.0%/0.0% , -0.1%/-0.1% , 0.0%/0.0% , -10 , 3 , -0.1%/-0.2% , 0.0%/-0.1% , -0.2%/-0.2% , -0.2%/-0.1% , -10 , 4/1 , -0.2%/-0.5% , -0.2%/-0.1% , -0.3%/-0.6% , -0.4%/-0.6% , -10 , 4/2 , -0.2%/-0.7% , -0.3%/-0.4% , -0.4%/-0.9% , -0.6%/-0.9% , -10 , 5 , -0.1%/-0.1% , 0.0%/-0.1% , -0.5%/-0.4% , -0.4%/-0.2% , -10 , 6 , -0.1%/-0.2% , -0.1%/-0.2% , -0.6%/-0.5% , -0.5%/-0.3% , -10 , 7/1 , -0.2%/-0.5% , -0.3%/-0.1% , -0.6%/-1.0% , -0.7%/-0.8% , -10 , 7/2 , -0.3%/-0.7% , -0.4%/-0.4% , -0.8%/-1.3% , -0.9%/-1.1% , -10 , 8/1 , -0.2%/-0.5% , -0.2%/-0.1% , -0.3%/-0.7% , -0.4%/-0.6% , -10 , 8/2 , -0.2%/-0.7% , -0.3%/-0.4% , -0.4%/-1.0% , -0.6%/-0.9% , -10 , 9/1 , -0.2%/-0.6% , -0.3%/-0.2% , -0.4%/-0.8% , -0.5%/-0.7% , -10 , 9/2 , -0.3%/-0.8% , -0.3%/-0.4% , -0.5%/-1.1% , -0.7%/-1.0% , -10 , 10/1 , -0.3%/-0.6% , -0.3%/-0.2% , -0.7%/-1.0% , -0.7%/-0.8% , -10 , 10/2 , -0.3%/-0.8% , -0.4%/-0.4% , -0.8%/-1.3% , -0.9%/-1.1% , -10 , 11/1 , -0.3%/-0.6% , -0.3%/-0.2% , -0.8%/-1.1% , -0.8%/-0.9% , -10 , 11/2 , -0.3%/-0.8% , -0.4%/-0.5% , -0.9%/-1.4% , -1.0%/-1.2% , \ No newline at end of file diff --git a/VectoCore/VectoCore/Resources/Declaration/ADAS/ADAS_Combinations.csv b/VectoCore/VectoCore/Resources/Declaration/ADAS/ADAS_Combinations.csv deleted file mode 100644 index 4f76f54e18bc27cdd614cd4663097608f3591e02..0000000000000000000000000000000000000000 --- a/VectoCore/VectoCore/Resources/Declaration/ADAS/ADAS_Combinations.csv +++ /dev/null @@ -1,19 +0,0 @@ -ADAS Combination , Engine Stop Start , EcoRoll without Engine Stop , EcoRoll with Engine Stop , Predictive Cruise Control -0 , 0 , 0 , 0 , none -1 , 1 , 0 , 0 , none -2 , 0 , 1 , 0 , none -3 , 0 , 0 , 1 , none -4/1 , 0 , 0 , 0 , "1_2" -4/2 , 0 , 0 , 0 , "1_2_3" -5 , 1 , 1 , 0 , none -6 , 1 , 0 , 1 , none -7/1 , 1 , 0 , 0 , "1_2" -7/2 , 1 , 0 , 0 , "1_2_3" -8/1 , 0 , 1 , 0 , "1_2" -8/2 , 0 , 1 , 0 , "1_2_3" -9/1 , 0 , 0 , 1 , "1_2" -9/2 , 0 , 0 , 1 , "1_2_3" -10/1 , 1 , 1 , 0 , "1_2" -10/2 , 1 , 1 , 0 , "1_2_3" -11/1 , 1 , 0 , 1 , "1_2" -11/2 , 1 , 0 , 1 , "1_2_3" \ No newline at end of file diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index 8585399bfe5901e81cc098ea2c76a9e53b8fadd1..5d2ac77325492a3bbb235b1c3d56316722667552 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -319,8 +319,6 @@ <Compile Include="InputData\Reader\Impl\EngineeringModeVectoRunDataFactory.cs" /> <Compile Include="InputData\Reader\Impl\EngineOnlyVectoRunDataFactory.cs" /> <Compile Include="InputData\Reader\ShiftPolygonReader.cs" /> - <Compile Include="Models\Declaration\ADASBenefits.cs" /> - <Compile Include="Models\Declaration\ADASCombinations.cs" /> <Compile Include="Models\Declaration\AuxDemandEntry.cs" /> <Compile Include="Models\Declaration\AuxiliaryTypeHelper.cs" /> <Compile Include="Models\Connector\Ports\IDriverDemandPort.cs" /> @@ -618,8 +616,6 @@ <EmbeddedResource Include="Resources\XSD\VectoOutputCustomer.0.7.xsd"> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="Resources\Declaration\ADAS\ADAS_Benefits.csv" /> - <EmbeddedResource Include="Resources\Declaration\ADAS\ADAS_Combinations.csv" /> <EmbeddedResource Include="Resources\Declaration\CO2Standards\MissionProfileWeights.csv" /> <EmbeddedResource Include="Resources\Declaration\CO2Standards\WeightingGroups.csv" /> <EmbeddedResource Include="Resources\Declaration\TyreLabeling.csv" /> diff --git a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs index e9eb84f86ff0a413b8875a406b3b906d77af638c..1f0d41ea4cf1c124af84206f343c36bede84c5c0 100644 --- a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs +++ b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs @@ -1988,73 +1988,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration CollectionAssert.AreEqual(withSTT1, runs[9].VehicleData.AxleData.Select(a => a.Inertia.Value())); } - [TestCase(false, false, false, PredictiveCruiseControlType.None, "0"), - TestCase(true, false, false, PredictiveCruiseControlType.None, "1"), - TestCase(true, false, false, PredictiveCruiseControlType.Option_1_2_3, "7/2"), - TestCase(true, true, false, PredictiveCruiseControlType.Option_1_2, "10/1")] - public void TestADASCombinationLookup( - bool engineStopStart, bool ecoRollWOEngineStop, bool ecoRollWEngineStop, PredictiveCruiseControlType pcc, - string expectedADASGroup) - { - var adas = DeclarationData.ADASCombinations.Lookup(engineStopStart, EcorollTypeHelper.Get(ecoRollWOEngineStop, ecoRollWEngineStop), pcc); - Assert.AreEqual(adas.ID, expectedADASGroup); - } - - [TestCase(true, true, true, PredictiveCruiseControlType.Option_1_2), - TestCase(true, true, true, PredictiveCruiseControlType.None)] - public void TestInvalidADASCombinationLookup( - bool engineStopStart, bool ecoRollWOEngineStop, bool ecoRollWEngineStop, PredictiveCruiseControlType pcc) - { - AssertHelper.Exception<VectoException>(() => { - DeclarationData.ADASCombinations.Lookup(engineStopStart, EcorollTypeHelper.Get(ecoRollWOEngineStop, ecoRollWEngineStop), pcc); - }); - } - - - [TestCase(VehicleClass.Class4, "0", MissionType.LongHaul, LoadingType.LowLoading, 0.0), - TestCase(VehicleClass.Class5, "0", MissionType.LongHaul, LoadingType.LowLoading, 0.0), - TestCase(VehicleClass.Class9, "0", MissionType.LongHaul, LoadingType.LowLoading, 0.0), - TestCase(VehicleClass.Class10, "0", MissionType.LongHaul, LoadingType.LowLoading, 0.0), - TestCase(VehicleClass.Class4, "4/1", MissionType.LongHaul, LoadingType.ReferenceLoad, -0.4), - TestCase(VehicleClass.Class4, "8/2", MissionType.LongHaul, LoadingType.LowLoading, -0.1), - TestCase(VehicleClass.Class4, "11/1", MissionType.RegionalDelivery, LoadingType.ReferenceLoad, -0.8), - TestCase(VehicleClass.Class5, "3", MissionType.LongHaul, LoadingType.ReferenceLoad, -0.2), - TestCase(VehicleClass.Class5, "5", MissionType.RegionalDelivery, LoadingType.ReferenceLoad, -0.4), - TestCase(VehicleClass.Class5, "11/1", MissionType.UrbanDelivery, LoadingType.ReferenceLoad, -1.3), - TestCase(VehicleClass.Class9, "1", MissionType.RegionalDeliveryEMS, LoadingType.ReferenceLoad, -0.2), - TestCase(VehicleClass.Class9, "6", MissionType.LongHaulEMS, LoadingType.ReferenceLoad, -0.2), - TestCase(VehicleClass.Class9, "10/1", MissionType.LongHaul, LoadingType.ReferenceLoad, -0.5), - TestCase(VehicleClass.Class10, "2", MissionType.LongHaul, LoadingType.ReferenceLoad, -0.1), - TestCase(VehicleClass.Class10, "4/2", MissionType.RegionalDeliveryEMS, LoadingType.LowLoading, -0.6), - TestCase(VehicleClass.Class10, "11/2", MissionType.RegionalDelivery, LoadingType.ReferenceLoad, -1.4) - - ] - public void TestADASBenefitLookup( - VehicleClass group, string adasConfig, MissionType mission, LoadingType loading, double expectedBenefit) - { - var expectedCorrectionFactor = 1 + expectedBenefit / 100.0; - var factor = DeclarationData.ADASBenefits.Lookup( - group, new ADASCombination() { ID = adasConfig }, mission, loading); - Assert.AreEqual(expectedCorrectionFactor, factor, 1e-6, "group: {0}, adas: {1}, mission: {2}, payload: {3}, expectedBenefit: {4}, actualBenefit: {5}", - group, adasConfig, mission, loading, expectedBenefit, (factor - 1)*100.0); - } - - [TestCase(VehicleClass.Class4, "3", MissionType.LongHaul, LoadingType.FullLoading), - TestCase(VehicleClass.Class4, "5", MissionType.LongHaulEMS, LoadingType.LowLoading), - TestCase(VehicleClass.Class7, "10/1", MissionType.LongHaul, LoadingType.LowLoading), - TestCase(VehicleClass.Class8, "2", MissionType.RegionalDelivery, LoadingType.LowLoading), - ] - public void TestIvalidADASBenefitLookup( - VehicleClass group, string adasConfig, MissionType mission, LoadingType loading) - { - var expectedBenefit = 0.0; - var expectedCorrectionFactor = 1 + expectedBenefit / 100.0; - var factor = DeclarationData.ADASBenefits.Lookup( - group, new ADASCombination() { ID = adasConfig }, mission, loading); - Assert.AreEqual(expectedCorrectionFactor, factor, 1e-6, "group: {0}, adas: {1}, mission: {2}, payload: {3}, expectedBenefit: {4}, actualBenefit: {5}", - group, adasConfig, mission, loading, expectedBenefit, (factor - 1) * 100.0); - } - + [ TestCase("Diesel CI", null, 1.0), TestCase("Ethanol CI", null, 1.011811),