diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb index 2a1ffb8d412bddc3c08cb27b145476d1e3139c4e..daf588d1b81f9e27f5bb07e6b4197e090e6fb343 100644 --- a/VECTO/GUI/VectoJobForm.vb +++ b/VECTO/GUI/VectoJobForm.vb @@ -484,7 +484,7 @@ Public Class VectoJobForm Else TbENG.Text = "" End If - If (JobType <> VectoSimulationJobType.BatteryElectricVehicle orelse inputData.JobInputData.Vehicle.Components.GearboxInputData IsNot Nothing) Then + If (inputData.JobInputData.Vehicle.Components.GearboxInputData IsNot Nothing) Then TbGBX.Text = GetRelativePath(inputData.JobInputData.Vehicle.Components.GearboxInputData.DataSource.SourceFile, _basePath) Else TbGBX.Text = "" @@ -1084,7 +1084,7 @@ Public Class VectoJobForm GrAuxMech.Enabled = False pnShiftParams.Enabled = True gbEngineStopStart.Visible = False - + pnHybridStrategy.Enabled = true End Select End Sub diff --git a/VECTO/GUI/VehicleForm.vb b/VECTO/GUI/VehicleForm.vb index 1783d6aaaae0051ee8ce52b29bf3979fdc6934ec..fc51649d2aa1b1c5aece60321d5e6f710153e924 100644 --- a/VECTO/GUI/VehicleForm.vb +++ b/VECTO/GUI/VehicleForm.vb @@ -495,7 +495,7 @@ Public Class VehicleForm tbGenSetRatio.Text = gen.RatioADC.ToGUIFormat() End If - If (vehicle.VehicleType = VectoSimulationJobType.ParallelHybridVehicle) Then + If (vehicle.VehicleType = VectoSimulationJobType.ParallelHybridVehicle OrElse vehicle.VehicleType = VectoSimulationJobType.IHPC) Then 'tbMaxDrivetrainPwr.Text = vehicle.MaxDrivetrainPower.ConvertToKiloWatt().Value.ToXMLFormat(2) 'ToDo ElectricMotorTorqueLimits changed 'tbEmTorqueLimits.Text = if (Not vehicle.ElectricMotorTorqueLimits Is Nothing, GetRelativePath(vehicle.ElectricMotorTorqueLimits.Source, basePath), "") @@ -933,7 +933,7 @@ Public Class VehicleForm veh.EmTorqueLimitsFile.Init(GetPath(file), tbEmTorqueLimits.Text) End If - If (VehicleType = VectoSimulationJobType.ParallelHybridVehicle AndAlso Not String.IsNullOrEmpty(tbPropulsionTorqueLimit.Text)) Then + If ((VehicleType = VectoSimulationJobType.ParallelHybridVehicle OrElse VehicleType = VectoSimulationJobType.IHPC) AndAlso Not String.IsNullOrEmpty(tbPropulsionTorqueLimit.Text)) Then veh.PropulsionTorqueFile.Init(GetPath(file), tbPropulsionTorqueLimit.Text) End If diff --git a/VECTO/Input Files/IEPCInputData.vb b/VECTO/Input Files/IEPCInputData.vb index 1ac648e0f266c4e974241fcf36aa28930051d0c5..f135608ae98f1fbae5d1f149be32e5799baca9e1 100644 --- a/VECTO/Input Files/IEPCInputData.vb +++ b/VECTO/Input Files/IEPCInputData.vb @@ -109,7 +109,7 @@ Public Class IEPCInputData If Not entry.SubItems(1).Text = Nothing Then _ currentEntry.MaxOutputShaftTorque = entry.SubItems(1).Text.ToDouble().SI(Of NewtonMeter) If Not entry.SubItems(2).Text = Nothing Then _ - currentEntry.MaxOutputShaftSpeed = entry.SubItems(2).Text.ToDouble().SI(Of PerSecond) + currentEntry.MaxOutputShaftSpeed = entry.SubItems(2).Text.ToDouble().RPMtoRad() _gears.Add(currentEntry) Next diff --git a/VectoCommon/VectoCommon/Models/PowertrainPosition.cs b/VectoCommon/VectoCommon/Models/PowertrainPosition.cs index 41b3a203fbe3579061951bf0cc748329eae6b439..2c9753bde1da886c019e15285802d62fffc786db 100644 --- a/VectoCommon/VectoCommon/Models/PowertrainPosition.cs +++ b/VectoCommon/VectoCommon/Models/PowertrainPosition.cs @@ -29,28 +29,33 @@ namespace TUGraz.VectoCommon.InputData public const string HybridPrefix = "Hybrid"; public const string BatteryElectricPrefix = "BatteryElectric"; - public static PowertrainPosition Parse(string pos) + public static PowertrainPosition Parse(string prefix, string pos) { if (pos.Equals(nameof(PowertrainPosition.GEN))) { return PowertrainPosition.GEN; } - - if (pos.StartsWith("P", StringComparison.InvariantCultureIgnoreCase)) { - return (HybridPrefix + pos).Replace(".", "_").ParseEnum<PowertrainPosition>(); + if (pos.Equals(nameof(PowertrainPosition.IHPC), StringComparison.InvariantCultureIgnoreCase)) { + return PowertrainPosition.IHPC; } - if (pos.StartsWith("B", StringComparison.InvariantCultureIgnoreCase)) { - return (BatteryElectricPrefix + pos.Replace("B", "E")).ParseEnum<PowertrainPosition>(); + if (prefix.Equals("P", StringComparison.InvariantCultureIgnoreCase)) { + return (HybridPrefix + prefix + pos).Replace(".", "_").ParseEnum<PowertrainPosition>(); } - if (pos.StartsWith("E", StringComparison.InvariantCultureIgnoreCase)) { - return (BatteryElectricPrefix + pos).ParseEnum<PowertrainPosition>(); + + if (prefix.Equals("B", StringComparison.InvariantCultureIgnoreCase) || prefix.Equals("E", StringComparison.InvariantCultureIgnoreCase)) { + return (BatteryElectricPrefix + prefix + pos.Replace("B", "E")).ParseEnum<PowertrainPosition>(); } + + throw new VectoException("invalid powertrain position {0}", pos); + } - if (pos.Equals(nameof(PowertrainPosition.IHPC), StringComparison.InvariantCultureIgnoreCase)) { - return PowertrainPosition.IHPC; + public static PowertrainPosition Parse(string pos) + { + if (pos.Length > 1 && pos[0].IsOneOf('B', 'P', 'E')) { + return Parse(pos.Substring(0, 1), pos.Substring(1)); } - throw new VectoException("invalid powertrain position {0}", pos); + return Parse("", pos); } public static string GetName(this PowertrainPosition pos) diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs index fa51f7d3a96df4b9726ef7fe5956a0af87c137f0..c6f024ab1807c796120c21246a97f63109cba6f4 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs @@ -146,6 +146,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON case VectoSimulationJobType.IEPC_E: return _adasInputData = new JSONADASInputDataV10BEV(this); case VectoSimulationJobType.ParallelHybridVehicle: + case VectoSimulationJobType.IHPC: case VectoSimulationJobType.SerialHybridVehicle: case VectoSimulationJobType.IEPC_S: return _adasInputData = new JSONADASInputDataV10HEV(this); diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs index 2012d6daea235ebf055ff5108872254d1106f20e..43d1ac73300e541ac0d9354cd1abab13c3acbeaf 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs @@ -712,7 +712,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider foreach (XmlNode electricMachineNode in electricMachineNodes) { var powertrainPosition = - PowertrainPositionHelper.Parse(PowertrainPositionPrefix + GetString(XMLNames.ElectricMachine_Position, electricMachineNode)); + PowertrainPositionHelper.Parse(PowertrainPositionPrefix, GetString(XMLNames.ElectricMachine_Position, electricMachineNode)); if (!motorTorqueLimits.ContainsKey(powertrainPosition)) motorTorqueLimits.Add(powertrainPosition, new List<Tuple<Volt, TableData>>()); diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMachinesDeclarationInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMachinesDeclarationInputDataProvider.cs index a4abc2cbdf8deb6c05f504c065eef5d6ee35a5e2..6a73d928db4c734bbbc058fbead8467010dc0b0b 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMachinesDeclarationInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMachinesDeclarationInputDataProvider.cs @@ -38,7 +38,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider private List<ElectricMachineEntry<IElectricMotorDeclarationInputData>> GetEntries() { var machineEntry = new ElectricMachineEntry<IElectricMotorDeclarationInputData> { - Position = PowertrainPositionHelper.Parse(((AbstractXMLVehicleDataProviderV24)_vehicle).PowertrainPositionPrefix + + Position = PowertrainPositionHelper.Parse(((AbstractXMLVehicleDataProviderV24)_vehicle).PowertrainPositionPrefix, GetString(XMLNames.ElectricMachine_PowertrainPosition)), Count = XmlConvert.ToInt32(GetString(XMLNames.ElectricMachine_Count)), ElectricMachine = ElectricMachineSystemReader.CreateElectricMachineSystem(GetNode(XMLNames.ElectricMachineSystem)), diff --git a/VectoCore/VectoCore/Models/Simulation/Data/ModalResultField.cs b/VectoCore/VectoCore/Models/Simulation/Data/ModalResultField.cs index c447ede96784975785bd5b7d2c2dabc35a414c83..3480f889ddd1ccf50f48a916ff4a9d4cf3c11b99 100644 --- a/VectoCore/VectoCore/Models/Simulation/Data/ModalResultField.cs +++ b/VectoCore/VectoCore/Models/Simulation/Data/ModalResultField.cs @@ -395,17 +395,19 @@ namespace TUGraz.VectoCore.Models.Simulation.Data [ModalResultField(typeof(SI), caption: "EM_{0}_off")] EM_Off_, - [ModalResultField(typeof(SI), caption: "n_{0}_avg [1/min]", outputFactor: 60 / (2 * Math.PI))] n_IEPC_, - [ModalResultField(typeof(SI), caption: "T_{0} [Nm]")] T_IEPC_, - [ModalResultField(typeof(SI), caption: "T_{0}_map [Nm]")] T_IEPC_map_, - [ModalResultField(typeof(SI), caption: "T_{0}_drive_max [Nm]")] T_IEPC_drive_max_, - [ModalResultField(typeof(SI), caption: "T_{0}_gen_max [Nm]")] T_IEPC_gen_max_, - [ModalResultField(typeof(SI), caption: "P_{0}_gen_max [kW]", outputFactor: 1e-3)] P_IEPC_gen_max_, - [ModalResultField(typeof(SI), caption: "P_{0}_drive_max [kW]", outputFactor: 1e-3)] P_IEPC_drive_max_, + [ModalResultField(typeof(SI), caption: "n_{0}_int_avg [1/min]", outputFactor: 60 / (2 * Math.PI))] n_IEPC_int_, + [ModalResultField(typeof(SI), caption: "T_{0}_int [Nm]")] T_IEPC_, + [ModalResultField(typeof(SI), caption: "T_{0}_int_map [Nm]")] T_IEPC_map_, + [ModalResultField(typeof(SI), caption: "T_{0}_int_drive_max [Nm]")] T_IEPC_int_drive_max_, + [ModalResultField(typeof(SI), caption: "T_{0}_int_gen_max [Nm]")] T_IEPC_int_gen_max_, + [ModalResultField(typeof(SI), caption: "P_{0}_int_gen_max [kW]", outputFactor: 1e-3)] P_IEPC_int_gen_max_, + [ModalResultField(typeof(SI), caption: "P_{0}_int_drive_max [kW]", outputFactor: 1e-3)] P_IEPC_int_drive_max_, [ModalResultField(typeof(SI), caption: "P_{0}_inertia_loss [kW]", outputFactor: 1e-3)] P_IEPC_electricMotorInertiaLoss_, - [ModalResultField(typeof(SI), caption: "P_{0}_mech_map [kW]", outputFactor: 1e-3)] P_IEPC_mech_map_, + [ModalResultField(typeof(SI), caption: "P_{0}_int_mech_map [kW]", outputFactor: 1e-3)] P_IEPC_int_mech_map_, [ModalResultField(typeof(SI), caption: "P_{0}_el [kW]", outputFactor: 1e-3)] P_IEPC_el_, [ModalResultField(typeof(SI), caption: "P_{0}_out [kW]", outputFactor: 1e-3)] P_IEPC_out_, + [ModalResultField(typeof(SI), caption: "n_IEPC_out_avg [kW]", outputFactor: 1e-3)] n_IEPC_out_avg, + [ModalResultField(typeof(SI), caption: "T_IEPC_out [kW]", outputFactor: 1e-3)] T_IEPC_out, [ModalResultField(typeof(SI), caption: "P_{0}_loss [kW]", outputFactor: 1e-3)] P_IEPC_electricMotorLoss_, [ModalResultField(typeof(SI), caption: "{0}_off")] IEPC_Off_, [ModalResultField(typeof(SI), caption: "{0}_OVL [%]", outputFactor: 100)] IEPC_OvlBuffer_, diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs index f9fc271aaa8d4bc3cef25bd782d66669b349ecf8..0fae92d6312ad372e901b6a82813e084be0dcfcf 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs @@ -891,7 +891,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl //-->AxleGear-->APTNGearbox or SinglespeedGearbox-->Engine E2 var gearbox = data.GearboxData.Gears.Count > 1 - ? (IGearbox)new APTNGearbox(container, new APTNShiftStrategy(container)) + ? (IGearbox)new IEPCGearbox(container, new APTNShiftStrategy(container)) : new SingleSpeedGearbox(container, data.GearboxData); em = GetElectricMachine(PowertrainPosition.IEPC, data.ElectricMachinesData, container, es, ctl); powertrain @@ -985,7 +985,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl //-->AxleGear-->APTNGearbox or SinglespeedGearbox-->Engine E2 var gearbox = data.GearboxData.Gears.Count > 1 - ? (IGearbox)new APTNGearbox(container, new APTNShiftStrategy(container)) + ? (IGearbox)new IEPCGearbox(container, new APTNShiftStrategy(container)) : new SingleSpeedGearbox(container, data.GearboxData); em = GetElectricMachine(PowertrainPosition.IEPC, data.ElectricMachinesData, container, es, ctl); powertrain @@ -1567,6 +1567,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl case GearboxType.AMT: switch (runData.JobType) { case VectoSimulationJobType.ConventionalVehicle: + case VectoSimulationJobType.ParallelHybridVehicle: runData.ShiftStrategy = AMTShiftStrategyOptimized.Name; return new AMTShiftStrategyOptimized(container); case VectoSimulationJobType.BatteryElectricVehicle: diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/APTNGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/APTNGearbox.cs index cbff4a8327e1a2c68e13a4a631e571c78977b428..fd345f22f0dd77198f9511164f5e76a4eb8157f8 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/APTNGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/APTNGearbox.cs @@ -77,7 +77,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl Gear = oldGear; return new ResponseDryRun(this, response) { ElectricMotor = { PowerRequest = response.ElectricMotor.PowerRequest }, - Gearbox = { PowerRequest = outTorque * outAngularVelocity }, + Gearbox = { + PowerRequest = outTorque * outAngularVelocity, + InputSpeed = inAngularVelocity, + InputTorque = inTorque, + OutputTorque = outTorque, + OutputSpeed = outAngularVelocity, + }, DeltaFullLoad = response.ElectricMotor.PowerRequest - fullLoad }; } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/IEPC.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/IEPC.cs index 64ab097e1aea9f8ca1aefffd4e3dc227e0964177..867a88f2ba682b0a7c69b6b5ab2f35f7a169963e 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/IEPC.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/IEPC.cs @@ -21,18 +21,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl{ var avgDTSpeed = (prevDtSpeed + CurrentState.DrivetrainSpeed) / 2; //container[ModalResultField.EM_ratio_, Position] = ModelData.RatioADC.SI<Scalar>(); - container[ModalResultField.n_IEPC_, Position] = avgEMSpeed; + container[ModalResultField.n_IEPC_int_, Position] = avgEMSpeed; container[ModalResultField.T_IEPC_, Position] = CurrentState.EMTorque; container[ModalResultField.T_IEPC_map_, Position] = CurrentState.EmTorqueMap; - container[ModalResultField.T_IEPC_drive_max_, Position] = CurrentState.DriveMax; - container[ModalResultField.T_IEPC_gen_max_, Position] = CurrentState.DragMax; + container[ModalResultField.T_IEPC_int_drive_max_, Position] = CurrentState.DriveMax; + container[ModalResultField.T_IEPC_int_gen_max_, Position] = CurrentState.DragMax; - container[ModalResultField.P_IEPC_gen_max_, Position] = (CurrentState.DragMax ?? 0.SI<NewtonMeter>()) * avgEMSpeed; - container[ModalResultField.P_IEPC_drive_max_, Position] = (CurrentState.DriveMax ?? 0.SI<NewtonMeter>()) * avgEMSpeed; + container[ModalResultField.P_IEPC_int_gen_max_, Position] = (CurrentState.DragMax ?? 0.SI<NewtonMeter>()) * avgEMSpeed; + container[ModalResultField.P_IEPC_int_drive_max_, Position] = (CurrentState.DriveMax ?? 0.SI<NewtonMeter>()) * avgEMSpeed; //container[ModalResultField.P_EM_electricMotor_em_mech_, Position] = (CurrentState.EMTorque ?? 0.SI<NewtonMeter>()) * avgEMSpeed; - container[ModalResultField.P_IEPC_mech_map_, Position] = (CurrentState.EmTorqueMap ?? 0.SI<NewtonMeter>()) * avgEMSpeed; + container[ModalResultField.P_IEPC_int_mech_map_, Position] = (CurrentState.EmTorqueMap ?? 0.SI<NewtonMeter>()) * avgEMSpeed; //container[ModalResultField.P_EM_in_, Position] = CurrentState.DrivetrainInTorque * avgDTSpeed; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/IEPCGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/IEPCGearbox.cs new file mode 100644 index 0000000000000000000000000000000000000000..ccc88dd5136ce06397fe4332e7eea78e13ed786d --- /dev/null +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/IEPCGearbox.cs @@ -0,0 +1,30 @@ +using TUGraz.VectoCommon.Utils; +using TUGraz.VectoCore.Models.Simulation; +using TUGraz.VectoCore.Models.Simulation.Data; +using TUGraz.VectoCore.OutputData; + +namespace TUGraz.VectoCore.Models.SimulationComponent.Impl +{ + public class IEPCGearbox : APTNGearbox + { + public IEPCGearbox(IVehicleContainer container, IShiftStrategy strategy) : base(container, strategy) { } + + protected override void DoWriteModalResults(Second time, Second simulationInterval, + IModalDataContainer container) + { + //var avgInAngularSpeed = (PreviousState.InAngularVelocity + CurrentState.InAngularVelocity) / 2.0; + //var avgOutAngularSpeed = (PreviousState.OutAngularVelocity + CurrentState.OutAngularVelocity) / 2.0; + //var inPower = CurrentState.InTorque * avgInAngularSpeed; + //var outPower = CurrentState.OutTorque * avgOutAngularSpeed; + container[ModalResultField.Gear] = Disengaged || DataBus.VehicleInfo.VehicleStopped ? 0 : Gear.Gear; + //container[ModalResultField.P_gbx_loss] = inPower - outPower; + //container[ModalResultField.P_gbx_inertia] = CurrentState.InertiaTorqueLossOut * avgOutAngularSpeed; + //container[ModalResultField.P_gbx_in] = inPower; + container[ModalResultField.n_IEPC_out_avg] = (PreviousState.OutAngularVelocity + + CurrentState.OutAngularVelocity) / 2.0; + container[ModalResultField.T_IEPC_out] = CurrentState.OutTorque; + //container[ModalResultField.T_gbx_in] = CurrentState.InTorque; + _strategy.WriteModalResults(container); + } + } +} \ No newline at end of file diff --git a/VectoCore/VectoCore/OutputData/FileIO/JSONFileWriter.cs b/VectoCore/VectoCore/OutputData/FileIO/JSONFileWriter.cs index d74e5936b04e372a22cc2c44fd5aa9c3e33f866e..d72c196e6f3a646ec6985da39dd8a58fef454ecb 100644 --- a/VectoCore/VectoCore/OutputData/FileIO/JSONFileWriter.cs +++ b/VectoCore/VectoCore/OutputData/FileIO/JSONFileWriter.cs @@ -154,10 +154,10 @@ public class JSONFileWriter : IOutputFileWriter var currentGear = new Dictionary<string, object> { { JsonKeys.Gearbox_Gear_Ratio, gear.Ratio } }; - if(gear.MaxOutputShaftSpeed != null) + if(gear.MaxOutputShaftTorque != null) currentGear.Add(JsonKeys.Gearbox_Gear_MaxOutShaftTorque, gear.MaxOutputShaftTorque.Value()); if(gear.MaxOutputShaftSpeed != null) - currentGear.Add(JsonKeys.Gearbox_Gear_MaxOutShaftSpeed, gear.MaxOutputShaftSpeed.Value()); + currentGear.Add(JsonKeys.Gearbox_Gear_MaxOutShaftSpeed, gear.MaxOutputShaftSpeed.AsRPM); gears.Add(currentGear); } diff --git a/VectoCore/VectoCore/OutputData/ModalDataContainer.cs b/VectoCore/VectoCore/OutputData/ModalDataContainer.cs index 2a43cc64354cc05baaba5a1e14db4556d5933300..fe7610ff63b029939cfe5177626a32331bd82e9e 100644 --- a/VectoCore/VectoCore/OutputData/ModalDataContainer.cs +++ b/VectoCore/VectoCore/OutputData/ModalDataContainer.cs @@ -95,15 +95,15 @@ namespace TUGraz.VectoCore.OutputData }; private readonly ModalResultField[] _iepcColumns = { - ModalResultField.n_IEPC_, + ModalResultField.n_IEPC_int_, ModalResultField.T_IEPC_, ModalResultField.T_IEPC_map_, - ModalResultField.T_IEPC_drive_max_, - ModalResultField.T_IEPC_gen_max_, - ModalResultField.P_IEPC_gen_max_, - ModalResultField.P_IEPC_drive_max_, + ModalResultField.T_IEPC_int_drive_max_, + ModalResultField.T_IEPC_int_gen_max_, + ModalResultField.P_IEPC_int_gen_max_, + ModalResultField.P_IEPC_int_drive_max_, ModalResultField.P_IEPC_electricMotorInertiaLoss_, - ModalResultField.P_IEPC_mech_map_, + ModalResultField.P_IEPC_int_mech_map_, ModalResultField.P_IEPC_el_, ModalResultField.P_IEPC_out_, ModalResultField.P_IEPC_electricMotorLoss_, @@ -356,7 +356,7 @@ namespace TUGraz.VectoCore.OutputData } var elPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_el_ : ModalResultField.P_EM_electricMotor_el_; - var mechPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_mech_map_ : ModalResultField.P_EM_mech_; + var mechPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_int_mech_map_ : ModalResultField.P_EM_mech_; var selected = Data.AsEnumerable().Select(r => { var dt = r.Field<Second>(ModalResultField.simulationInterval.GetName()); return new { @@ -417,7 +417,7 @@ namespace TUGraz.VectoCore.OutputData } var offField = emPos == PowertrainPosition.IEPC ? ModalResultField.IEPC_Off_ : ModalResultField.EM_Off_; var elPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_el_ : ModalResultField.P_EM_electricMotor_el_; - var mechPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_mech_map_ : ModalResultField.P_EM_mech_; + var mechPwrField = emPos == PowertrainPosition.IEPC ? ModalResultField.P_IEPC_int_mech_map_ : ModalResultField.P_EM_mech_; var selected = Data.AsEnumerable().Select(r => { var dt = r.Field<Second>(ModalResultField.simulationInterval.GetName()); return new { @@ -531,7 +531,7 @@ namespace TUGraz.VectoCore.OutputData public PerSecond ElectricMotorAverageSpeed(PowertrainPosition emPos) { var field = emPos == PowertrainPosition.IEPC - ? ModalResultField.n_IEPC_ + ? ModalResultField.n_IEPC_int_ : ModalResultField.n_EM_electricMotor_; var integral = GetValues(x => x.Field<PerSecond>(string.Format(field.GetCaption(), emPos.GetName())).Value() * x.Field<Second>(ModalResultField.simulationInterval.GetName()).Value()).Sum(); diff --git a/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusFactorMethodTest.cs b/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusFactorMethodTest.cs index d78e66dd6bea66512708184f4d9991a4c7b25b3d..3030e51b634808bc89fdf9acfa013ee96fcab7a9 100644 --- a/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusFactorMethodTest.cs +++ b/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusFactorMethodTest.cs @@ -882,7 +882,7 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus genericDriver.LookAheadCoasting.LookAheadDistanceFactor); Assert.AreEqual(genericDriver.LookAheadCoasting, specificDriver.LookAheadCoasting); - Assert.AreEqual(true, genericDriver.OverSpeed.Enabled); + Assert.AreEqual(false, genericDriver.OverSpeed.Enabled); Assert.AreEqual(DeclarationData.Driver.OverSpeed.MinSpeed, genericDriver.OverSpeed.MinSpeed); Assert.AreEqual(DeclarationData.Driver.OverSpeed.AllowedOverSpeed, genericDriver.OverSpeed.OverSpeed); Assert.AreEqual(genericDriver.OverSpeed, specificDriver.OverSpeed); diff --git a/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs b/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs index 61e790c8f0188195b11e842ea5cfb6fdd8dd5098..2f6c82d6805506cfcd7a12c0d28ed21409a90d83 100644 --- a/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs +++ b/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs @@ -1900,6 +1900,7 @@ namespace TUGraz.VectoCore.Tests.Integration.Hybrid })).ToDictionary(k => k.Item1 + 1, v => v.Item2), Inertia = 0.SI<KilogramSquareMeter>(), TractionInterruption = 1.SI<Second>(), + Type = GearboxType.AMT }; } diff --git a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs index b9a879cade91ac8ed597c404028e856d094fb63a..9693e144ff62a8a0d1bd9a5a3e7256eeaa8c7bdc 100644 --- a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs +++ b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs @@ -334,14 +334,15 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration } [TestCase("only the drive shaft of the PTO - shift claw, synchronizer, sliding gearwheel", 50), - TestCase("only the drive shaft of the PTO - multi-disc clutch", 1000), - TestCase("only the drive shaft of the PTO - multi-disc clutch, oil pump", 2000), - TestCase("drive shaft and/or up to 2 gear wheels - shift claw, synchronizer, sliding gearwheel", 300), - TestCase("drive shaft and/or up to 2 gear wheels - multi-disc clutch", 1500), - TestCase("drive shaft and/or up to 2 gear wheels - multi-disc clutch, oil pump", 3000), - TestCase("drive shaft and/or more than 2 gear wheels - shift claw, synchronizer, sliding gearwheel", 600), - TestCase("drive shaft and/or more than 2 gear wheels - multi-disc clutch", 2000), - TestCase("drive shaft and/or more than 2 gear wheels - multi-disc clutch, oil pump", 4000), + TestCase("only the drive shaft of the PTO - multi-disc clutch", 350), + TestCase("only the drive shaft of the PTO - multi-disc clutch, oil pump", 3000), + TestCase("drive shaft and/or up to 2 gear wheels - shift claw, synchronizer, sliding gearwheel", 150), + TestCase("drive shaft and/or up to 2 gear wheels - multi-disc clutch", 400), + TestCase("drive shaft and/or up to 2 gear wheels - multi-disc clutch, oil pump", 3050), + TestCase("drive shaft and/or more than 2 gear wheels - shift claw, synchronizer, sliding gearwheel", 200), + TestCase("drive shaft and/or more than 2 gear wheels - multi-disc clutch", 450), + TestCase("drive shaft and/or more than 2 gear wheels - multi-disc clutch, oil pump", 3100), + TestCase("PTO which includes 1 or more additional gearmesh(es), without disconnect clutch", 1500), TestCase("only one engaged gearwheel above oil level", 0)] public void AuxPTOTransmissionTest(string technology, double value) { diff --git a/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs b/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs index 304b051c8294fdf6506a8ed370425ac3133f6007..479abf518325f8a4b02b3f643f04f50443ead14a 100644 --- a/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs +++ b/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs @@ -179,7 +179,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation }; // call builder (actual test) - var jobContainer = PowertrainBuilder.Build(data, new MockModalDataContainer()); + var jobContainer = PowertrainBuilder.Build(data, new MockModalDataContainer(), container => {}); } /// <summary> diff --git a/VectoCore/VectoCoreTest/TestData/Hybrids/GenericIEPC-S/Common/Hybrid_Parameters.vhctl b/VectoCore/VectoCoreTest/TestData/Hybrids/GenericIEPC-S/Common/Hybrid_Parameters.vhctl new file mode 100644 index 0000000000000000000000000000000000000000..2f2ed814fcff9e24e146e56f0d0ff41378f5a386 --- /dev/null +++ b/VectoCore/VectoCoreTest/TestData/Hybrids/GenericIEPC-S/Common/Hybrid_Parameters.vhctl @@ -0,0 +1,18 @@ +{ + "Header": { + "CreatedBy": "", + "Date": "2020-09-07T15:28:08.3781385Z", + "AppVersion": "3", + "FileVersion": 2 + }, + "Body": { + "----EquivalenceFactor": 2.0, + "MinSoC": 24.0, + "----MaxSoC": 80.0, + "TargetSoC": 70.0, + "----AuxBufferTime": 5.0, + "----AuxBufferChgTime": 5.0, + "----MinICEOnTime": 10.0, + "GensetMinOptPowerFactor": 0.2 + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputTest.cs b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputTest.cs index 3b8acaf915aac426e8528049a394595062d20d59..2bbb611ebd9468ba3e53bcb90db23813c14a014e 100644 --- a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputTest.cs +++ b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputTest.cs @@ -859,7 +859,7 @@ namespace TUGraz.VectoCore.Tests.XML var lookup = DeclarationData.PTOTransmission.Lookup(ptoDataProvider.PTOTransmissionType); Assert.AreEqual("only the drive shaft of the PTO - multi-disc clutch", ptoDataProvider.PTOTransmissionType); - Assert.AreEqual(1000, lookup.PowerDemand.Value()); + Assert.AreEqual(350, lookup.PowerDemand.Value()); } [TestCase] diff --git a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv24.cs b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv24.cs index 64ecf91f45da8df09019ae117714957b8225533a..c209074e66391df9f42de882021fbba7410dc076 100644 --- a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv24.cs +++ b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv24.cs @@ -802,7 +802,7 @@ namespace TUGraz.VectoCore.Tests.XML Assert.IsNull(vehicle.Components.AngledriveInputData); Assert.IsNull(vehicle.Components.RetarderInputData); Assert.IsNull(vehicle.Components.AirdragInputData); - Assert.AreEqual(0, vehicle.TorqueLimits.Count); + Assert.IsNull(vehicle.TorqueLimits); Assert.IsNull(vehicle.ElectricMotorTorqueLimits);//Vehicle EM Drive Limits } else @@ -1007,7 +1007,7 @@ namespace TUGraz.VectoCore.Tests.XML Assert.IsNull(vehicle.Components.RetarderInputData); Assert.IsNull(vehicle.Components.AirdragInputData); Assert.IsNull(vehicle.CargoVolume); - Assert.IsEmpty(vehicle.TorqueLimits); + Assert.IsNull(vehicle.TorqueLimits); Assert.IsNull(vehicle.ElectricMotorTorqueLimits); } else @@ -1155,7 +1155,7 @@ namespace TUGraz.VectoCore.Tests.XML { Assert.IsNull(vehicle.Components.AngledriveInputData); Assert.IsNull(vehicle.Components.RetarderInputData); - Assert.IsEmpty(vehicle.TorqueLimits); + Assert.IsNull(vehicle.TorqueLimits); Assert.IsNull(vehicle.ElectricMotorTorqueLimits); } else @@ -1414,7 +1414,7 @@ namespace TUGraz.VectoCore.Tests.XML Assert.IsNotNull(vehicle.Components.ElectricStorage); Assert.IsNull(vehicle.Components.PTOTransmissionInputData); Assert.IsNull(vehicle.TorqueLimits); - Assert.IsNull(vehicle.ElectricMotorTorqueLimits); + Assert.IsNotNull(vehicle.ElectricMotorTorqueLimits); Assert.IsNull(vehicle.BoostingLimitations); } @@ -1457,7 +1457,7 @@ namespace TUGraz.VectoCore.Tests.XML Assert.IsNull(vehicle.Components.PTOTransmissionInputData); Assert.IsNull(vehicle.CargoVolume); Assert.IsNull(vehicle.TorqueLimits); - Assert.IsNull(vehicle.ElectricMotorTorqueLimits); + Assert.IsNotNull(vehicle.ElectricMotorTorqueLimits); Assert.IsNull(vehicle.BoostingLimitations); }