From 6aca45b64c6272651c5bb76c27396b4dcec7bcec Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Fri, 6 Dec 2019 11:27:34 +0100 Subject: [PATCH] renaming field (typo), correcting xml type name, ignore calculation of veh-line for exempted vehicles, at gearbox: don't initialize gear if no strategy is set (testcontainer), at effshift: initialise at gearbox in testcontainer --- .../XMLEngineeringTorqueConverterDataProvider.cs | 2 +- .../Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs | 5 +++++ VectoCore/VectoCore/Models/Simulation/Impl/VectoRun.cs | 8 +++++--- .../Models/SimulationComponent/Impl/ATGearbox.cs | 6 +++--- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringTorqueConverterDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringTorqueConverterDataProvider.cs index 3da7faf7b5..5715455839 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringTorqueConverterDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringTorqueConverterDataProvider.cs @@ -86,7 +86,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.Impl { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.ENGINEERING_DEFINITONS_NAMESPACE_V10; - public new const string XSD_TYPE = "TorqueConverterComponentEngineeringType"; + public new const string XSD_TYPE = "TorqueConverterDataEngineeringType"; public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, XSD_TYPE); diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs index 2d75f9b7d9..08f255b56d 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs @@ -63,6 +63,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl protected Exception InitException; public IVTPReport Report; + protected ShiftStrategyParameters GearshiftData; public DeclarationVTPModeVectoRunDataFactory(IVTPDeclarationInputDataProvider ivtpProvider, IVTPReport report) : this( ivtpProvider.JobInputData, report) { } @@ -142,6 +143,9 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl PTOTransmissionData = Dao.CreatePTOTransmissionData(vehicle.Components.PTOTransmissionInputData); + GearshiftData = Dao.CreateGearshiftData( + GearboxData.Type, AxlegearData.AxleGear.Ratio * (AngledriveData?.Angledrive.Ratio ?? 1.0), EngineData.IdleSpeed); + AuxVTP = CreateVTPAuxData(vehicle); } @@ -224,6 +228,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl JobName = JobInputData.Vehicle.VIN, EngineData = EngineData, GearboxData = GearboxData, + GearshiftParameters = GearshiftData, AxleGearData = AxlegearData, AngledriveData = AngledriveData, VehicleData = Dao.CreateVehicleData( diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/VectoRun.cs b/VectoCore/VectoCore/Models/Simulation/Impl/VectoRun.cs index 2539428eef..17a667cdf9 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/VectoRun.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/VectoRun.cs @@ -137,9 +137,11 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl Container.AbsTime = AbsTime; } } while (response is ResponseSuccess); - foreach (var fuel in GetContainer().RunData.EngineData.Fuels) { - // calculate vehicleline correction here in local thread context because writing sum-data and report afterwards is synchronized - var cf = GetContainer().ModalData.VehicleLineCorrectionFactor(fuel.FuelData); + if (!GetContainer().RunData.Exempted) { + foreach (var fuel in GetContainer().RunData.EngineData.Fuels) { + // calculate vehicleline correction here in local thread context because writing sum-data and report afterwards is synchronized + var cf = GetContainer().ModalData.VehicleLineCorrectionFactor(fuel.FuelData); + } } PostProcessingDone = true; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs index 116fbfbadf..dcfff2327c 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs @@ -128,9 +128,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public override IResponse Initialize(NewtonMeter outTorque, PerSecond outAngularVelocity) { - if (CurrentState.Disengaged) { - Gear = _strategy?.InitGear(0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, outTorque, - outAngularVelocity) ?? 1; + if (_strategy != null && CurrentState.Disengaged) { + Gear = _strategy.InitGear(0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, outTorque, + outAngularVelocity); } var inAngularVelocity = 0.SI<PerSecond>(); var inTorque = 0.SI<NewtonMeter>(); -- GitLab