From 64f5ed522ec3d517e3c520faa84fa3aa5f73cafa Mon Sep 17 00:00:00 2001 From: "VKMTHD\\haraldmartini" <harald.martini@student.tugraz.at> Date: Thu, 16 Feb 2023 17:59:35 +0100 Subject: [PATCH] check adas ecoroll after setting gearbox type for pevs --- .../SimulationComponents/GearBoxDataAdapter.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/GearBoxDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/GearBoxDataAdapter.cs index b3f72a19f1..f05d285827 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/GearBoxDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/GearBoxDataAdapter.cs @@ -295,11 +295,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen var retVal = SetCommonGearboxData(gearbox); - if (adas != null && retVal.Type.AutomaticTransmission() && adas.EcoRoll != EcoRollType.None && - !adas.ATEcoRollReleaseLockupClutch.HasValue) - { - throw new VectoException("Input parameter ATEcoRollReleaseLockupClutch required for AT transmission"); - } + if ((inputData.VehicleType == VectoSimulationJobType.BatteryElectricVehicle || inputData.VehicleType == VectoSimulationJobType.SerialHybridVehicle) && gearbox.Type.AutomaticTransmission()) { @@ -309,8 +305,13 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen retVal.Type = GearboxType.APTN; } } + if (adas != null && retVal.Type.AutomaticTransmission() && adas.EcoRoll != EcoRollType.None && + !adas.ATEcoRollReleaseLockupClutch.HasValue) + { + throw new VectoException("Input parameter ATEcoRollReleaseLockupClutch required for AT transmission"); + } - retVal.ATEcoRollReleaseLockupClutch = + retVal.ATEcoRollReleaseLockupClutch = adas != null && adas.EcoRoll != EcoRollType.None && retVal.Type.AutomaticTransmission() ? (adas.ATEcoRollReleaseLockupClutch.HasValue ? adas.ATEcoRollReleaseLockupClutch.Value : false) : false; -- GitLab