Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 0f889632 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Pull request #229: bugfix saving IHPC transmissions in GUI

Merge in VECTO/vecto-dev from VECTO/mq_vecto-dev:feature/VECTO-1590-implement-ihpc-powertrain-architecture_2 to develop

* commit 'e075ab4d':
  bugfix saving IHPC transmissions in GUI
parents 7d7cd220 e075ab4d
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
Integrated hybrid electric vehicle powertrain component (IHPC) means a combined system of multiple electric machine systems together with the functionality of a multi-speed gearbox. Integrated hybrid electric vehicle powertrain component (IHPC) means a combined system of multiple electric machine systems together with the functionality of a multi-speed gearbox.
For an IHPC the
### Relative File Paths ### Relative File Paths
...@@ -22,7 +21,7 @@ Make and Model ...@@ -22,7 +21,7 @@ Make and Model
: Free text defining the gearbox model, type, etc. : Free text defining the gearbox model, type, etc.
Inertia \[kgm²\] Inertia \[kgm²\]
: Rotational inertia of the gearbox (constant for all gears). (Engineering mode only) : Rotational inertia of the electric machine defined at the output shaft of the EM. (Engineering mode only)
Gears Gears
: Gear ratios of the transmission steps of the IEPC : Gear ratios of the transmission steps of the IEPC
......
...@@ -89,7 +89,7 @@ Public Class GearboxForm ...@@ -89,7 +89,7 @@ Public Class GearboxForm
Else Else
CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _ CbGStype.DataSource = [Enum].GetValues(GetType(GearboxType)) _
.Cast(Of GearboxType)() _ .Cast(Of GearboxType)() _
.Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission()) _ .Where(Function(type) type.ManualTransmission() OrElse type.AutomaticTransmission() OrElse type = GearboxType.IHPC) _
.Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList() .Select(Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
End If End If
DeclInit() DeclInit()
...@@ -140,7 +140,7 @@ Public Class GearboxForm ...@@ -140,7 +140,7 @@ Public Class GearboxForm
Private Sub ToolStripBtOpen_Click(sender As Object, e As EventArgs) Handles ToolStripBtOpen.Click Private Sub ToolStripBtOpen_Click(sender As Object, e As EventArgs) Handles ToolStripBtOpen.Click
If GearboxFileBrowser.OpenDialog(_gbxFile) Then If GearboxFileBrowser.OpenDialog(_gbxFile) Then
Try Try
OpenGbx(GearboxFileBrowser.Files(0), VehicleCategory.RigidTruck) OpenGbx(GearboxFileBrowser.Files(0), VehicleCategory.RigidTruck, VectoSimulationJobType.ConventionalVehicle)
Catch ex As Exception Catch ex As Exception
MsgBox("Failed to open Gearbox File: " + ex.Message) MsgBox("Failed to open Gearbox File: " + ex.Message)
End Try End Try
...@@ -242,7 +242,7 @@ Public Class GearboxForm ...@@ -242,7 +242,7 @@ Public Class GearboxForm
End Sub End Sub
'Open file 'Open file
Public Sub OpenGbx(file As String, vehicleCategory As VehicleCategory) Public Sub OpenGbx(file As String, vehicleCategory As VehicleCategory, vehicleJobType As VectoSimulationJobType)
If ChangeCheckCancel() Then Exit Sub If ChangeCheckCancel() Then Exit Sub
...@@ -254,6 +254,7 @@ Public Class GearboxForm ...@@ -254,6 +254,7 @@ Public Class GearboxForm
Dim axlegear As IAxleGearInputData = vehicle.Components.AxleGearInputData Dim axlegear As IAxleGearInputData = vehicle.Components.AxleGearInputData
_vehicleCategory = vehicleCategory _vehicleCategory = vehicleCategory
_vehicleJobType = vehicleJobType
If Cfg.DeclMode <> gearbox.SavedInDeclarationMode Then If Cfg.DeclMode <> gearbox.SavedInDeclarationMode Then
Select Case WrongMode() Select Case WrongMode()
...@@ -713,6 +714,7 @@ Public Class GearboxForm ...@@ -713,6 +714,7 @@ Public Class GearboxForm
Private _contextMenuFiles As String() Private _contextMenuFiles As String()
Private _vehicleCategory As VehicleCategory Private _vehicleCategory As VehicleCategory
private _vehicleJobType as VectoSimulationJobType
Private Sub OpenFiles(ParamArray files() As String) Private Sub OpenFiles(ParamArray files() As String)
...@@ -1075,7 +1077,8 @@ Public Class GearboxForm ...@@ -1075,7 +1077,8 @@ Public Class GearboxForm
Dim tmpRunData as VectoRunData = New VectoRunData() With { Dim tmpRunData as VectoRunData = New VectoRunData() With {
.GearboxData = New GearboxData() with { .GearboxData = New GearboxData() with {
.Type = CType(CbGStype.SelectedValue, GearboxType) .Type = CType(CbGStype.SelectedValue, GearboxType)
} },
.JobType = _vehicleJobType
} }
Dim tmpStrategy as IShiftPolygonCalculator = PowertrainBuilder.GetShiftStrategy(new SimplePowertrainContainer(tmpRunData)) Dim tmpStrategy as IShiftPolygonCalculator = PowertrainBuilder.GetShiftStrategy(new SimplePowertrainContainer(tmpRunData))
......
...@@ -405,7 +405,7 @@ Public Class MainForm ...@@ -405,7 +405,7 @@ Public Class MainForm
GearboxForm.BringToFront() GearboxForm.BringToFront()
End If End If
Try Try
GearboxForm.OpenGbx(file, VehicleCategory.RigidTruck) GearboxForm.OpenGbx(file, VehicleCategory.RigidTruck, VectoSimulationJobType.ConventionalVehicle)
Catch ex As Exception Catch ex As Exception
MsgBox("Failed to open Gearbox File: " + ex.Message) MsgBox("Failed to open Gearbox File: " + ex.Message)
End Try End Try
......
...@@ -330,19 +330,22 @@ Public Class VectoJobForm ...@@ -330,19 +330,22 @@ Public Class VectoJobForm
GearboxForm.BringToFront() GearboxForm.BringToFront()
End If End If
Dim vehicleType As VehicleCategory Dim vehicleType As VehicleCategory
Dim jobType as VectoSimulationJobType
Try Try
If Not Trim(f) = "" Then If Not Trim(f) = "" Then
Dim vehInput As IVehicleDeclarationInputData = Dim vehInput As IVehicleEngineeringInputData =
CType(JSONInputDataFactory.ReadComponentData(FileRepl(TbVEH.Text, GetPath(VectoFile))), CType(JSONInputDataFactory.ReadComponentData(FileRepl(TbVEH.Text, GetPath(VectoFile))),
IEngineeringInputDataProvider).JobInputData.Vehicle IEngineeringInputDataProvider).JobInputData.Vehicle
vehicleType = vehInput.VehicleCategory vehicleType = vehInput.VehicleCategory
jobType = vehInput.VehicleType
End If End If
Catch ex As Exception Catch ex As Exception
vehicleType = VehicleCategory.RigidTruck vehicleType = VehicleCategory.RigidTruck
jobType = VectoSimulationJobType.ConventionalVehicle
End Try End Try
Try Try
If Not Trim(f) = "" Then GearboxForm.OpenGbx(f, vehicleType) If Not Trim(f) = "" Then GearboxForm.OpenGbx(f, vehicleType, jobType)
Catch ex As Exception Catch ex As Exception
MsgBox("Failed to open Gearbox File: " + ex.Message) MsgBox("Failed to open Gearbox File: " + ex.Message)
End Try End Try
......
...@@ -722,7 +722,7 @@ Public Class VehicleForm ...@@ -722,7 +722,7 @@ Public Class VehicleForm
tcVehicleComponents.TabPages.Remove(tpIEPC) tcVehicleComponents.TabPages.Remove(tpIEPC)
gbEMTorqueLimits.Enabled = False gbEMTorqueLimits.Enabled = False
gbPropulsionTorque.Enabled = False gbPropulsionTorque.Enabled = True
'PTO 'PTO
gbPTO.Enabled = False gbPTO.Enabled = False
......
...@@ -57,6 +57,7 @@ namespace TUGraz.VectoCommon.Models ...@@ -57,6 +57,7 @@ namespace TUGraz.VectoCommon.Models
case GearboxType.ATSerial: return "Automatic Transmission - Serial (AT-S)"; //todo mk20211210 shouldn't we call it APT-S? case GearboxType.ATSerial: return "Automatic Transmission - Serial (AT-S)"; //todo mk20211210 shouldn't we call it APT-S?
case GearboxType.ATPowerSplit: return "Automatic Transmission - PowerSplit (AT-P)";//todo mk20211210 shouldn't we call it APT-P? case GearboxType.ATPowerSplit: return "Automatic Transmission - PowerSplit (AT-P)";//todo mk20211210 shouldn't we call it APT-P?
case GearboxType.APTN: return "Automatic Transmission - No Torque Converter (APT-N)"; case GearboxType.APTN: return "Automatic Transmission - No Torque Converter (APT-N)";
case GearboxType.IHPC: return "IHPC Transmission";
case GearboxType.DrivingCycle: return "Gear from Driving Cycle"; case GearboxType.DrivingCycle: return "Gear from Driving Cycle";
default: throw new ArgumentOutOfRangeException("GearboxType", type, null); default: throw new ArgumentOutOfRangeException("GearboxType", type, null);
} }
......
...@@ -577,6 +577,7 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -577,6 +577,7 @@ namespace TUGraz.VectoCore.Models.Declaration
switch (type) { switch (type) {
case GearboxType.AMT: case GearboxType.AMT:
case GearboxType.APTN: case GearboxType.APTN:
case GearboxType.IHPC:
// TODO MQ: 2020-10-14: compute for AMT with ICE and AMT with EM differently // TODO MQ: 2020-10-14: compute for AMT with ICE and AMT with EM differently
return ComputeEfficiencyShiftPolygon(gearIdx, fullLoadCurve, gears, engine, axlegearRatio, dynamicTyreRadius); return ComputeEfficiencyShiftPolygon(gearIdx, fullLoadCurve, gears, engine, axlegearRatio, dynamicTyreRadius);
case GearboxType.MT: case GearboxType.MT:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment