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 f38f6dfb authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge pull request #321 in VECTO/vecto-sim from...

Merge pull request #321 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:feature/VECTO-388-add-shift-losses-for-at-power-shifts to develop

* commit '3902baeb':
  change condition for disengage in cycle gearbox
  update Repo
  removed testcase: invalid input data
  bugfix cycle gearbox: always set torque converter locked when disengaged
  AT Gearbox: reset adding shift losses on commit; driver: handle time fail responses
  update repo
  update repo
  adding calculation of shift losses and testcases
  adding new parameters for simulation: powershift inertia factor, powershift shift time
parents be33aee4 3902baeb
No related branches found
No related tags found
No related merge requests found
Showing
with 1985 additions and 1618 deletions
......@@ -44,16 +44,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModelbasedTests", "VectoCor
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoLegacyTests", "Tools\VectoLegacyTests\VectoLegacyTests.csproj", "{49F0275A-4517-49FA-859E-77279B9C8B18}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoDB", "..\VECTO_API\VectoDB\VectoDB.csproj", "{2C58BA97-2954-4D19-920F-A24B78FC80A4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{E2F59611-1791-41C9-800B-30E4BEB6D887}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoXML", "..\VECTO_API\VectoXML\VectoXML.csproj", "{A5B6F376-5AAA-453E-8102-B2BA59B83403}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{D29E62A2-CF08-469F-B29F-1B25DCB35386}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoAPI", "..\VECTO_API\VectoAPI\VectoAPI.csproj", "{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoAPI Test", "..\VECTO_API\VectoAPI Test\VectoAPI Test.csproj", "{D959CB7C-F514-4F5E-9C33-684D0012474B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoEngineeringAPI", "..\VECTO_API\VectoEngineeringAPI\VectoEngineeringAPI.csproj", "{41314A40-AB3E-4F43-B1A4-58443F4014F2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoEngineeringAPITest", "..\VECTO_API\VectoEngineeringAPITest\VectoEngineeringAPITest.csproj", "{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Excel2XML", "..\VECTO_API\Excel2XML\Excel2XML.csproj", "{749F150A-F974-46DC-A1E2-F4153C54FC0D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoXMLImportExport", "..\VECTO_API\VectoXMLPlugin\VectoXMLImportExport.csproj", "{9958E236-C4C6-49A2-A58D-EF9D646BA3C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLTest", "..\VECTO_API\XMLWriterTest\XMLTest.csproj", "{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoXML", "..\VECTO_API\VectoXML\VectoXML.csproj", "{A5B6F376-5AAA-453E-8102-B2BA59B83403}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoDB", "..\VECTO_API\VectoDB\VectoDB.csproj", "{2C58BA97-2954-4D19-920F-A24B78FC80A4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -184,22 +194,6 @@ Global
{49F0275A-4517-49FA-859E-77279B9C8B18}.Release|Any CPU.Build.0 = Release|Any CPU
{49F0275A-4517-49FA-859E-77279B9C8B18}.Release|x64.ActiveCfg = Release|Any CPU
{49F0275A-4517-49FA-859E-77279B9C8B18}.Release|x86.ActiveCfg = Release|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Debug|x64.ActiveCfg = Debug|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Debug|x86.ActiveCfg = Debug|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Release|Any CPU.Build.0 = Release|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Release|x64.ActiveCfg = Release|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Release|x86.ActiveCfg = Release|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Debug|x64.ActiveCfg = Debug|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Debug|x86.ActiveCfg = Debug|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Release|Any CPU.Build.0 = Release|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Release|x64.ActiveCfg = Release|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Release|x86.ActiveCfg = Release|Any CPU
{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Debug|x64.ActiveCfg = Debug|Any CPU
......@@ -208,6 +202,14 @@ Global
{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Release|Any CPU.Build.0 = Release|Any CPU
{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Release|x64.ActiveCfg = Release|Any CPU
{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64}.Release|x86.ActiveCfg = Release|Any CPU
{D959CB7C-F514-4F5E-9C33-684D0012474B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D959CB7C-F514-4F5E-9C33-684D0012474B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D959CB7C-F514-4F5E-9C33-684D0012474B}.Debug|x64.ActiveCfg = Debug|Any CPU
{D959CB7C-F514-4F5E-9C33-684D0012474B}.Debug|x86.ActiveCfg = Debug|Any CPU
{D959CB7C-F514-4F5E-9C33-684D0012474B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D959CB7C-F514-4F5E-9C33-684D0012474B}.Release|Any CPU.Build.0 = Release|Any CPU
{D959CB7C-F514-4F5E-9C33-684D0012474B}.Release|x64.ActiveCfg = Release|Any CPU
{D959CB7C-F514-4F5E-9C33-684D0012474B}.Release|x86.ActiveCfg = Release|Any CPU
{41314A40-AB3E-4F43-B1A4-58443F4014F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41314A40-AB3E-4F43-B1A4-58443F4014F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41314A40-AB3E-4F43-B1A4-58443F4014F2}.Debug|x64.ActiveCfg = Debug|Any CPU
......@@ -216,6 +218,54 @@ Global
{41314A40-AB3E-4F43-B1A4-58443F4014F2}.Release|Any CPU.Build.0 = Release|Any CPU
{41314A40-AB3E-4F43-B1A4-58443F4014F2}.Release|x64.ActiveCfg = Release|Any CPU
{41314A40-AB3E-4F43-B1A4-58443F4014F2}.Release|x86.ActiveCfg = Release|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Debug|x64.ActiveCfg = Debug|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Debug|x86.ActiveCfg = Debug|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Release|Any CPU.Build.0 = Release|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Release|x64.ActiveCfg = Release|Any CPU
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE}.Release|x86.ActiveCfg = Release|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Debug|x64.ActiveCfg = Debug|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Debug|x86.ActiveCfg = Debug|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Release|Any CPU.Build.0 = Release|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Release|x64.ActiveCfg = Release|Any CPU
{749F150A-F974-46DC-A1E2-F4153C54FC0D}.Release|x86.ActiveCfg = Release|Any CPU
{9958E236-C4C6-49A2-A58D-EF9D646BA3C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9958E236-C4C6-49A2-A58D-EF9D646BA3C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9958E236-C4C6-49A2-A58D-EF9D646BA3C4}.Debug|x64.ActiveCfg = Debug|Any CPU
{9958E236-C4C6-49A2-A58D-EF9D646BA3C4}.Debug|x86.ActiveCfg = Debug|Any CPU
{9958E236-C4C6-49A2-A58D-EF9D646BA3C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9958E236-C4C6-49A2-A58D-EF9D646BA3C4}.Release|Any CPU.Build.0 = Release|Any CPU
{9958E236-C4C6-49A2-A58D-EF9D646BA3C4}.Release|x64.ActiveCfg = Release|Any CPU
{9958E236-C4C6-49A2-A58D-EF9D646BA3C4}.Release|x86.ActiveCfg = Release|Any CPU
{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C}.Debug|x64.ActiveCfg = Debug|Any CPU
{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C}.Debug|x86.ActiveCfg = Debug|Any CPU
{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C}.Release|Any CPU.Build.0 = Release|Any CPU
{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C}.Release|x64.ActiveCfg = Release|Any CPU
{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C}.Release|x86.ActiveCfg = Release|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Debug|x64.ActiveCfg = Debug|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Debug|x86.ActiveCfg = Debug|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Release|Any CPU.Build.0 = Release|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Release|x64.ActiveCfg = Release|Any CPU
{A5B6F376-5AAA-453E-8102-B2BA59B83403}.Release|x86.ActiveCfg = Release|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Debug|x64.ActiveCfg = Debug|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Debug|x86.ActiveCfg = Debug|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Release|Any CPU.Build.0 = Release|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Release|x64.ActiveCfg = Release|Any CPU
{2C58BA97-2954-4D19-920F-A24B78FC80A4}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -230,12 +280,15 @@ Global
{6589CAEC-ECC9-4BCC-9699-DE3F22BBCBD4} = {351FF7E8-B56B-445E-8E98-A61E07C990DA}
{2320CD6F-FE7B-4341-A9BB-3ABCA7EF18F6} = {351FF7E8-B56B-445E-8E98-A61E07C990DA}
{E8B0B447-1A54-4BEC-A160-AF0017000781} = {351FF7E8-B56B-445E-8E98-A61E07C990DA}
{749F150A-F974-46DC-A1E2-F4153C54FC0D} = {351FF7E8-B56B-445E-8E98-A61E07C990DA}
{79A066AD-69A9-4223-90F6-6ED5D2D084F4} = {73A5BF70-6168-456F-95E5-A1402BFA488C}
{A0256B2A-09F8-45AD-B46A-FD98D7AAAA0C} = {CC93EA68-F3FE-4BCB-9292-1101F94A4D09}
{49F0275A-4517-49FA-859E-77279B9C8B18} = {351FF7E8-B56B-445E-8E98-A61E07C990DA}
{2C58BA97-2954-4D19-920F-A24B78FC80A4} = {351FF7E8-B56B-445E-8E98-A61E07C990DA}
{A5B6F376-5AAA-453E-8102-B2BA59B83403} = {E2F59611-1791-41C9-800B-30E4BEB6D887}
{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64} = {E2F59611-1791-41C9-800B-30E4BEB6D887}
{41314A40-AB3E-4F43-B1A4-58443F4014F2} = {E2F59611-1791-41C9-800B-30E4BEB6D887}
{512C2CD1-E5BE-4F6B-943B-2BFA7E0CBD64} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{D959CB7C-F514-4F5E-9C33-684D0012474B} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{41314A40-AB3E-4F43-B1A4-58443F4014F2} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{35FBDFEF-07E6-4E2C-8C18-4753266A6EDE} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{9958E236-C4C6-49A2-A58D-EF9D646BA3C4} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{CA0B0104-9FAC-4BE4-8CF6-F3C81A84189C} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{A5B6F376-5AAA-453E-8102-B2BA59B83403} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
{2C58BA97-2954-4D19-920F-A24B78FC80A4} = {D29E62A2-CF08-469F-B29F-1B25DCB35386}
EndGlobalSection
EndGlobal
......@@ -78,11 +78,11 @@ Partial Class GearboxForm
Me.Label20 = New System.Windows.Forms.Label()
Me.Label19 = New System.Windows.Forms.Label()
Me.PnTorqRes = New System.Windows.Forms.Panel()
'Me.Label25 = New System.Windows.Forms.Label()
Me.Label25 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.TbTqResv = New System.Windows.Forms.TextBox()
Me.TbShiftTime = New System.Windows.Forms.TextBox()
Me.TbMinTimeBetweenShifts = New System.Windows.Forms.TextBox()
Me.Label12 = New System.Windows.Forms.Label()
Me.Label13 = New System.Windows.Forms.Label()
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
......@@ -100,6 +100,9 @@ Partial Class GearboxForm
Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.PnTC = New System.Windows.Forms.Panel()
Me.Label26 = New System.Windows.Forms.Label()
Me.tbTCmaxSpeed = New System.Windows.Forms.TextBox()
Me.Label27 = New System.Windows.Forms.Label()
Me.BtTCShiftFileBrowse = New System.Windows.Forms.Button()
Me.Label17 = New System.Windows.Forms.Label()
Me.TBTCShiftPolygon = New System.Windows.Forms.TextBox()
......@@ -120,10 +123,14 @@ Partial Class GearboxForm
Me.Label32 = New System.Windows.Forms.Label()
Me.PnInertiaTI = New System.Windows.Forms.Panel()
Me.PicBox = New System.Windows.Forms.PictureBox()
Me.Label25 = New System.Windows.Forms.Label()
Me.Label26 = New System.Windows.Forms.Label()
Me.tbTCmaxSpeed = New System.Windows.Forms.TextBox()
Me.Label27 = New System.Windows.Forms.Label()
Me.GroupBox5 = New System.Windows.Forms.GroupBox()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.lbAtShiftTime = New System.Windows.Forms.Label()
Me.tbATShiftTime = New System.Windows.Forms.TextBox()
Me.Label28 = New System.Windows.Forms.Label()
Me.Label29 = New System.Windows.Forms.Label()
Me.tbATInertiaFactor = New System.Windows.Forms.TextBox()
Me.lbATInertiaFactor = New System.Windows.Forms.Label()
Me.ToolStrip1.SuspendLayout()
Me.StatusStrip1.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
......@@ -137,6 +144,8 @@ Partial Class GearboxForm
Me.GroupBox4.SuspendLayout()
Me.PnInertiaTI.SuspendLayout()
CType(Me.PicBox, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox5.SuspendLayout()
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'ToolStrip1
......@@ -384,7 +393,7 @@ Partial Class GearboxForm
'
Me.GrGearShift.Controls.Add(Me.GroupBox1)
Me.GrGearShift.Controls.Add(Me.PnTorqRes)
Me.GrGearShift.Controls.Add(Me.TbShiftTime)
Me.GrGearShift.Controls.Add(Me.TbMinTimeBetweenShifts)
Me.GrGearShift.Controls.Add(Me.Label12)
Me.GrGearShift.Controls.Add(Me.Label13)
Me.GrGearShift.Controls.Add(Me.GroupBox2)
......@@ -537,12 +546,12 @@ Partial Class GearboxForm
Me.TbTqResv.Size = New System.Drawing.Size(57, 20)
Me.TbTqResv.TabIndex = 0
'
'TbShiftTime
'TbMinTimeBetweenShifts
'
Me.TbShiftTime.Location = New System.Drawing.Point(215, 52)
Me.TbShiftTime.Name = "TbShiftTime"
Me.TbShiftTime.Size = New System.Drawing.Size(57, 20)
Me.TbShiftTime.TabIndex = 3
Me.TbMinTimeBetweenShifts.Location = New System.Drawing.Point(215, 52)
Me.TbMinTimeBetweenShifts.Name = "TbMinTimeBetweenShifts"
Me.TbMinTimeBetweenShifts.Size = New System.Drawing.Size(57, 20)
Me.TbMinTimeBetweenShifts.TabIndex = 3
'
'Label12
'
......@@ -558,9 +567,9 @@ Partial Class GearboxForm
Me.Label13.AutoSize = True
Me.Label13.Location = New System.Drawing.Point(27, 55)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(92, 13)
Me.Label13.Size = New System.Drawing.Size(162, 13)
Me.Label13.TabIndex = 8
Me.Label13.Text = "Minimum shift time"
Me.Label13.Text = "Minimum time between gearshifts"
'
'GroupBox2
'
......@@ -676,7 +685,7 @@ Partial Class GearboxForm
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.PnTC)
Me.GroupBox3.Location = New System.Drawing.Point(459, 440)
Me.GroupBox3.Location = New System.Drawing.Point(459, 377)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(414, 188)
Me.GroupBox3.TabIndex = 5
......@@ -706,6 +715,31 @@ Partial Class GearboxForm
Me.PnTC.Size = New System.Drawing.Size(402, 163)
Me.PnTC.TabIndex = 36
'
'Label26
'
Me.Label26.AutoSize = True
Me.Label26.Location = New System.Drawing.Point(5, 77)
Me.Label26.Name = "Label26"
Me.Label26.Size = New System.Drawing.Size(64, 13)
Me.Label26.TabIndex = 38
Me.Label26.Text = "Max. Speed"
'
'tbTCmaxSpeed
'
Me.tbTCmaxSpeed.Location = New System.Drawing.Point(75, 71)
Me.tbTCmaxSpeed.Name = "tbTCmaxSpeed"
Me.tbTCmaxSpeed.Size = New System.Drawing.Size(67, 20)
Me.tbTCmaxSpeed.TabIndex = 40
'
'Label27
'
Me.Label27.AutoSize = True
Me.Label27.Location = New System.Drawing.Point(148, 74)
Me.Label27.Name = "Label27"
Me.Label27.Size = New System.Drawing.Size(30, 13)
Me.Label27.TabIndex = 39
Me.Label27.Text = "[rpm]"
'
'BtTCShiftFileBrowse
'
Me.BtTCShiftFileBrowse.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
......@@ -885,7 +919,7 @@ Partial Class GearboxForm
Me.PnInertiaTI.Controls.Add(Me.Label48)
Me.PnInertiaTI.Controls.Add(Me.Label49)
Me.PnInertiaTI.Controls.Add(Me.TbTracInt)
Me.PnInertiaTI.Location = New System.Drawing.Point(469, 406)
Me.PnInertiaTI.Location = New System.Drawing.Point(459, 342)
Me.PnInertiaTI.Name = "PnInertiaTI"
Me.PnInertiaTI.Size = New System.Drawing.Size(398, 30)
Me.PnInertiaTI.TabIndex = 4
......@@ -896,46 +930,89 @@ Partial Class GearboxForm
Me.PicBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.PicBox.Location = New System.Drawing.Point(459, 28)
Me.PicBox.Name = "PicBox"
Me.PicBox.Size = New System.Drawing.Size(406, 372)
Me.PicBox.Size = New System.Drawing.Size(406, 308)
Me.PicBox.TabIndex = 48
Me.PicBox.TabStop = False
'
'Label25
'Label26
Me.Label25.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label25.AutoSize = True
Me.Label25.Location = New System.Drawing.Point(294, 9)
Me.Label25.Name = "Label25"
Me.Label25.Size = New System.Drawing.Size(129, 13)
Me.Label25.TabIndex = 1
Me.Label25.Text = "(Early shift-up, Skip gears)"
Me.Label26.AutoSize = True
Me.Label26.Location = New System.Drawing.Point(5, 77)
Me.Label26.Name = "Label26"
Me.Label26.Size = New System.Drawing.Size(64, 13)
Me.Label26.TabIndex = 38
Me.Label26.Text = "Max. Speed"
'GroupBox5
'
Me.GroupBox5.Controls.Add(Me.Panel1)
Me.GroupBox5.Location = New System.Drawing.Point(459, 572)
Me.GroupBox5.Name = "GroupBox5"
Me.GroupBox5.Size = New System.Drawing.Size(414, 76)
Me.GroupBox5.TabIndex = 49
Me.GroupBox5.TabStop = False
Me.GroupBox5.Text = "Power shift losses"
'
'Panel1
'
Me.Panel1.Controls.Add(Me.Label29)
Me.Panel1.Controls.Add(Me.tbATInertiaFactor)
Me.Panel1.Controls.Add(Me.lbATInertiaFactor)
Me.Panel1.Controls.Add(Me.Label28)
Me.Panel1.Controls.Add(Me.tbATShiftTime)
Me.Panel1.Controls.Add(Me.lbAtShiftTime)
Me.Panel1.Location = New System.Drawing.Point(6, 19)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(402, 38)
Me.Panel1.TabIndex = 0
'
'lbAtShiftTime
'
Me.lbAtShiftTime.AutoSize = True
Me.lbAtShiftTime.Location = New System.Drawing.Point(8, 4)
Me.lbAtShiftTime.Name = "lbAtShiftTime"
Me.lbAtShiftTime.Size = New System.Drawing.Size(50, 13)
Me.lbAtShiftTime.TabIndex = 0
Me.lbAtShiftTime.Text = "Shift time"
'
'tbATShiftTime
'
Me.tbATShiftTime.Location = New System.Drawing.Point(75, 1)
Me.tbATShiftTime.Name = "tbATShiftTime"
Me.tbATShiftTime.Size = New System.Drawing.Size(67, 20)
Me.tbATShiftTime.TabIndex = 4
'
'Label28
'
Me.Label28.AutoSize = True
Me.Label28.Location = New System.Drawing.Point(148, 4)
Me.Label28.Name = "Label28"
Me.Label28.Size = New System.Drawing.Size(18, 13)
Me.Label28.TabIndex = 41
Me.Label28.Text = "[s]"
'
'Label29
'
Me.Label29.AutoSize = True
Me.Label29.Location = New System.Drawing.Point(353, 4)
Me.Label29.Name = "Label29"
Me.Label29.Size = New System.Drawing.Size(16, 13)
Me.Label29.TabIndex = 44
Me.Label29.Text = "[-]"
'
'tbATInertiaFactor
'
Me.tbATInertiaFactor.Location = New System.Drawing.Point(280, 1)
Me.tbATInertiaFactor.Name = "tbATInertiaFactor"
Me.tbATInertiaFactor.Size = New System.Drawing.Size(67, 20)
Me.tbATInertiaFactor.TabIndex = 43
'
'lbATInertiaFactor
'
Me.lbATInertiaFactor.AutoSize = True
Me.lbATInertiaFactor.Location = New System.Drawing.Point(213, 4)
Me.lbATInertiaFactor.Name = "lbATInertiaFactor"
Me.lbATInertiaFactor.Size = New System.Drawing.Size(66, 13)
Me.lbATInertiaFactor.TabIndex = 42
Me.lbATInertiaFactor.Text = "Inertia factor"
'
'tbTCmaxSpeed
'
Me.tbTCmaxSpeed.Location = New System.Drawing.Point(75, 71)
Me.tbTCmaxSpeed.Name = "tbTCmaxSpeed"
Me.tbTCmaxSpeed.Size = New System.Drawing.Size(67, 20)
Me.tbTCmaxSpeed.TabIndex = 40
'
'Label27
'
Me.Label27.AutoSize = True
Me.Label27.Location = New System.Drawing.Point(148, 74)
Me.Label27.Name = "Label27"
Me.Label27.Size = New System.Drawing.Size(30, 13)
Me.Label27.TabIndex = 39
Me.Label27.Text = "[rpm]"
'GearboxForm
'
Me.AcceptButton = Me.ButOK
Me.CancelButton = Me.ButCancel
Me.ClientSize = New System.Drawing.Size(877, 702)
Me.Controls.Add(Me.GroupBox5)
Me.Controls.Add(Me.PicBox)
Me.Controls.Add(Me.PnInertiaTI)
Me.Controls.Add(Me.GroupBox4)
......@@ -978,6 +1055,9 @@ Partial Class GearboxForm
Me.PnInertiaTI.ResumeLayout(False)
Me.PnInertiaTI.PerformLayout()
CType(Me.PicBox, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox5.ResumeLayout(False)
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
......@@ -1023,7 +1103,7 @@ Partial Class GearboxForm
Friend WithEvents Label9 As Label
Friend WithEvents Label10 As Label
Friend WithEvents Label8 As Label
Friend WithEvents TbShiftTime As TextBox
Friend WithEvents TbMinTimeBetweenShifts As TextBox
Friend WithEvents Label12 As Label
Friend WithEvents Label13 As Label
Friend WithEvents CmOpenFile As ContextMenuStrip
......@@ -1069,4 +1149,12 @@ Partial Class GearboxForm
Friend WithEvents Label26 As System.Windows.Forms.Label
Friend WithEvents tbTCmaxSpeed As System.Windows.Forms.TextBox
Friend WithEvents Label27 As System.Windows.Forms.Label
Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents Label29 As System.Windows.Forms.Label
Friend WithEvents tbATInertiaFactor As System.Windows.Forms.TextBox
Friend WithEvents lbATInertiaFactor As System.Windows.Forms.Label
Friend WithEvents Label28 As System.Windows.Forms.Label
Friend WithEvents tbATShiftTime As System.Windows.Forms.TextBox
Friend WithEvents lbAtShiftTime As System.Windows.Forms.Label
End Class
......@@ -98,7 +98,7 @@ Public Class GearboxForm
gbxType = CType(CbGStype.SelectedValue, GearboxType) 'CType(Me.CbGStype.SelectedIndex, tGearbox)
TbTracInt.Text = gbxType.TractionInterruption().ToGUIFormat()
TbShiftTime.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat() 'cDeclaration.ShiftTime(GStype)
TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat() 'cDeclaration.MinTimeBetweenGearshift(GStype)
TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat() ' cDeclaration.TqResv
TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart * 100).ToGUIFormat() 'cDeclaration.TqResvStart
......@@ -197,7 +197,7 @@ Public Class GearboxForm
'Me.ChSkipGears.Checked = False 'set by CbGStype.SelectedIndexChanged
'Me.ChShiftInside.Checked = False 'set by CbGStype.SelectedIndexChanged
TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat()
TbShiftTime.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat()
TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat()
TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart * 100).ToGUIFormat()
TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() ' in m/s!
TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat()
......@@ -273,7 +273,7 @@ Public Class GearboxForm
Next
TbTqResv.Text = (gearbox.TorqueReserve * 100).ToGUIFormat()
TbShiftTime.Text = gearbox.ShiftTime.ToGUIFormat()
TbMinTimeBetweenShifts.Text = gearbox.MinTimeBetweenGearshift.ToGUIFormat()
TbTqResvStart.Text = (gearbox.StartTorqueReserve * 100).ToGUIFormat()
TbStartSpeed.Text = gearbox.StartSpeed.ToGUIFormat()
TbStartAcc.Text = gearbox.StartAcceleration.ToGUIFormat()
......@@ -296,6 +296,9 @@ Public Class GearboxForm
tbDownshiftAfterUpshift.Text = gearbox.DownshiftAferUpshiftDelay.ToGUIFormat()
tbUpshiftAfterDownshift.Text = gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat()
tbATInertiaFactor.Text = gearbox.PowerShiftInertiaFactor.ToGUIFormat()
tbATShiftTime.Text = gearbox.PowershiftShiftTime.ToGUIFormat()
CbGStype.SelectedValue = gearbox.Type
......@@ -362,14 +365,14 @@ Public Class GearboxForm
Next
gearbox.TorqueResv = TbTqResv.Text.ToDouble(0)
gearbox.ShiftTime = TbShiftTime.Text.ToDouble(0)
gearbox.ShiftTime = TbMinTimeBetweenShifts.Text.ToDouble(0)
gearbox.TorqueResvStart = TbTqResvStart.Text.ToDouble(0)
gearbox.StartSpeed = TbStartSpeed.Text.ToDouble(0)
gearbox.StartAcc = TbStartAcc.Text.ToDouble(0)
gearbox.Type = CType(CbGStype.SelectedValue, GearboxType)
gearbox.TorqueConverterEnabled = gearbox.Type.AutomaticTransmission()
gearbox.Type.AutomaticTransmission()
gearbox.TorqueConverterFile = TbTCfile.Text
gearbox.TorqueConverterReferenceRpm = TbTCrefrpm.Text.ToDouble(0)
gearbox.TorqueConverterInertia = TbTCinertia.Text.ToDouble(0)
......@@ -380,6 +383,10 @@ Public Class GearboxForm
gearbox.UpshiftAfterDownshift = tbUpshiftAfterDownshift.Text.ToDouble(0)
gearbox.UpshiftMinAcceleration = tbUpshiftMinAcceleration.Text.ToDouble(0)
gearbox.PSInertiaFactor = tbATInertiaFactor.Text.ToDouble(0)
gearbox.PSShiftTime = tbATShiftTime.Text.ToDouble(0)
If Not gearbox.SaveFile Then
MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical)
Return False
......@@ -449,7 +456,7 @@ Public Class GearboxForm
Change()
End Sub
Private Sub TbShiftTime_TextChanged(sender As Object, e As EventArgs) Handles TbShiftTime.TextChanged
Private Sub TbShiftTime_TextChanged(sender As Object, e As EventArgs) Handles TbMinTimeBetweenShifts.TextChanged
Change()
End Sub
......
......@@ -56,7 +56,6 @@ Public Class Gearbox
Public Type As GearboxType
'Torque Converter Input
Public TorqueConverterEnabled As Boolean
Public TorqueConverterReferenceRpm As Double
Private ReadOnly _torqueConverterFile As New SubPath
Public TorqueConverterInertia As Double
......@@ -68,6 +67,10 @@ Public Class Gearbox
Public UpshiftAfterDownshift As Double
Public TorqueConverterMaxSpeed As Double
Public PSInertiaFactor As Double
Public PSShiftTime As Double
Public Sub New()
_myPath = ""
......@@ -96,7 +99,6 @@ Public Class Gearbox
Type = GearboxType.MT
TorqueConverterEnabled = False
TorqueConverterReferenceRpm = 0
_torqueConverterFile.Clear()
......@@ -432,6 +434,17 @@ Public Class Gearbox
End Get
End Property
Public ReadOnly Property PowershiftShiftTime As Second Implements IGearboxEngineeringInputData.PowershiftShiftTime
Get
Return PSShiftTime.SI(Of Second)()
End Get
End Property
Public ReadOnly Property PowerShiftInertiaFactor As Double Implements IGearboxEngineeringInputData.PowerShiftInertiaFactor
Get
Return PSInertiaFactor
End Get
End Property
Public ReadOnly Property IGearboxEngineeringInputData_UpshiftMinAcceleration As MeterPerSquareSecond _
Implements IGearboxEngineeringInputData.UpshiftMinAcceleration
Get
......@@ -447,8 +460,8 @@ Public Class Gearbox
End Get
End Property
Public ReadOnly Property IGearboxEngineeringInputData_ShiftTime As Second _
Implements IGearboxEngineeringInputData.ShiftTime
Public ReadOnly Property MinTimeBetweenGearshift As Second _
Implements IGearboxEngineeringInputData.MinTimeBetweenGearshift
Get
Return ShiftTime.SI(Of Second)()
End Get
......
......@@ -6,6 +6,7 @@ Imports Newtonsoft.Json.Linq
Imports TUGraz.VectoCommon.InputData
Imports TUGraz.VectoCommon.Models
Imports TUGraz.VectoCommon.OutputData
Imports TUGraz.VectoCore
Imports TUGraz.VectoCore.Models.Declaration
Public Class JSONFileWriter
......@@ -77,70 +78,73 @@ Public Class JSONFileWriter
'Body
Dim body As Dictionary(Of String, Object) = New Dictionary(Of String, Object)
body.Add("SavedInDeclMode", Cfg.DeclMode)
body.Add(JsonKeys.SavedInDeclMode, Cfg.DeclMode)
body.Add("ModelName", gbx.ModelName)
body.Add(JsonKeys.Gearbox_ModelName, gbx.ModelName)
body.Add("Inertia", gbx.Inertia.Value())
body.Add("TracInt", gbx.TractionInterruption.Value())
body.Add(JsonKeys.Gearbox_Inertia, gbx.Inertia.Value())
body.Add(JsonKeys.Gearbox_TractionInterruption, gbx.TractionInterruption.Value())
Dim ls As New List(Of Dictionary(Of String, Object))
Dim axlgDict As New Dictionary(Of String, Object)
axlgDict.Add("Ratio", axl.Ratio)
axlgDict.Add(JsonKeys.Gearbox_Gear_Ratio, axl.Ratio)
If axl.LossMap Is Nothing Then
axlgDict.Add("Efficiency", axl.Efficiency)
axlgDict.Add(JsonKeys.Gearbox_Gear_Efficiency, axl.Efficiency)
Else
axlgDict.Add("LossMap", GetRelativePath(axl.LossMap.Source, Path.GetDirectoryName(filename)))
axlgDict.Add(JsonKeys.Gearbox_Gear_LossMapFile, GetRelativePath(axl.LossMap.Source, Path.GetDirectoryName(filename)))
End If
ls.Add(axlgDict)
For Each gear As ITransmissionInputData In gbx.Gears
Dim gearDict As New Dictionary(Of String, Object)
gearDict.Add("Ratio", gear.Ratio)
gearDict.Add(JsonKeys.Gearbox_Gear_Ratio, gear.Ratio)
If gear.LossMap Is Nothing Then
gearDict.Add("Efficiency", gear.Efficiency)
gearDict.Add(JsonKeys.Gearbox_Gear_Efficiency, gear.Efficiency)
Else
gearDict.Add("LossMap", GetRelativePath(gear.LossMap.Source, Path.GetDirectoryName(filename)))
gearDict.Add(JsonKeys.Gearbox_Gear_LossMapFile, GetRelativePath(gear.LossMap.Source, Path.GetDirectoryName(filename)))
End If
gearDict.Add("ShiftPolygon", If _
gearDict.Add(JsonKeys.Gearbox_Gear_ShiftPolygonFile, If _
(Not gbx.SavedInDeclarationMode AndAlso Not gear.ShiftPolygon Is Nothing,
GetRelativePath(gear.ShiftPolygon.Source, Path.GetDirectoryName(filename)), ""))
gearDict.Add("MaxTorque", If(gear.MaxTorque Is Nothing, "", gear.MaxTorque.Value().ToString()))
ls.Add(gearDict)
Next
body.Add("Gears", ls)
body.Add(JsonKeys.Gearbox_Gears, ls)
body.Add("TqReserve", gbx.TorqueReserve * 100)
body.Add(JsonKeys.Gearbox_TorqueReserve, gbx.TorqueReserve * 100)
'body.Add("SkipGears", gbx.sk)
body.Add("ShiftTime", gbx.ShiftTime.Value())
body.Add(JsonKeys.Gearbox_ShiftTime, gbx.MinTimeBetweenGearshift.Value())
'body.Add("EaryShiftUp", gbx.ShiftInside)
body.Add("StartTqReserve", gbx.StartTorqueReserve * 100)
body.Add("StartSpeed", gbx.StartSpeed.Value())
body.Add("StartAcc", gbx.StartAcceleration.Value())
body.Add(JsonKeys.Gearbox_StartTorqueReserve, gbx.StartTorqueReserve * 100)
body.Add(JsonKeys.Gearbox_StartSpeed, gbx.StartSpeed.Value())
body.Add(JsonKeys.Gearbox_StartAcceleration, gbx.StartAcceleration.Value())
body.Add("GearboxType", gbx.Type.ToString())
body.Add(JsonKeys.Gearbox_GearboxType, gbx.Type.ToString())
Dim torqueConverter As ITorqueConverterEngineeringInputData = gbx.TorqueConverter
Dim torqueConverterDict As New Dictionary(Of String, Object)
torqueConverterDict.Add("Enabled", Not torqueConverter Is Nothing AndAlso gbx.Type.AutomaticTransmission())
If gbx.Type.AutomaticTransmission() AndAlso Not torqueConverter Is Nothing Then
torqueConverterDict.Add("File", GetRelativePath(torqueConverter.TCData.Source, Path.GetDirectoryName(filename)))
torqueConverterDict.Add("RefRPM", torqueConverter.ReferenceRPM.AsRPM)
torqueConverterDict.Add("Inertia", torqueConverter.Inertia.Value())
torqueConverterDict.Add(JsonKeys.Gearbox_TorqueConverter_ReferenceRPM, torqueConverter.ReferenceRPM.AsRPM)
torqueConverterDict.Add(JsonKeys.Gearbox_TorqueConverter_Inertia, torqueConverter.Inertia.Value())
torqueConverterDict.Add("MaxTCSpeed", torqueConverter.MaxInputSpeed.AsRPM)
torqueConverterDict.Add("ShiftPolygon", If _
(Not gbx.SavedInDeclarationMode AndAlso Not torqueConverter.ShiftPolygon Is Nothing,
GetRelativePath(torqueConverter.ShiftPolygon.Source, Path.GetDirectoryName(filename)), ""))
End If
body.Add("TorqueConverter", torqueConverterDict)
body.Add(JsonKeys.Gearbox_TorqueConverter, torqueConverterDict)
body.Add("DownshiftAferUpshiftDelay", gbx.DownshiftAferUpshiftDelay.Value())
body.Add("UpshiftAfterDownshiftDelay", gbx.UpshiftAfterDownshiftDelay.Value())
body.Add("UpshiftMinAcceleration", gbx.UpshiftMinAcceleration.Value())
body.Add("PowershiftShiftTime", gbx.PowershiftShiftTime.Value())
body.Add("PowershiftInertiaFactor", gbx.PowerShiftInertiaFactor)
WriteFile(header, body, filename)
End Sub
......
......@@ -142,7 +142,7 @@ namespace TUGraz.VectoCommon.InputData
/// P086
/// cf. VECTO Input Parameters.xlsx
/// </summary>
Second ShiftTime { get; }
Second MinTimeBetweenGearshift { get; }
///// <summary>
///// P083
......@@ -187,14 +187,15 @@ namespace TUGraz.VectoCommon.InputData
/// </summary>
ITorqueConverterEngineeringInputData TorqueConverter { get; }
[Required, SIRange(0, double.MaxValue)]
Second DownshiftAferUpshiftDelay { get; }
[Required, SIRange(0, double.MaxValue)]
Second UpshiftAfterDownshiftDelay { get; }
[Required, SIRange(0, double.MaxValue)]
MeterPerSquareSecond UpshiftMinAcceleration { get; }
Second PowershiftShiftTime { get; }
double PowerShiftInertiaFactor { get; }
}
public interface ITorqueConverterEngineeringInputData : ITorqueConverterDeclarationInputData
......
......@@ -276,7 +276,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
};
}
public virtual Second ShiftTime
public virtual Second MinTimeBetweenGearshift
{
get { return Body.GetEx<double>(JsonKeys.Gearbox_ShiftTime).SI<Second>(); }
}
......@@ -336,6 +336,21 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
}
}
public Second PowershiftShiftTime
{
get
{
return Body["PowershiftShiftTime"] == null
? 0.8.SI<Second>()
: Body.GetEx<double>("PowershiftShiftTime").SI<Second>();
}
}
public double PowerShiftInertiaFactor
{
get { return Body["PowershiftInertiaFactor"] == null ? 1 : Body.GetEx<double>("PowershiftInertiaFactor"); }
}
#endregion
#region ITorqueConverterInputData
......
......@@ -137,7 +137,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
retVal.TractionInterruption = gearbox.TractionInterruption;
retVal.TorqueReserve = gearbox.TorqueReserve;
retVal.StartTorqueReserve = gearbox.StartTorqueReserve;
retVal.ShiftTime = gearbox.ShiftTime;
retVal.ShiftTime = gearbox.MinTimeBetweenGearshift;
retVal.StartSpeed = gearbox.StartSpeed;
retVal.StartAcceleration = gearbox.StartAcceleration;
......@@ -222,6 +222,11 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
}
}
if (retVal.Type.AutomaticTransmission()) {
retVal.PowershiftShiftTime = gearbox.PowershiftShiftTime;
retVal.PowershiftInertiaFactor = gearbox.PowerShiftInertiaFactor;
}
retVal.DownshiftAfterUpshiftDelay = gearbox.DownshiftAferUpshiftDelay;
retVal.UpshiftAfterDownshiftDelay = gearbox.UpshiftAfterDownshiftDelay;
retVal.UpshiftMinAcceleration = gearbox.UpshiftMinAcceleration;
......
......@@ -136,6 +136,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
/// </summary>
[ModalResultField(typeof(SI), name: "P_gbx_loss", caption: "P_gbx_loss [kW]", outputFactor: 1e-3)] P_gbx_loss,
[ModalResultField(typeof(SI), name: "P_gbx_shift_loss", caption: "P_gbx_shift_loss [kW]", outputFactor: 1e-3)] P_gbx_shift_loss,
/// <summary>
/// [kW] Losses in differential / axle transmission.
/// </summary>
......
......@@ -31,6 +31,7 @@
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.SimulationComponent;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
namespace TUGraz.VectoCore.Models.Simulation.DataBus
......@@ -63,7 +64,7 @@ namespace TUGraz.VectoCore.Models.Simulation.DataBus
/// <summary>
/// Returns the next gear during shifting operations
/// </summary>
uint NextGear { get; }
GearInfo NextGear { get; }
Second TractionInterruption { get; }
}
......
......@@ -138,7 +138,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
return Gearbox.GetGearData(gear);
}
public uint NextGear
public GearInfo NextGear
{
get { return Gearbox.NextGear; }
}
......
......@@ -98,6 +98,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
[Required, SIRange(0, double.MaxValue)]
public MeterPerSquareSecond UpshiftMinAcceleration { get; internal set; }
[SIRange(0.5, 1)]
public Second PowershiftShiftTime { get; internal set; }
[Range(0, 1)]
public double PowershiftInertiaFactor { get; internal set; }
// ReSharper disable once UnusedMember.Global -- used via Validation
public static ValidationResult ValidateGearboxData(GearboxData gearboxData, ValidationContext validationContext)
{
......@@ -110,6 +116,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
Math.Round(Constants.SimulationSettings.RequiredTorqueConverterSpeedRatio / gearboxData.Gears[1].Ratio *
gearboxData.Gears[1].TorqueConverterRatio, 4);
result.AddRange(gearboxData.TorqueConverterData.Validate(mode, gearboxData.Type));
//result.AddRange(gearboxData.PowershiftShiftTime.Validate(mode, gearboxData.Type));
//result.AddRange(gearboxData.PowershiftInertiaFactor.Validate(mode, gearboxData.Type));
validationContext.MemberName = "PowershiftInertiaFactor";
Validator.TryValidateProperty(gearboxData.PowershiftInertiaFactor, validationContext, result);
validationContext.MemberName = "PowershiftShiftTime";
Validator.TryValidateProperty(gearboxData.PowershiftShiftTime, validationContext, result);
}
if (result.Any()) {
......
......@@ -90,6 +90,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent
/// </value>
IGearbox Gearbox { get; set; }
uint NextGear { get; }
GearInfo NextGear { get; }
}
public class GearInfo
{
public uint Gear;
public bool TorqueConverterLocked;
}
}
\ No newline at end of file
......@@ -42,7 +42,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
/// </summary>
public class AMTShiftStrategy : ShiftStrategy
{
public override uint NextGear { get; set; }
protected uint _nextGear { get; set; }
public AMTShiftStrategy(GearboxData data, IDataBus dataBus) : base(data, dataBus)
{
......@@ -61,16 +61,21 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
(outAngularSpeed * Data.Gears[gear].Ratio).IsGreaterOrEqual(DataBus.EngineN95hSpeed);
}
public override GearInfo NextGear
{
get { return new GearInfo(){Gear = _nextGear, TorqueConverterLocked = false}; }
}
public override uint Engage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity)
{
while (NextGear > 1 && SpeedTooLowForEngine(NextGear, outAngularVelocity)) {
NextGear--;
while (_nextGear > 1 && SpeedTooLowForEngine(_nextGear, outAngularVelocity)) {
_nextGear--;
}
while (NextGear < Data.Gears.Count && SpeedTooHighForEngine(NextGear, outAngularVelocity)) {
NextGear++;
while (_nextGear < Data.Gears.Count && SpeedTooHighForEngine(_nextGear, outAngularVelocity)) {
_nextGear++;
}
return NextGear;
return _nextGear;
}
public override void Disengage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outEngineSpeed) {}
......@@ -138,14 +143,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
// emergency shift to not stall the engine ------------------------
NextGear = gear;
while (NextGear > 1 && SpeedTooLowForEngine(NextGear, outAngularVelocity)) {
NextGear--;
_nextGear = gear;
while (_nextGear > 1 && SpeedTooLowForEngine(_nextGear, outAngularVelocity)) {
_nextGear--;
}
while (NextGear < Data.Gears.Count && SpeedTooHighForEngine(NextGear, outAngularVelocity)) {
NextGear++;
while (_nextGear < Data.Gears.Count && SpeedTooHighForEngine(_nextGear, outAngularVelocity)) {
_nextGear++;
}
if (NextGear != gear) {
if (_nextGear != gear) {
return true;
}
......@@ -155,20 +160,20 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return false;
}
NextGear = CheckDownshift(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear);
if (NextGear != gear) {
_nextGear = CheckDownshift(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear);
if (_nextGear != gear) {
return true;
}
NextGear = CheckUpshift(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear);
_nextGear = CheckUpshift(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear);
if ((Data.Gears[NextGear].Ratio * outAngularVelocity - DataBus.EngineIdleSpeed) /
if ((Data.Gears[_nextGear].Ratio * outAngularVelocity - DataBus.EngineIdleSpeed) /
(DataBus.EngineRatedSpeed - DataBus.EngineIdleSpeed) <
Constants.SimulationSettings.ClutchClosingSpeedNorm && NextGear > 1) {
NextGear--;
Constants.SimulationSettings.ClutchClosingSpeedNorm && _nextGear > 1) {
_nextGear--;
}
return NextGear != gear;
return _nextGear != gear;
}
protected virtual uint CheckUpshift(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity,
......
......@@ -49,6 +49,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
private readonly IShiftStrategy _strategy;
protected internal readonly TorqueConverter TorqueConverter;
private IIdleController _idleController;
protected bool RequestAfterGearshift;
protected KilogramSquareMeter EngineInertia;
public bool TorqueConverterLocked
{
......@@ -63,7 +65,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
_strategy = strategy;
_strategy.Gearbox = this;
LastShift = -double.MaxValue.SI<Second>();
TorqueConverter = new TorqueConverter(this, _strategy, container, gearboxModelData.TorqueConverterData, engineInertia);
EngineInertia = engineInertia;
TorqueConverter = new TorqueConverter(this, _strategy, container, gearboxModelData.TorqueConverterData,
engineInertia);
}
public IIdleController IdleController
......@@ -88,7 +92,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
TorqueConverter.NextComponent = other;
}
public override uint NextGear
public override GearInfo NextGear
{
get { return _strategy.NextGear; }
}
......@@ -124,7 +129,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
if (!CurrentState.TorqueConverterLocked && !ModelData.Gears[Gear].HasTorqueConverter) {
throw new VectoSimulationException("Torque converter requested by strategy for gear without torque converter!");
throw new VectoSimulationException(
"Torque converter requested by strategy for gear without torque converter!");
}
var response = CurrentState.TorqueConverterLocked
? NextComponent.Initialize(inTorque, inAngularVelocity)
......@@ -139,7 +145,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
internal ResponseDryRun Initialize(uint gear, bool torqueConverterLocked, NewtonMeter outTorque,
PerSecond outAngularVelocity)
{
var effectiveRatio = torqueConverterLocked ? ModelData.Gears[gear].Ratio : ModelData.Gears[gear].TorqueConverterRatio;
var effectiveRatio = torqueConverterLocked
? ModelData.Gears[gear].Ratio
: ModelData.Gears[gear].TorqueConverterRatio;
var inAngularVelocity = outAngularVelocity * effectiveRatio;
var torqueLossResult = torqueConverterLocked
......@@ -153,7 +161,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
response = NextComponent.Initialize(inTorque, inAngularVelocity);
} else {
if (!ModelData.Gears[gear].HasTorqueConverter) {
throw new VectoSimulationException("Torque converter requested by strategy for gear without torque converter!");
throw new VectoSimulationException(
"Torque converter requested by strategy for gear without torque converter!");
}
response = TorqueConverter.Initialize(inTorque, inAngularVelocity);
}
......@@ -180,7 +189,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
Log.Debug("AT-Gearbox Power Request: torque: {0}, angularVelocity: {1}", outTorque, outAngularVelocity);
if (!dryRun &&
((DataBus.VehicleStopped && outAngularVelocity > 0) || (CurrentState.Disengaged && outTorque.IsGreater(0)))) {
((DataBus.VehicleStopped && outAngularVelocity > 0) ||
(CurrentState.Disengaged && outTorque.IsGreater(0)))) {
Gear = 1; //Strategy.InitGear(absTime, dt, outTorque, outAngularVelocity);
CurrentState.TorqueConverterLocked = false;
LastShift = absTime;
......@@ -190,6 +200,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
IResponse retVal;
var count = 0;
var loop = false;
if (RequestAfterGearshift) {
LastShift = absTime;
Gear = _strategy.Engage(absTime, dt, outTorque, outAngularVelocity);
CurrentState.PowershiftLosses = ComputeShiftLosses(dt, outTorque, outAngularVelocity);
}
do {
if (CurrentState.Disengaged || (DataBus.DriverBehavior == DrivingBehavior.Halted)) {
// only when vehicle is halted or close before halting
......@@ -201,9 +216,19 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
retVal.Switch()
.Case<ResponseGearShift>(r => {
if (ConsiderShiftLosses(_strategy.NextGear, outTorque)) {
retVal = new ResponseFailTimeInterval() {
Source = this,
DeltaT = ModelData.PowershiftShiftTime,
GearboxPowerRequest =
outTorque * (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0
};
RequestAfterGearshift = true;
} else {
loop = true;
Gear = _strategy.Engage(absTime, dt, outTorque, outAngularVelocity);
LastShift = absTime;
}
});
} while (loop && ++count < 2);
......@@ -211,6 +236,32 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return retVal;
}
protected internal NewtonMeter ComputeShiftLosses(Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity)
{
var torqueGbxIn = outTorque / ModelData.Gears[Gear].Ratio;
var deltaEngineSpeed = DataBus.EngineSpeed - outAngularVelocity * ModelData.Gears[Gear].Ratio;
var deltaClutchSpeed = (DataBus.EngineSpeed - PreviousState.OutAngularVelocity * ModelData.Gears[Gear].Ratio) / 2;
var torqueInertia = EngineInertia * deltaEngineSpeed / dt;
var averageEngineSpeed = (DataBus.EngineSpeed + outAngularVelocity * ModelData.Gears[Gear].Ratio) / 2;
var torqueLoss = (torqueGbxIn + torqueInertia) * deltaClutchSpeed / averageEngineSpeed;
return torqueLoss.Abs();
}
private bool ConsiderShiftLosses(GearInfo nextGear, NewtonMeter torqueOut)
{
if (torqueOut.IsSmaller(0)) {
return false;
}
if (nextGear.Gear == 0) {
return false;
}
if (ModelData.Gears[2].HasTorqueConverter) {
return false; // nextGear.TorqueConverterLocked || nextGear.Gear == 2;
}
return nextGear.TorqueConverterLocked;
}
private IResponse RequestEngaged(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity,
bool dryRun)
{
......@@ -230,7 +281,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var inTorque = outTorque / effectiveRatio + inTorqueLossResult.Value;
if (!CurrentState.TorqueConverterLocked && !ModelData.Gears[Gear].HasTorqueConverter) {
throw new VectoSimulationException("Torque converter requested by strategy for gear without torque converter!");
throw new VectoSimulationException(
"Torque converter requested by strategy for gear without torque converter!");
}
var inAngularVelocity = outAngularVelocity * effectiveRatio;
......@@ -240,6 +292,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
: 0.SI<NewtonMeter>();
inTorque += CurrentState.InertiaTorqueLossOut / effectiveRatio;
if (CurrentState.PowershiftLosses != null) {
inTorque += CurrentState.PowershiftLosses;
}
CurrentState.SetState(inTorque, inAngularVelocity, outTorque, outAngularVelocity);
CurrentState.Gear = Gear;
CurrentState.TransmissionTorqueLoss = inTorque - outTorque / effectiveRatio;
......@@ -248,7 +304,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return TorqueConverter.Request(absTime, dt, inTorque, inAngularVelocity, dryRun);
}
if (!dryRun &&
_strategy.ShiftRequired(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, Gear, LastShift)) {
_strategy.ShiftRequired(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, Gear,
LastShift)) {
return new ResponseGearShift() {
Source = this
};
......@@ -258,7 +315,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return NextComponent.Request(absTime, dt, inTorque, inAngularVelocity, dryRun);
}
private IResponse RequestDisengaged(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity,
private IResponse RequestDisengaged(Second absTime, Second dt, NewtonMeter outTorque,
PerSecond outAngularVelocity,
bool dryRun)
{
var avgAngularVelocity = (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0;
......@@ -271,7 +329,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
DeltaFullLoad = outTorque * avgAngularVelocity,
};
}
if ((outTorque * avgAngularVelocity).IsGreater(0.SI<Watt>(), Constants.SimulationSettings.LineSearchTolerance)) {
if ((outTorque * avgAngularVelocity).IsGreater(0.SI<Watt>(),
Constants.SimulationSettings.LineSearchTolerance)) {
return new ResponseOverload {
Source = this,
Delta = outTorque * avgAngularVelocity,
......@@ -279,7 +338,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
};
}
if ((outTorque * avgAngularVelocity).IsSmaller(0.SI<Watt>(), Constants.SimulationSettings.LineSearchTolerance)) {
if ((outTorque * avgAngularVelocity).IsSmaller(0.SI<Watt>(),
Constants.SimulationSettings.LineSearchTolerance)) {
return new ResponseUnderload {
Source = this,
Delta = outTorque * avgAngularVelocity,
......@@ -310,6 +370,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
container[ModalResultField.P_gbx_loss] = CurrentState.TransmissionTorqueLoss * avgInAngularSpeed;
container[ModalResultField.P_gbx_inertia] = CurrentState.InertiaTorqueLossOut * avgInAngularSpeed;
container[ModalResultField.P_gbx_in] = CurrentState.InTorque * avgInAngularSpeed;
container[ModalResultField.P_gbx_shift_loss] = CurrentState.PowershiftLosses == null
? 0.SI<Watt>()
: CurrentState.PowershiftLosses * avgInAngularSpeed;
container[ModalResultField.n_gbx_out_avg] = (PreviousState.OutAngularVelocity +
CurrentState.OutAngularVelocity) / 2.0;
......@@ -318,7 +381,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected override void DoCommitSimulationStep()
{
if (!CurrentState.Disengaged && CurrentState.TorqueLossResult != null && CurrentState.TorqueLossResult.Extrapolated) {
if (!CurrentState.Disengaged && CurrentState.TorqueLossResult != null &&
CurrentState.TorqueLossResult.Extrapolated) {
Log.Warn(
"Gear {0} LossMap data was extrapolated: range for loss map is not sufficient: n:{1}, torque:{2}, ratio:{3}",
Gear, CurrentState.OutAngularVelocity.ConvertTo().Rounds.Per.Minute, CurrentState.OutTorque,
......@@ -330,6 +394,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
ModelData.Gears[Gear].Ratio);
}
}
RequestAfterGearshift = false;
if (DataBus.VehicleStopped) {
CurrentState.Disengaged = true;
}
......@@ -344,6 +410,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
public bool TorqueConverterLocked;
public bool Disengaged = true;
public NewtonMeter PowershiftLosses;
}
}
}
\ No newline at end of file
......@@ -44,13 +44,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected readonly GearboxData Data;
protected readonly IDataBus DataBus;
private ATGearbox _gearbox;
internal readonly NextGearState nextGearState;
protected readonly NextGearState _nextGear;
public ATShiftStrategy(GearboxData data, IDataBus dataBus)
{
Data = data;
DataBus = dataBus;
nextGearState = new NextGearState();
_nextGear = new NextGearState();
}
//public ATGearbox Gearbox { get; protected internal set; }
......@@ -73,7 +73,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
continue;
}
if (!IsBelowDownShiftCurve(gear, response.EnginePowerRequest / response.EngineSpeed, response.EngineSpeed)) {
if (
!IsBelowDownShiftCurve(gear, response.EnginePowerRequest / response.EngineSpeed,
response.EngineSpeed)) {
_gearbox.TorqueConverterLocked = torqueConverterLocked;
_gearbox.Disengaged = false;
return gear;
......@@ -91,20 +93,20 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// 0 -> 1C: drive off after stop - engage first gear
if (_gearbox.Disengaged && outAngularVelocity.IsGreater(0.SI<PerSecond>())) {
Log.Debug("shift requried: drive off after vehicle stopped");
nextGearState.SetState(absTime, false, 1, false);
_nextGear.SetState(absTime, false, 1, false);
return true;
}
// _ -> 0: disengage before halting
if (DataBus.DriverBehavior == DrivingBehavior.Braking && outTorque.IsSmaller(0) &&
DataBus.VehicleSpeed.IsSmaller(Constants.SimulationSettings.ATGearboxDisengageWhenHaltingSpeed)) {
nextGearState.SetState(absTime, true, 1, false);
_nextGear.SetState(absTime, true, 1, false);
return true;
}
// 1C -> 0: disengange when negative T_out and positive T_in
if (gear == 1 && !_gearbox.TorqueConverterLocked && outTorque.IsSmaller(0) && inTorque.IsGreater(0)) {
nextGearState.SetState(absTime, true, 1, false);
_nextGear.SetState(absTime, true, 1, false);
return true;
}
......@@ -114,7 +116,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// L -> 0: disengage if inAngularVelocity == 0
if (_gearbox.TorqueConverterLocked && inAngularVelocity.IsEqual(0.SI<PerSecond>())) {
nextGearState.SetState(absTime, true, 1, false);
_nextGear.SetState(absTime, true, 1, false);
return true;
}
......@@ -136,11 +138,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return false;
}
if (CheckDownshift(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear, lastShiftTime)) {
if (CheckDownshift(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear,
lastShiftTime)) {
return true;
}
if (CheckUpshift(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear, lastShiftTime)) {
if (CheckUpshift(absTime, dt, outTorque, outAngularVelocity, inTorque, inAngularVelocity, gear,
lastShiftTime)) {
return true;
}
......@@ -151,14 +155,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
// C -> L: switch from torque converter to locked gear
if (!_gearbox.TorqueConverterLocked && Data.Gears[gear].HasLockedGear) {
nextGearState.SetState(absTime, false, gear, true);
_nextGear.SetState(absTime, false, gear, true);
return;
}
// L -> L+1
// C -> C+1
if (Data.Gears.ContainsKey(gear + 1)) {
nextGearState.SetState(absTime, false, gear + 1, _gearbox.TorqueConverterLocked);
_nextGear.SetState(absTime, false, gear + 1, _gearbox.TorqueConverterLocked);
return;
}
......@@ -171,14 +175,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
// L -> C
if (_gearbox.TorqueConverterLocked && Data.Gears[gear].HasTorqueConverter) {
nextGearState.SetState(absTime, false, gear, false);
_nextGear.SetState(absTime, false, gear, false);
return;
}
// L -> L-1
// C -> C-1
if (Data.Gears.ContainsKey(gear - 1)) {
nextGearState.SetState(absTime, false, gear - 1, _gearbox.TorqueConverterLocked);
_nextGear.SetState(absTime, false, gear - 1, _gearbox.TorqueConverterLocked);
return;
}
......@@ -204,17 +208,21 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return false;
}
if (IsAboveUpShiftCurve(gear, enginePower / nextEngineSpeed, nextEngineSpeed, _gearbox.TorqueConverterLocked) &&
if (
IsAboveUpShiftCurve(gear, enginePower / nextEngineSpeed, nextEngineSpeed,
_gearbox.TorqueConverterLocked) &&
enginePower.IsSmallerOrEqual(DataBus.EngineStationaryFullPower(nextEngineSpeed))) {
Upshift(absTime, gear);
return true;
}
}
if (!_gearbox.TorqueConverterLocked && Data.Gears.ContainsKey(gear + 1) && Data.Gears[gear + 1].HasTorqueConverter) {
if (!_gearbox.TorqueConverterLocked && Data.Gears.ContainsKey(gear + 1) &&
Data.Gears[gear + 1].HasTorqueConverter) {
// C -> C+1
var gearRatio = Data.Gears[gear + 1].TorqueConverterRatio / Data.Gears[gear].TorqueConverterRatio;
var minEngineSpeed = VectoMath.Min(700.RPMtoRad(), gearRatio * (DataBus.EngineN80hSpeed - 150.RPMtoRad()));
var minEngineSpeed = VectoMath.Min(700.RPMtoRad(),
gearRatio * (DataBus.EngineN80hSpeed - 150.RPMtoRad()));
var nextGbxInSpeed = outAngularVelocity * Data.Gears[gear + 1].TorqueConverterRatio;
var nextGbxInTorque = outTorque / Data.Gears[gear + 1].TorqueConverterRatio;
var tcOperatingPoint = _gearbox.TorqueConverter.FindOperatingPoint(nextGbxInTorque, nextGbxInSpeed);
......@@ -246,13 +254,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public uint Engage(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity)
{
if (nextGearState.AbsTime != null && nextGearState.AbsTime.IsEqual(absTime)) {
_gearbox.TorqueConverterLocked = nextGearState.TorqueConverterLocked;
_gearbox.Disengaged = nextGearState.Disengaged;
nextGearState.AbsTime = null;
return nextGearState.Gear;
if (_nextGear.AbsTime != null && _nextGear.AbsTime.IsEqual(absTime)) {
_gearbox.TorqueConverterLocked = _nextGear.TorqueConverterLocked;
_gearbox.Disengaged = _nextGear.Disengaged;
_nextGear.AbsTime = null;
return _nextGear.Gear;
}
nextGearState.AbsTime = null;
_nextGear.AbsTime = null;
return _gearbox.Gear;
}
......@@ -268,17 +276,19 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
var myGearbox = value as ATGearbox;
if (myGearbox == null) {
throw new VectoException("AT Shift strategy can only handle AT gearboxes, given: {0}", value.GetType());
throw new VectoException("AT Shift strategy can only handle AT gearboxes, given: {0}",
value.GetType());
}
_gearbox = myGearbox;
}
}
public uint NextGear
public GearInfo NextGear
{
get { return nextGearState.Gear; }
get { return new GearInfo() { Gear = _nextGear.Gear, TorqueConverterLocked = _nextGear.TorqueConverterLocked }; }
}
/// <summary>
/// Tests if the operating point is below the down-shift curve (=outside of shift curve).
/// </summary>
......@@ -303,7 +313,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
bool torqueConverterLocked)
{
if (torqueConverterLocked) {
return gear < Data.Gears.Keys.Max() && Data.Gears[gear].ShiftPolygon.IsAboveUpshiftCurve(inTorque, inEngineSpeed);
return gear < Data.Gears.Keys.Max() &&
Data.Gears[gear].ShiftPolygon.IsAboveUpshiftCurve(inTorque, inEngineSpeed);
}
return gear < Data.Gears.Keys.Max() &&
Data.Gears[gear].TorqueConverterShiftPolygon.IsAboveUpshiftCurve(inTorque, inEngineSpeed);
......
......@@ -111,7 +111,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return ModelData.Gears[gear];
}
public abstract uint NextGear { get; }
public abstract GearInfo NextGear { get; }
public Second TractionInterruption
{
......
......@@ -518,7 +518,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public IResponse Request(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity,
bool dryRun = false)
{
if (!_dataBus.VehicleStopped && _dataBus.Gear != _dataBus.NextGear && _dataBus.Gear != 0 && _dataBus.NextGear != 0) {
if (!_dataBus.VehicleStopped && _dataBus.Gear != _dataBus.NextGear.Gear && _dataBus.Gear != 0 &&
_dataBus.NextGear.Gear != 0) {
return RequestDoubleClutch(absTime, dt, outTorque, outAngularVelocity, dryRun);
} else {
return RequestIdling(absTime, dt, outTorque, outAngularVelocity, dryRun);
......@@ -535,7 +536,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
throw new VectoException("Torque has to be 0 for idle requests!");
}
var targetVelocity = _engine.PreviousState.EngineSpeed / _dataBus.GetGearData(_dataBus.Gear).Ratio *
_dataBus.GetGearData(_dataBus.NextGear).Ratio;
_dataBus.GetGearData(_dataBus.NextGear.Gear).Ratio;
var velocitySlope = (targetVelocity - _engine.PreviousState.EngineSpeed) / _dataBus.TractionInterruption;
var nextAngularSpeed = (velocitySlope * dt + _engine.PreviousState.EngineSpeed);
......
......@@ -68,9 +68,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public override void Connect(ITnOutPort other)
{
base.Connect(other);
if (TorqueConverter != null)
if (TorqueConverter != null) {
TorqueConverter.NextComponent = other;
}
}
public override IResponse Initialize(NewtonMeter outTorque, PerSecond outAngularVelocity)
{
......@@ -144,7 +145,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
// mk 2016-11-30: added additional check for outAngularVelocity due to failing test: MeasuredSpeed_Gear_AT_PS_Run
var retVal = Gear == 0 || (outAngularVelocity.IsSmallerOrEqual(0, 1) && outTorque.IsSmallerOrEqual(0, 1))
// mq 2016-12-16: changed check to vehicle halted due to failing test: MeasuredSpeed_Gear_AT_*
var retVal = Gear == 0 || DataBus.DriverBehavior == DrivingBehavior.Halted
//|| (outAngularVelocity.IsSmallerOrEqual(0, 1) && outTorque.IsSmallerOrEqual(0, 1))
? RequestDisengaged(absTime, dt, outTorque, outAngularVelocity, dryRun)
: RequestEngaged(absTime, dt, outTorque, outAngularVelocity, dryRun);
......@@ -238,8 +241,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// Gear = 0;
// return RequestDisengaged(absTime, dt, outTorque, outAngularVelocity, dryRun);
//}
if (TorqueConverter != null)
if (TorqueConverter != null) {
TorqueConverter.Locked(CurrentState.InTorque, CurrentState.InAngularVelocity);
}
var response = NextComponent.Request(absTime, dt, inTorque, inAngularVelocity);
response.GearboxPowerRequest = outTorque * avgOutAngularVelocity;
return response;
......@@ -305,11 +309,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
motoringSpeed = motoringSpeed.LimitTo(DataBus.EngineIdleSpeed, DataBus.EngineSpeed);
}
if (TorqueConverter != null)
TorqueConverter.Locked(CurrentState.InTorque, motoringSpeed);
disengagedResponse = NextComponent.Request(absTime, dt, 0.SI<NewtonMeter>(), motoringSpeed);
}
if (TorqueConverter != null) {
TorqueConverter.Locked(CurrentState.InTorque, motoringSpeed);
}
disengagedResponse.GearboxPowerRequest = outTorque * avgOutAngularVelocity;
return disengagedResponse;
}
......@@ -350,9 +356,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
#region ICluchInfo
public override uint NextGear
public override GearInfo NextGear
{
get
{
get { return DataBus.CycleData.RightSample.Gear; }
return new GearInfo() {
Gear = DataBus.CycleData.RightSample.Gear,
TorqueConverterLocked = !DataBus.CycleData.RightSample.TorqueConverterActive ?? true
};
}
}
public override bool ClutchClosed(Second absTime)
......@@ -395,7 +407,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public IGearbox Gearbox { get; set; }
public uint NextGear
public GearInfo NextGear
{
get { throw new System.NotImplementedException(); }
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment