diff --git a/VECTO/Input Files/VectoJob.vb b/VECTO/Input Files/VectoJob.vb index 57241cfcdefe82fa182b61b087db213f0db73677..40f5c18caa042cadb41eb69b1c0d4160e1f27369 100644 --- a/VECTO/Input Files/VectoJob.vb +++ b/VECTO/Input Files/VectoJob.vb @@ -288,7 +288,8 @@ Public Class VectoJob Public ReadOnly Property IDriverEngineeringInputData_GearshiftInputData As IGearshiftEngineeringInputData Implements IDriverEngineeringInputData.GearshiftInputData Get - Return Nothing + return new JSONComponentInputData(_tcuFile.FullPath, Me).DriverInputData.GearshiftInputData + 'Return TryCast( New JSONComponentInputData(_gearboxFile.FullPath, Me).JobInputData.Vehicle.Components.GearboxInputData, IGearshiftEngineeringInputData) End Get End Property diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs index 21b90d7ec76243547c357337fbb78414199dcd6e..76e845333713bbbd533e303f5aea7b4317c3da33 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs @@ -46,7 +46,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { public class JSONComponentInputData : IEngineeringInputDataProvider, IDeclarationInputDataProvider, IEngineeringJobInputData, IVehicleEngineeringInputData, IAdvancedDriverAssistantSystemDeclarationInputData, - IAdvancedDriverAssistantSystemsEngineering, IVehicleComponentsDeclaration, IVehicleComponentsEngineering + IAdvancedDriverAssistantSystemsEngineering, IVehicleComponentsDeclaration, IVehicleComponentsEngineering, IDriverEngineeringInputData { protected IGearboxEngineeringInputData Gearbox; protected IAxleGearInputData AxleGear; @@ -118,10 +118,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public IDriverEngineeringInputData DriverInputData { - get { return null; } + get { return this; } } + public IOverSpeedEcoRollEngineeringInputData OverSpeedEcoRoll { get; } + public IDriverAccelerationData AccelerationCurve { get; } + public ILookaheadCoastingInputData Lookahead { get; } public IGearshiftEngineeringInputData GearshiftInputData { get { return GearshiftData; } } + public DataSource DataSource { diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs index 4426bd9bc2a369c121f5146bed1b0b879b3410b9..1da6ce84404e18cf880df3348e439159163e3af3 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONTCUData.cs @@ -20,12 +20,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public virtual Second MinTimeBetweenGearshift { - get { return Body.GetEx<double>(JsonKeys.Gearbox_ShiftTime).SI<Second>(); } + get { + return Body[JsonKeys.Gearbox_ShiftTime] == null + ? DeclarationData.Gearbox.MinTimeBetweenGearshifts + : Body.GetEx<double>(JsonKeys.Gearbox_ShiftTime).SI<Second>(); + } } public virtual double TorqueReserve { - get { return Body.GetEx<double>(JsonKeys.Gearbox_TorqueReserve) / 100.0; } + get { return Body[JsonKeys.Gearbox_TorqueReserve] == null ? + DeclarationData.Gearbox.TorqueReserve + :Body.GetEx<double>(JsonKeys.Gearbox_TorqueReserve) / 100.0; } } public Second DownshiftAfterUpshiftDelay @@ -77,17 +83,21 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public virtual double StartTorqueReserve { - get { return Body.GetEx<double>(JsonKeys.Gearbox_StartTorqueReserve) / 100.0; } + get { + return Body[JsonKeys.Gearbox_StartTorqueReserve] == null + ? DeclarationData.Gearbox.TorqueReserveStart + : Body.GetEx<double>(JsonKeys.Gearbox_StartTorqueReserve) / 100.0; + } } public MeterPerSecond StartSpeed { - get { return Body.GetValueOrDefault<double>(JsonKeys.Gearbox_StartSpeed)?.KMPHtoMeterPerSecond(); } + get { return Body.GetValueOrDefault<double>(JsonKeys.Gearbox_StartSpeed)?.KMPHtoMeterPerSecond() ?? DeclarationData.Gearbox.StartSpeed; } } public MeterPerSquareSecond StartAcceleration { - get { return Body.GetValueOrDefault<double>(JsonKeys.Gearbox_StartAcceleration)?.SI<MeterPerSquareSecond>(); } + get { return Body.GetValueOrDefault<double>(JsonKeys.Gearbox_StartAcceleration)?.SI<MeterPerSquareSecond>() ?? DeclarationData.Gearbox.StartAcceleration; } } public Second GearResidenceTime