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

implementing Engine StopStart

parent 67b50709
No related branches found
No related tags found
No related merge requests found
Showing
with 1646 additions and 1268 deletions
......@@ -63,6 +63,10 @@ Partial Class VectoJobForm
Me.ButtonMAP = New System.Windows.Forms.Button()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPgDriver = New System.Windows.Forms.TabPage()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.Label17 = New System.Windows.Forms.Label()
Me.tbEngineStopStartThreshold = New System.Windows.Forms.TextBox()
Me.Label16 = New System.Windows.Forms.Label()
Me.GrVACC = New System.Windows.Forms.GroupBox()
Me.Label15 = New System.Windows.Forms.Label()
Me.TbDesMaxFile = New System.Windows.Forms.TextBox()
......@@ -129,25 +133,31 @@ Partial Class VectoJobForm
Me.TbMass = New System.Windows.Forms.TextBox()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.lblEngineCharacteristics = New System.Windows.Forms.Label()
Me.TabPgGen.SuspendLayout()
Me.GrCycles.SuspendLayout()
Me.GrAux.SuspendLayout()
CType(Me.picAuxInfo, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabControl1.SuspendLayout()
Me.TabPgDriver.SuspendLayout()
Me.GrVACC.SuspendLayout()
Me.GrLAC.SuspendLayout()
Me.pnLookAheadCoasting.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.PnEcoRoll.SuspendLayout()
Me.StatusStrip1.SuspendLayout()
Me.ToolStrip1.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.CmOpenFile.SuspendLayout()
CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PicBox, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
Me.Label18 = New System.Windows.Forms.Label()
Me.tbEngineOffThreshold = New System.Windows.Forms.TextBox()
Me.Label19 = New System.Windows.Forms.Label()
Me.tbEssUtility = New System.Windows.Forms.TextBox()
Me.Label24 = New System.Windows.Forms.Label()
Me.TabPgGen.SuspendLayout
Me.GrCycles.SuspendLayout
Me.GrAux.SuspendLayout
CType(Me.picAuxInfo,System.ComponentModel.ISupportInitialize).BeginInit
Me.TabControl1.SuspendLayout
Me.TabPgDriver.SuspendLayout
Me.GroupBox3.SuspendLayout
Me.GrVACC.SuspendLayout
Me.GrLAC.SuspendLayout
Me.pnLookAheadCoasting.SuspendLayout
Me.GroupBox1.SuspendLayout
Me.GroupBox2.SuspendLayout
Me.PnEcoRoll.SuspendLayout
Me.StatusStrip1.SuspendLayout
Me.ToolStrip1.SuspendLayout
CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).BeginInit
Me.CmOpenFile.SuspendLayout
CType(Me.PicVehicle,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me.PicBox,System.ComponentModel.ISupportInitialize).BeginInit
Me.SuspendLayout
'
'TabPgGen
'
......@@ -168,7 +178,7 @@ Partial Class VectoJobForm
Me.TabPgGen.Size = New System.Drawing.Size(527, 487)
Me.TabPgGen.TabIndex = 0
Me.TabPgGen.Text = "General"
Me.TabPgGen.UseVisualStyleBackColor = True
Me.TabPgGen.UseVisualStyleBackColor = true
'
'GrCycles
'
......@@ -182,14 +192,14 @@ Partial Class VectoJobForm
Me.GrCycles.Name = "GrCycles"
Me.GrCycles.Size = New System.Drawing.Size(515, 138)
Me.GrCycles.TabIndex = 10
Me.GrCycles.TabStop = False
Me.GrCycles.TabStop = false
Me.GrCycles.Text = "Cycles"
'
'Label2
'
Me.Label2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
Me.Label2.AutoSize = True
Me.Label2.AutoSize = true
Me.Label2.Location = New System.Drawing.Point(391, 109)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(118, 13)
......@@ -202,18 +212,18 @@ Partial Class VectoJobForm
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
Me.LvCycles.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1})
Me.LvCycles.FullRowSelect = True
Me.LvCycles.GridLines = True
Me.LvCycles.FullRowSelect = true
Me.LvCycles.GridLines = true
Me.LvCycles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None
Me.LvCycles.HideSelection = False
Me.LvCycles.LabelEdit = True
Me.LvCycles.HideSelection = false
Me.LvCycles.LabelEdit = true
Me.LvCycles.Location = New System.Drawing.Point(6, 19)
Me.LvCycles.MultiSelect = False
Me.LvCycles.MultiSelect = false
Me.LvCycles.Name = "LvCycles"
Me.LvCycles.Size = New System.Drawing.Size(503, 89)
Me.LvCycles.TabIndex = 0
Me.LvCycles.TabStop = False
Me.LvCycles.UseCompatibleStateImageBehavior = False
Me.LvCycles.TabStop = false
Me.LvCycles.UseCompatibleStateImageBehavior = false
Me.LvCycles.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
......@@ -230,7 +240,7 @@ Partial Class VectoJobForm
Me.BtDRIrem.Name = "BtDRIrem"
Me.BtDRIrem.Size = New System.Drawing.Size(24, 24)
Me.BtDRIrem.TabIndex = 2
Me.BtDRIrem.UseVisualStyleBackColor = True
Me.BtDRIrem.UseVisualStyleBackColor = true
'
'BtDRIadd
'
......@@ -241,7 +251,7 @@ Partial Class VectoJobForm
Me.BtDRIadd.Name = "BtDRIadd"
Me.BtDRIadd.Size = New System.Drawing.Size(24, 24)
Me.BtDRIadd.TabIndex = 1
Me.BtDRIadd.UseVisualStyleBackColor = True
Me.BtDRIadd.UseVisualStyleBackColor = true
'
'GrAux
'
......@@ -265,12 +275,12 @@ Partial Class VectoJobForm
Me.GrAux.Name = "GrAux"
Me.GrAux.Size = New System.Drawing.Size(515, 245)
Me.GrAux.TabIndex = 9
Me.GrAux.TabStop = False
Me.GrAux.TabStop = false
Me.GrAux.Text = "Auxiliaries"
'
'Label9
'
Me.Label9.AutoSize = True
Me.Label9.AutoSize = true
Me.Label9.Location = New System.Drawing.Point(191, 74)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(24, 13)
......@@ -286,7 +296,7 @@ Partial Class VectoJobForm
'
'Label8
'
Me.Label8.AutoSize = True
Me.Label8.AutoSize = true
Me.Label8.Location = New System.Drawing.Point(7, 74)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(97, 13)
......@@ -300,11 +310,11 @@ Partial Class VectoJobForm
Me.btnAAUXOpen.Name = "btnAAUXOpen"
Me.btnAAUXOpen.Size = New System.Drawing.Size(24, 24)
Me.btnAAUXOpen.TabIndex = 41
Me.btnAAUXOpen.UseVisualStyleBackColor = True
Me.btnAAUXOpen.UseVisualStyleBackColor = true
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.AutoSize = true
Me.Label1.Location = New System.Drawing.Point(8, 48)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(96, 13)
......@@ -319,7 +329,7 @@ Partial Class VectoJobForm
Me.btnBrowseAAUXFile.Size = New System.Drawing.Size(24, 24)
Me.btnBrowseAAUXFile.TabIndex = 39
Me.ToolTip1.SetToolTip(Me.btnBrowseAAUXFile, "Configure/Browser Advanced Auxiliary Files")
Me.btnBrowseAAUXFile.UseVisualStyleBackColor = True
Me.btnBrowseAAUXFile.UseVisualStyleBackColor = true
'
'txtAdvancedAuxiliaryFile
'
......@@ -337,11 +347,11 @@ Partial Class VectoJobForm
Me.picAuxInfo.Size = New System.Drawing.Size(16, 16)
Me.picAuxInfo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
Me.picAuxInfo.TabIndex = 37
Me.picAuxInfo.TabStop = False
Me.picAuxInfo.TabStop = false
'
'cboAdvancedAuxiliaries
'
Me.cboAdvancedAuxiliaries.FormattingEnabled = True
Me.cboAdvancedAuxiliaries.FormattingEnabled = true
Me.cboAdvancedAuxiliaries.Location = New System.Drawing.Point(109, 18)
Me.cboAdvancedAuxiliaries.Name = "cboAdvancedAuxiliaries"
Me.cboAdvancedAuxiliaries.Size = New System.Drawing.Size(351, 21)
......@@ -349,7 +359,7 @@ Partial Class VectoJobForm
'
'lbAdvancedAuxiliaries
'
Me.lbAdvancedAuxiliaries.AutoSize = True
Me.lbAdvancedAuxiliaries.AutoSize = true
Me.lbAdvancedAuxiliaries.Location = New System.Drawing.Point(32, 21)
Me.lbAdvancedAuxiliaries.Name = "lbAdvancedAuxiliaries"
Me.lbAdvancedAuxiliaries.Size = New System.Drawing.Size(72, 13)
......@@ -360,7 +370,7 @@ Partial Class VectoJobForm
'
Me.Label32.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
Me.Label32.AutoSize = True
Me.Label32.AutoSize = true
Me.Label32.Location = New System.Drawing.Point(403, 217)
Me.Label32.Name = "Label32"
Me.Label32.Size = New System.Drawing.Size(106, 13)
......@@ -373,16 +383,16 @@ Partial Class VectoJobForm
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
Me.LvAux.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader4, Me.ColumnHeader5, Me.ColumnHeader6})
Me.LvAux.FullRowSelect = True
Me.LvAux.GridLines = True
Me.LvAux.HideSelection = False
Me.LvAux.FullRowSelect = true
Me.LvAux.GridLines = true
Me.LvAux.HideSelection = false
Me.LvAux.Location = New System.Drawing.Point(6, 103)
Me.LvAux.MultiSelect = False
Me.LvAux.MultiSelect = false
Me.LvAux.Name = "LvAux"
Me.LvAux.Size = New System.Drawing.Size(503, 113)
Me.LvAux.TabIndex = 0
Me.LvAux.TabStop = False
Me.LvAux.UseCompatibleStateImageBehavior = False
Me.LvAux.TabStop = false
Me.LvAux.UseCompatibleStateImageBehavior = false
Me.LvAux.View = System.Windows.Forms.View.Details
'
'ColumnHeader4
......@@ -409,7 +419,7 @@ Partial Class VectoJobForm
Me.ButAuxRem.Name = "ButAuxRem"
Me.ButAuxRem.Size = New System.Drawing.Size(24, 24)
Me.ButAuxRem.TabIndex = 2
Me.ButAuxRem.UseVisualStyleBackColor = True
Me.ButAuxRem.UseVisualStyleBackColor = true
'
'ButAuxAdd
'
......@@ -420,7 +430,7 @@ Partial Class VectoJobForm
Me.ButAuxAdd.Name = "ButAuxAdd"
Me.ButAuxAdd.Size = New System.Drawing.Size(24, 24)
Me.ButAuxAdd.TabIndex = 1
Me.ButAuxAdd.UseVisualStyleBackColor = True
Me.ButAuxAdd.UseVisualStyleBackColor = true
'
'TbGBX
'
......@@ -455,9 +465,9 @@ Partial Class VectoJobForm
Me.ButOpenGBX.Name = "ButOpenGBX"
Me.ButOpenGBX.Size = New System.Drawing.Size(72, 21)
Me.ButOpenGBX.TabIndex = 6
Me.ButOpenGBX.TabStop = False
Me.ButOpenGBX.TabStop = false
Me.ButOpenGBX.Text = "Gearbox"
Me.ButOpenGBX.UseVisualStyleBackColor = True
Me.ButOpenGBX.UseVisualStyleBackColor = true
'
'ButOpenENG
'
......@@ -465,9 +475,9 @@ Partial Class VectoJobForm
Me.ButOpenENG.Name = "ButOpenENG"
Me.ButOpenENG.Size = New System.Drawing.Size(72, 21)
Me.ButOpenENG.TabIndex = 3
Me.ButOpenENG.TabStop = False
Me.ButOpenENG.TabStop = false
Me.ButOpenENG.Text = "Engine"
Me.ButOpenENG.UseVisualStyleBackColor = True
Me.ButOpenENG.UseVisualStyleBackColor = true
'
'ButOpenVEH
'
......@@ -475,9 +485,9 @@ Partial Class VectoJobForm
Me.ButOpenVEH.Name = "ButOpenVEH"
Me.ButOpenVEH.Size = New System.Drawing.Size(72, 21)
Me.ButOpenVEH.TabIndex = 0
Me.ButOpenVEH.TabStop = False
Me.ButOpenVEH.TabStop = false
Me.ButOpenVEH.Text = "Vehicle"
Me.ButOpenVEH.UseVisualStyleBackColor = True
Me.ButOpenVEH.UseVisualStyleBackColor = true
'
'ButtonVEH
'
......@@ -487,8 +497,8 @@ Partial Class VectoJobForm
Me.ButtonVEH.Name = "ButtonVEH"
Me.ButtonVEH.Size = New System.Drawing.Size(24, 24)
Me.ButtonVEH.TabIndex = 2
Me.ButtonVEH.TabStop = False
Me.ButtonVEH.UseVisualStyleBackColor = True
Me.ButtonVEH.TabStop = false
Me.ButtonVEH.UseVisualStyleBackColor = true
'
'ButtonGBX
'
......@@ -498,8 +508,8 @@ Partial Class VectoJobForm
Me.ButtonGBX.Name = "ButtonGBX"
Me.ButtonGBX.Size = New System.Drawing.Size(24, 24)
Me.ButtonGBX.TabIndex = 8
Me.ButtonGBX.TabStop = False
Me.ButtonGBX.UseVisualStyleBackColor = True
Me.ButtonGBX.TabStop = false
Me.ButtonGBX.UseVisualStyleBackColor = true
'
'ButtonMAP
'
......@@ -509,8 +519,8 @@ Partial Class VectoJobForm
Me.ButtonMAP.Name = "ButtonMAP"
Me.ButtonMAP.Size = New System.Drawing.Size(24, 24)
Me.ButtonMAP.TabIndex = 5
Me.ButtonMAP.TabStop = False
Me.ButtonMAP.UseVisualStyleBackColor = True
Me.ButtonMAP.TabStop = false
Me.ButtonMAP.UseVisualStyleBackColor = true
'
'TabControl1
'
......@@ -527,6 +537,7 @@ Partial Class VectoJobForm
'
'TabPgDriver
'
Me.TabPgDriver.Controls.Add(Me.GroupBox3)
Me.TabPgDriver.Controls.Add(Me.GrVACC)
Me.TabPgDriver.Controls.Add(Me.GrLAC)
Me.TabPgDriver.Controls.Add(Me.GroupBox1)
......@@ -536,7 +547,49 @@ Partial Class VectoJobForm
Me.TabPgDriver.Size = New System.Drawing.Size(527, 487)
Me.TabPgDriver.TabIndex = 7
Me.TabPgDriver.Text = "Driver Model"
Me.TabPgDriver.UseVisualStyleBackColor = True
Me.TabPgDriver.UseVisualStyleBackColor = true
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.tbEssUtility)
Me.GroupBox3.Controls.Add(Me.Label24)
Me.GroupBox3.Controls.Add(Me.Label18)
Me.GroupBox3.Controls.Add(Me.tbEngineOffThreshold)
Me.GroupBox3.Controls.Add(Me.Label19)
Me.GroupBox3.Controls.Add(Me.Label17)
Me.GroupBox3.Controls.Add(Me.tbEngineStopStartThreshold)
Me.GroupBox3.Controls.Add(Me.Label16)
Me.GroupBox3.Location = New System.Drawing.Point(8, 347)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(515, 100)
Me.GroupBox3.TabIndex = 4
Me.GroupBox3.TabStop = false
Me.GroupBox3.Text = "ADAS Parameters"
'
'Label17
'
Me.Label17.AutoSize = true
Me.Label17.Location = New System.Drawing.Point(305, 20)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(18, 13)
Me.Label17.TabIndex = 2
Me.Label17.Text = "[s]"
'
'tbEngineStopStartThreshold
'
Me.tbEngineStopStartThreshold.Location = New System.Drawing.Point(247, 17)
Me.tbEngineStopStartThreshold.Name = "tbEngineStopStartThreshold"
Me.tbEngineStopStartThreshold.Size = New System.Drawing.Size(52, 20)
Me.tbEngineStopStartThreshold.TabIndex = 1
'
'Label16
'
Me.Label16.AutoSize = true
Me.Label16.Location = New System.Drawing.Point(7, 20)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(215, 13)
Me.Label16.TabIndex = 0
Me.Label16.Text = "Engine Stop/Start @ vehicle stop threshold:"
'
'GrVACC
'
......@@ -548,12 +601,12 @@ Partial Class VectoJobForm
Me.GrVACC.Name = "GrVACC"
Me.GrVACC.Size = New System.Drawing.Size(515, 69)
Me.GrVACC.TabIndex = 3
Me.GrVACC.TabStop = False
Me.GrVACC.TabStop = false
Me.GrVACC.Text = "Max. acceleration and brake curves"
'
'Label15
'
Me.Label15.AutoSize = True
Me.Label15.AutoSize = true
Me.Label15.Location = New System.Drawing.Point(3, 20)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(220, 13)
......@@ -577,7 +630,7 @@ Partial Class VectoJobForm
Me.BtDesMaxBr.Name = "BtDesMaxBr"
Me.BtDesMaxBr.Size = New System.Drawing.Size(24, 24)
Me.BtDesMaxBr.TabIndex = 1
Me.BtDesMaxBr.UseVisualStyleBackColor = True
Me.BtDesMaxBr.UseVisualStyleBackColor = true
'
'BtAccOpen
'
......@@ -587,8 +640,8 @@ Partial Class VectoJobForm
Me.BtAccOpen.Name = "BtAccOpen"
Me.BtAccOpen.Size = New System.Drawing.Size(24, 24)
Me.BtAccOpen.TabIndex = 2
Me.BtAccOpen.TabStop = False
Me.BtAccOpen.UseVisualStyleBackColor = True
Me.BtAccOpen.TabStop = false
Me.BtAccOpen.UseVisualStyleBackColor = true
'
'GrLAC
'
......@@ -598,7 +651,7 @@ Partial Class VectoJobForm
Me.GrLAC.Name = "GrLAC"
Me.GrLAC.Size = New System.Drawing.Size(514, 173)
Me.GrLAC.TabIndex = 2
Me.GrLAC.TabStop = False
Me.GrLAC.TabStop = false
Me.GrLAC.Text = "Look-Ahead Coasting"
'
'pnLookAheadCoasting
......@@ -626,7 +679,7 @@ Partial Class VectoJobForm
'
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.AutoSize = true
Me.Label7.Location = New System.Drawing.Point(245, 6)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(38, 13)
......@@ -635,7 +688,7 @@ Partial Class VectoJobForm
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.AutoSize = true
Me.Label6.Location = New System.Drawing.Point(106, 5)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(67, 13)
......@@ -658,12 +711,12 @@ Partial Class VectoJobForm
Me.btnDfVelocityDrop.Name = "btnDfVelocityDrop"
Me.btnDfVelocityDrop.Size = New System.Drawing.Size(24, 24)
Me.btnDfVelocityDrop.TabIndex = 32
Me.btnDfVelocityDrop.TabStop = False
Me.btnDfVelocityDrop.UseVisualStyleBackColor = True
Me.btnDfVelocityDrop.TabStop = false
Me.btnDfVelocityDrop.UseVisualStyleBackColor = true
'
'Label12
'
Me.Label12.AutoSize = True
Me.Label12.AutoSize = true
Me.Label12.Location = New System.Drawing.Point(284, 110)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(130, 13)
......@@ -679,7 +732,7 @@ Partial Class VectoJobForm
'
'Label11
'
Me.Label11.AutoSize = True
Me.Label11.AutoSize = true
Me.Label11.Location = New System.Drawing.Point(224, 109)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(13, 13)
......@@ -688,7 +741,7 @@ Partial Class VectoJobForm
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.AutoSize = true
Me.Label3.Location = New System.Drawing.Point(55, 30)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(118, 13)
......@@ -714,7 +767,7 @@ Partial Class VectoJobForm
'
'Label10
'
Me.Label10.AutoSize = True
Me.Label10.AutoSize = true
Me.Label10.Location = New System.Drawing.Point(94, 109)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(79, 13)
......@@ -723,7 +776,7 @@ Partial Class VectoJobForm
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.AutoSize = true
Me.Label4.Location = New System.Drawing.Point(18, 56)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(155, 13)
......@@ -733,7 +786,7 @@ Partial Class VectoJobForm
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.AutoSize = true
Me.Label5.Location = New System.Drawing.Point(20, 83)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(153, 13)
......@@ -749,8 +802,8 @@ Partial Class VectoJobForm
Me.btnDfTargetSpeed.Name = "btnDfTargetSpeed"
Me.btnDfTargetSpeed.Size = New System.Drawing.Size(24, 24)
Me.btnDfTargetSpeed.TabIndex = 23
Me.btnDfTargetSpeed.TabStop = False
Me.btnDfTargetSpeed.UseVisualStyleBackColor = True
Me.btnDfTargetSpeed.TabStop = false
Me.btnDfTargetSpeed.UseVisualStyleBackColor = true
'
'tbLacPreviewFactor
'
......@@ -770,15 +823,15 @@ Partial Class VectoJobForm
'
'CbLookAhead
'
Me.CbLookAhead.AutoSize = True
Me.CbLookAhead.Checked = True
Me.CbLookAhead.AutoSize = true
Me.CbLookAhead.Checked = true
Me.CbLookAhead.CheckState = System.Windows.Forms.CheckState.Checked
Me.CbLookAhead.Location = New System.Drawing.Point(16, 21)
Me.CbLookAhead.Name = "CbLookAhead"
Me.CbLookAhead.Size = New System.Drawing.Size(65, 17)
Me.CbLookAhead.TabIndex = 0
Me.CbLookAhead.Text = "Enabled"
Me.CbLookAhead.UseVisualStyleBackColor = True
Me.CbLookAhead.UseVisualStyleBackColor = true
'
'GroupBox1
'
......@@ -790,7 +843,7 @@ Partial Class VectoJobForm
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(515, 77)
Me.GroupBox1.TabIndex = 1
Me.GroupBox1.TabStop = False
Me.GroupBox1.TabStop = false
Me.GroupBox1.Text = "Overspeed"
'
'GroupBox2
......@@ -798,24 +851,24 @@ Partial Class VectoJobForm
Me.GroupBox2.Controls.Add(Me.Label22)
Me.GroupBox2.Controls.Add(Me.TbUnderSpeed)
Me.GroupBox2.Controls.Add(Me.Label20)
Me.GroupBox2.Enabled = False
Me.GroupBox2.Enabled = false
Me.GroupBox2.Location = New System.Drawing.Point(338, 14)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(168, 57)
Me.GroupBox2.TabIndex = 37
Me.GroupBox2.TabStop = False
Me.GroupBox2.TabStop = false
Me.GroupBox2.Text = "!! hidden !!"
Me.GroupBox2.Visible = False
Me.GroupBox2.Visible = false
'
'Label22
'
Me.Label22.AutoSize = True
Me.Label22.AutoSize = true
Me.Label22.Location = New System.Drawing.Point(6, 16)
Me.Label22.Name = "Label22"
Me.Label22.Size = New System.Drawing.Size(91, 13)
Me.Label22.TabIndex = 1
Me.Label22.Text = "Max. Underspeed"
Me.Label22.Visible = False
Me.Label22.Visible = false
'
'TbUnderSpeed
'
......@@ -823,17 +876,17 @@ Partial Class VectoJobForm
Me.TbUnderSpeed.Name = "TbUnderSpeed"
Me.TbUnderSpeed.Size = New System.Drawing.Size(64, 20)
Me.TbUnderSpeed.TabIndex = 1
Me.TbUnderSpeed.Visible = False
Me.TbUnderSpeed.Visible = false
'
'Label20
'
Me.Label20.AutoSize = True
Me.Label20.AutoSize = true
Me.Label20.Location = New System.Drawing.Point(75, 36)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(38, 13)
Me.Label20.TabIndex = 3
Me.Label20.Text = "[km/h]"
Me.Label20.Visible = False
Me.Label20.Visible = false
'
'PnEcoRoll
'
......@@ -850,7 +903,7 @@ Partial Class VectoJobForm
'
'Label21
'
Me.Label21.AutoSize = True
Me.Label21.AutoSize = true
Me.Label21.Location = New System.Drawing.Point(170, 31)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(38, 13)
......@@ -859,7 +912,7 @@ Partial Class VectoJobForm
'
'Label14
'
Me.Label14.AutoSize = True
Me.Label14.AutoSize = true
Me.Label14.Location = New System.Drawing.Point(170, 5)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(38, 13)
......@@ -882,7 +935,7 @@ Partial Class VectoJobForm
'
'Label23
'
Me.Label23.AutoSize = True
Me.Label23.AutoSize = true
Me.Label23.Location = New System.Drawing.Point(18, 31)
Me.Label23.Name = "Label23"
Me.Label23.Size = New System.Drawing.Size(80, 13)
......@@ -891,7 +944,7 @@ Partial Class VectoJobForm
'
'Label13
'
Me.Label13.AutoSize = True
Me.Label13.AutoSize = true
Me.Label13.Location = New System.Drawing.Point(13, 5)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(85, 13)
......@@ -900,25 +953,25 @@ Partial Class VectoJobForm
'
'RdOverspeed
'
Me.RdOverspeed.AutoSize = True
Me.RdOverspeed.Checked = True
Me.RdOverspeed.AutoSize = true
Me.RdOverspeed.Checked = true
Me.RdOverspeed.Location = New System.Drawing.Point(16, 44)
Me.RdOverspeed.Name = "RdOverspeed"
Me.RdOverspeed.Size = New System.Drawing.Size(77, 17)
Me.RdOverspeed.TabIndex = 1
Me.RdOverspeed.TabStop = True
Me.RdOverspeed.TabStop = true
Me.RdOverspeed.Text = "Overspeed"
Me.RdOverspeed.UseVisualStyleBackColor = True
Me.RdOverspeed.UseVisualStyleBackColor = true
'
'RdOff
'
Me.RdOff.AutoSize = True
Me.RdOff.AutoSize = true
Me.RdOff.Location = New System.Drawing.Point(16, 21)
Me.RdOff.Name = "RdOff"
Me.RdOff.Size = New System.Drawing.Size(39, 17)
Me.RdOff.TabIndex = 0
Me.RdOff.Text = "Off"
Me.RdOff.UseVisualStyleBackColor = True
Me.RdOff.UseVisualStyleBackColor = true
'
'StatusStrip1
'
......@@ -926,14 +979,14 @@ Partial Class VectoJobForm
Me.StatusStrip1.Location = New System.Drawing.Point(0, 624)
Me.StatusStrip1.Name = "StatusStrip1"
Me.StatusStrip1.Size = New System.Drawing.Size(944, 22)
Me.StatusStrip1.SizingGrip = False
Me.StatusStrip1.SizingGrip = false
Me.StatusStrip1.TabIndex = 6
Me.StatusStrip1.Text = "StatusStrip1"
'
'ToolStripStatusLabelGEN
'
Me.ToolStripStatusLabelGEN.Name = "ToolStripStatusLabelGEN"
Me.ToolStripStatusLabelGEN.Size = New System.Drawing.Size(121, 17)
Me.ToolStripStatusLabelGEN.Size = New System.Drawing.Size(120, 17)
Me.ToolStripStatusLabelGEN.Text = "ToolStripStatusLabel1"
'
'ButOK
......@@ -944,7 +997,7 @@ Partial Class VectoJobForm
Me.ButOK.Size = New System.Drawing.Size(75, 23)
Me.ButOK.TabIndex = 0
Me.ButOK.Text = "Save"
Me.ButOK.UseVisualStyleBackColor = True
Me.ButOK.UseVisualStyleBackColor = true
'
'ButCancel
'
......@@ -955,7 +1008,7 @@ Partial Class VectoJobForm
Me.ButCancel.Size = New System.Drawing.Size(75, 23)
Me.ButCancel.TabIndex = 1
Me.ButCancel.Text = "Cancel"
Me.ButCancel.UseVisualStyleBackColor = True
Me.ButCancel.UseVisualStyleBackColor = true
'
'ToolStrip1
'
......@@ -1046,23 +1099,23 @@ Partial Class VectoJobForm
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(944, 40)
Me.PictureBox1.TabIndex = 21
Me.PictureBox1.TabStop = False
Me.PictureBox1.TabStop = false
'
'CbEngOnly
'
Me.CbEngOnly.AutoSize = True
Me.CbEngOnly.AutoSize = true
Me.CbEngOnly.Location = New System.Drawing.Point(17, 84)
Me.CbEngOnly.Name = "CbEngOnly"
Me.CbEngOnly.Size = New System.Drawing.Size(113, 17)
Me.CbEngOnly.TabIndex = 0
Me.CbEngOnly.Text = "Engine Only Mode"
Me.CbEngOnly.UseVisualStyleBackColor = True
Me.CbEngOnly.UseVisualStyleBackColor = true
'
'CmOpenFile
'
Me.CmOpenFile.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.OpenWithToolStripMenuItem, Me.ShowInFolderToolStripMenuItem})
Me.CmOpenFile.Name = "CmOpenFile"
Me.CmOpenFile.ShowImageMargin = False
Me.CmOpenFile.ShowImageMargin = false
Me.CmOpenFile.Size = New System.Drawing.Size(128, 48)
'
'OpenWithToolStripMenuItem
......@@ -1086,7 +1139,7 @@ Partial Class VectoJobForm
Me.PicVehicle.Size = New System.Drawing.Size(300, 88)
Me.PicVehicle.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.PicVehicle.TabIndex = 36
Me.PicVehicle.TabStop = False
Me.PicVehicle.TabStop = false
'
'PicBox
'
......@@ -1096,13 +1149,13 @@ Partial Class VectoJobForm
Me.PicBox.Name = "PicBox"
Me.PicBox.Size = New System.Drawing.Size(390, 296)
Me.PicBox.TabIndex = 36
Me.PicBox.TabStop = False
Me.PicBox.TabStop = false
'
'TbEngTxt
'
Me.TbEngTxt.Location = New System.Drawing.Point(542, 218)
Me.TbEngTxt.Name = "TbEngTxt"
Me.TbEngTxt.ReadOnly = True
Me.TbEngTxt.ReadOnly = true
Me.TbEngTxt.Size = New System.Drawing.Size(390, 20)
Me.TbEngTxt.TabIndex = 6
'
......@@ -1110,7 +1163,7 @@ Partial Class VectoJobForm
'
Me.TbVehCat.Location = New System.Drawing.Point(848, 131)
Me.TbVehCat.Name = "TbVehCat"
Me.TbVehCat.ReadOnly = True
Me.TbVehCat.ReadOnly = true
Me.TbVehCat.Size = New System.Drawing.Size(87, 20)
Me.TbVehCat.TabIndex = 2
'
......@@ -1118,7 +1171,7 @@ Partial Class VectoJobForm
'
Me.TbAxleConf.Location = New System.Drawing.Point(904, 160)
Me.TbAxleConf.Name = "TbAxleConf"
Me.TbAxleConf.ReadOnly = True
Me.TbAxleConf.ReadOnly = true
Me.TbAxleConf.Size = New System.Drawing.Size(31, 20)
Me.TbAxleConf.TabIndex = 4
'
......@@ -1126,7 +1179,7 @@ Partial Class VectoJobForm
'
Me.TbHVCclass.Location = New System.Drawing.Point(848, 189)
Me.TbHVCclass.Name = "TbHVCclass"
Me.TbHVCclass.ReadOnly = True
Me.TbHVCclass.ReadOnly = true
Me.TbHVCclass.Size = New System.Drawing.Size(87, 20)
Me.TbHVCclass.TabIndex = 5
'
......@@ -1134,7 +1187,7 @@ Partial Class VectoJobForm
'
Me.TbGbxTxt.Location = New System.Drawing.Point(542, 241)
Me.TbGbxTxt.Name = "TbGbxTxt"
Me.TbGbxTxt.ReadOnly = True
Me.TbGbxTxt.ReadOnly = true
Me.TbGbxTxt.Size = New System.Drawing.Size(390, 20)
Me.TbGbxTxt.TabIndex = 7
'
......@@ -1142,22 +1195,63 @@ Partial Class VectoJobForm
'
Me.TbMass.Location = New System.Drawing.Point(848, 160)
Me.TbMass.Name = "TbMass"
Me.TbMass.ReadOnly = True
Me.TbMass.ReadOnly = true
Me.TbMass.Size = New System.Drawing.Size(50, 20)
Me.TbMass.TabIndex = 3
'
'lblEngineCharacteristics
'
Me.lblEngineCharacteristics.AutoSize = True
Me.lblEngineCharacteristics.AutoSize = true
Me.lblEngineCharacteristics.Location = New System.Drawing.Point(542, 565)
Me.lblEngineCharacteristics.Name = "lblEngineCharacteristics"
Me.lblEngineCharacteristics.Size = New System.Drawing.Size(0, 13)
Me.lblEngineCharacteristics.TabIndex = 37
'
'Label18
'
Me.Label18.AutoSize = true
Me.Label18.Location = New System.Drawing.Point(305, 46)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(18, 13)
Me.Label18.TabIndex = 5
Me.Label18.Text = "[s]"
'
'tbEngineOffThreshold
'
Me.tbEngineOffThreshold.Location = New System.Drawing.Point(247, 43)
Me.tbEngineOffThreshold.Name = "tbEngineOffThreshold"
Me.tbEngineOffThreshold.Size = New System.Drawing.Size(52, 20)
Me.tbEngineOffThreshold.TabIndex = 4
'
'Label19
'
Me.Label19.AutoSize = true
Me.Label19.Location = New System.Drawing.Point(7, 46)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(105, 13)
Me.Label19.TabIndex = 3
Me.Label19.Text = "Max. engine-off time:"
'
'tbEssUtility
'
Me.tbEssUtility.Location = New System.Drawing.Point(247, 69)
Me.tbEssUtility.Name = "tbEssUtility"
Me.tbEssUtility.Size = New System.Drawing.Size(52, 20)
Me.tbEssUtility.TabIndex = 7
'
'Label24
'
Me.Label24.AutoSize = true
Me.Label24.Location = New System.Drawing.Point(7, 72)
Me.Label24.Name = "Label24"
Me.Label24.Size = New System.Drawing.Size(141, 13)
Me.Label24.TabIndex = 6
Me.Label24.Text = "Engie stop/start utility factor:"
'
'VectoJobForm
'
Me.AcceptButton = Me.ButOK
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.ButCancel
Me.ClientSize = New System.Drawing.Size(944, 646)
......@@ -1179,41 +1273,43 @@ Partial Class VectoJobForm
Me.Controls.Add(Me.StatusStrip1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon)
Me.MaximizeBox = False
Me.MaximizeBox = false
Me.Name = "VectoJobForm"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Job Editor"
Me.TabPgGen.ResumeLayout(False)
Me.TabPgGen.PerformLayout()
Me.GrCycles.ResumeLayout(False)
Me.GrCycles.PerformLayout()
Me.GrAux.ResumeLayout(False)
Me.GrAux.PerformLayout()
CType(Me.picAuxInfo, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabControl1.ResumeLayout(False)
Me.TabPgDriver.ResumeLayout(False)
Me.GrVACC.ResumeLayout(False)
Me.GrVACC.PerformLayout()
Me.GrLAC.ResumeLayout(False)
Me.GrLAC.PerformLayout()
Me.pnLookAheadCoasting.ResumeLayout(False)
Me.pnLookAheadCoasting.PerformLayout()
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.GroupBox2.ResumeLayout(False)
Me.GroupBox2.PerformLayout()
Me.PnEcoRoll.ResumeLayout(False)
Me.PnEcoRoll.PerformLayout()
Me.StatusStrip1.ResumeLayout(False)
Me.StatusStrip1.PerformLayout()
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.CmOpenFile.ResumeLayout(False)
CType(Me.PicVehicle, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PicBox, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
Me.TabPgGen.ResumeLayout(false)
Me.TabPgGen.PerformLayout
Me.GrCycles.ResumeLayout(false)
Me.GrCycles.PerformLayout
Me.GrAux.ResumeLayout(false)
Me.GrAux.PerformLayout
CType(Me.picAuxInfo,System.ComponentModel.ISupportInitialize).EndInit
Me.TabControl1.ResumeLayout(false)
Me.TabPgDriver.ResumeLayout(false)
Me.GroupBox3.ResumeLayout(false)
Me.GroupBox3.PerformLayout
Me.GrVACC.ResumeLayout(false)
Me.GrVACC.PerformLayout
Me.GrLAC.ResumeLayout(false)
Me.GrLAC.PerformLayout
Me.pnLookAheadCoasting.ResumeLayout(false)
Me.pnLookAheadCoasting.PerformLayout
Me.GroupBox1.ResumeLayout(false)
Me.GroupBox1.PerformLayout
Me.GroupBox2.ResumeLayout(false)
Me.GroupBox2.PerformLayout
Me.PnEcoRoll.ResumeLayout(false)
Me.PnEcoRoll.PerformLayout
Me.StatusStrip1.ResumeLayout(false)
Me.StatusStrip1.PerformLayout
Me.ToolStrip1.ResumeLayout(false)
Me.ToolStrip1.PerformLayout
CType(Me.PictureBox1,System.ComponentModel.ISupportInitialize).EndInit
Me.CmOpenFile.ResumeLayout(false)
CType(Me.PicVehicle,System.ComponentModel.ISupportInitialize).EndInit
CType(Me.PicBox,System.ComponentModel.ISupportInitialize).EndInit
Me.ResumeLayout(false)
Me.PerformLayout
End Sub
Friend WithEvents TabPgGen As TabPage
......@@ -1318,4 +1414,13 @@ Partial Class VectoJobForm
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents lblEngineCharacteristics As System.Windows.Forms.Label
Friend WithEvents GroupBox3 As GroupBox
Friend WithEvents Label17 As Label
Friend WithEvents tbEngineStopStartThreshold As TextBox
Friend WithEvents Label16 As Label
Friend WithEvents Label18 As Label
Friend WithEvents tbEngineOffThreshold As TextBox
Friend WithEvents Label19 As Label
Friend WithEvents tbEssUtility As TextBox
Friend WithEvents Label24 As Label
End Class
......@@ -538,6 +538,11 @@ Public Class VectoJobForm
tbLacDfVelocityDropFile.Text = If(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup Is Nothing, "",
GetRelativePath(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup.Source, _basePath))
End If
tbEngineStopStartThreshold.Text = driver.EngineOffStandStillThreshold.ToGUIFormat()
tbEngineOffThreshold.Text = If(driver.MaxEngineOffTimespan?.ToGUIFormat(), DeclarationData.Driver.MaxEngineOffTimespan.ToGUIFormat())
tbEssUtility.Text = driver.EngineStopStartUtilityFactor.ToGUIFormat()
'-------------------------------------------------------------
DeclInit()
......@@ -654,6 +659,10 @@ Public Class VectoJobForm
vectoJob.LacDfScale = tbDfCoastingScale.Text.ToDouble(0)
vectoJob.LacDfTargetSpeedFile = tbLacDfTargetSpeedFile.Text
vectoJob.LacDfVelocityDropFile = tbLacDfVelocityDropFile.Text
vectoJob.EngineStopStartThreshold = tbEngineStopStartThreshold.text.ToDouble(0)
vectoJob.EngineOffTimeLimit = tbEngineOffThreshold.Text.ToDouble(0)
vectoJob.EngineStStUtilityFactor = tbEssUtility.Text.ToDouble(0)
'------------------------------------------------------------
'SAVE
......
......@@ -419,6 +419,12 @@ Public Class Engine
End Get
End Property
Public ReadOnly Property EngineStartTime As Second Implements IEngineEngineeringInputData.EngineStartTime
Get
Return Nothing
End Get
End Property
#End Region
End Class
......
......@@ -72,6 +72,9 @@ Public Class VectoJob
Public EcoRollOn As Boolean
Public LookAheadMinSpeed As Double
Public EngineStopStartThreshold As Double
public EngineOffTimeLimit As double
public EngineStStUtilityFactor As Double
Public Property StartStopMaxSpeed As Double
......@@ -276,6 +279,24 @@ Public Class VectoJob
End Get
End Property
Public ReadOnly Property EngineOffStandStillThreshold As Second Implements IDriverEngineeringInputData.EngineOffStandStillThreshold
Get
return EngineStopStartThreshold.SI(Of Second)()
End Get
End Property
Public ReadOnly Property MaxEngineOffTimespan As Second Implements IDriverEngineeringInputData.MaxEngineOffTimespan
Get
Return EngineOffTimeLimit.SI(Of Second)()
End Get
End Property
Public ReadOnly Property EngineStopStartUtilityFactor As Double Implements IDriverEngineeringInputData.EngineStopStartUtilityFactor
Get
Return EngineStStUtilityFactor
End Get
End Property
Public Property DesMaxFile(Optional ByVal original As Boolean = False) As String
Get
If original Then
......
......@@ -18,7 +18,7 @@ Public Class JSONFileWriter
Public Const VehicleFormatVersion As Integer = 8
Private Const VectoJobFormatVersion As Integer = 4
Private Const VectoJobFormatVersion As Integer = 5
Private Shared _instance As JSONFileWriter
......@@ -318,6 +318,9 @@ Public Class JSONFileWriter
If Not job.SavedInDeclarationMode Then
body.Add("VACC", GetRelativePath(driver.AccelerationCurve.AccelerationCurve.Source, basePath))
body.Add("EngineStopStartAtVehicleStopThreshold", driver.EngineOffStandStillThreshold.Value())
body.Add("EngineStopStartMaxOffTimespan", driver.MaxEngineOffTimespan.Value())
body.Add("EngineStopStartUtilityFactor", driver.EngineStopStartUtilityFactor)
End If
'body.Add("StartStop", New Dictionary(Of String, Object) From {
' {"Enabled", driver.StartStop.Enabled},
......
......@@ -300,6 +300,8 @@ namespace TUGraz.VectoCommon.InputData
/// P170
/// </summary>
double WHTCEngineering { get; }
Second EngineStartTime { get; }
}
public interface IAuxiliariesEngineeringInputData
......@@ -337,6 +339,9 @@ namespace TUGraz.VectoCommon.InputData
ILookaheadCoastingInputData Lookahead { get; }
IGearshiftEngineeringInputData GearshiftInputData { get; }
Second EngineOffStandStillThreshold { get; }
Second MaxEngineOffTimespan { get; }
double EngineStopStartUtilityFactor { get; }
}
public interface IOverSpeedEcoRollEngineeringInputData : IOverSpeedEcoRollDeclarationInputData
......
......@@ -133,6 +133,10 @@ namespace TUGraz.VectoCommon.Utils
return new ConvertedSI(value.Value() * 3600e6, "g/kWh");
}
public static ConvertedSI ConvertToGramPerKiloWattHour(this KilogramPerWattSecond value)
{
return new ConvertedSI(value.Value() * 3600e6, "g/kWh");
}
public static ConvertedSI ConvertToLiterPer100Kilometer(this VolumePerMeter value)
{
......
......@@ -371,6 +371,39 @@ namespace TUGraz.VectoCommon.Utils
r = ssxy * ssxy / ssxx / ssyy;
}
public static void LeastSquaresFitting(IEnumerable<Point> entries, out double k, out double d, out double r)
{
// algoritm taken from http://mathworld.wolfram.com/LeastSquaresFitting.html (eqn. 27 & 28)
var count = 0;
var sumX = 0.0;
var sumY = 0.0;
var sumXSquare = 0.0;
var sumYSquare = 0.0;
var sumXY = 0.0;
foreach (var entry in entries) {
var x = entry.X;
var y = entry.Y;
sumX += x;
sumY += y;
sumXSquare += x * x;
sumYSquare += y * y;
sumXY += x * y;
count++;
}
if (count == 0) {
k = 0;
d = 0;
r = 0;
return;
}
var ssxx = sumXSquare - sumX * sumX / count;
var ssxy = sumXY - sumX * sumY / count;
var ssyy = sumYSquare - sumY * sumY / count;
k = ssxy / ssxx;
d = (sumY - k * sumX) / count;
r = ssxy * ssxy / ssxx / ssyy;
}
public static double[] QuadraticEquationSolver(double a, double b, double c)
{
return Polynom2Solver(a, b, c);
......
......@@ -36,6 +36,7 @@ using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Models.Declaration;
namespace TUGraz.VectoCore.InputData.FileIO.JSON
{
......@@ -186,6 +187,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
}
}
public virtual Second EngineStartTime
{
get { return null; }
}
public virtual double WHTCMotorway
{
get { return Body.GetEx<double>(JsonKeys.Engine_WHTC_Motorway); }
......
......@@ -161,6 +161,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
public IGearshiftEngineeringInputData GearshiftInputData { get; internal set; }
public IAxleGearInputData AxleGear { get; internal set; }
public ITorqueConverterEngineeringInputData TorqueConverter { get; internal set; }
public IEngineEngineeringInputData Engine { get; internal set; }
......@@ -507,6 +508,21 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
}
}
public virtual Second EngineOffStandStillThreshold
{
get { return null; }
}
public virtual Second MaxEngineOffTimespan
{
get { return null; }
}
public virtual double EngineStopStartUtilityFactor
{
get { return DeclarationData.Driver.EngineStopStartUtilityFactor; }
}
#endregion
#region IAuxiliariesEngineeringInputData
......@@ -819,4 +835,38 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
}
}
}
public class JSONInputDataV5 : JSONInputDataV4
{
public JSONInputDataV5(JObject data, string filename, bool tolerateMissing = false) : base(data, filename, tolerateMissing) { }
public override Second EngineOffStandStillThreshold
{
get {
return Body["EngineStopStartAtVehicleStopThreshold"] == null
? null
: Body.GetEx<double>("EngineStopStartAtVehicleStopThreshold").SI<Second>();
}
}
public override Second MaxEngineOffTimespan
{
get {
return Body["EngineStopStartMaxOffTimespan"] == null
? null
: Body.GetEx<double>("EngineStopStartMaxOffTimespan").SI<Second>(); }
}
public override double EngineStopStartUtilityFactor
{
get {
return Body["EngineStopStartUtilityFactor"] == null
? DeclarationData.Driver.EngineStopStartUtilityFactor
: Body.GetEx<double>("EngineStopStartUtilityFactor");
}
}
}
}
using System.Xml;
using System.Xml.Linq;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.FileIO.XML.Engineering.Interfaces;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
......@@ -44,6 +46,21 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
get { return _shiftParameters ?? (_shiftParameters = Reader.ShiftParameters); }
}
public virtual Second EngineOffStandStillThreshold
{
get { return null; }
}
public virtual Second MaxEngineOffTimespan
{
get { return null; }
}
public virtual double EngineStopStartUtilityFactor
{
get { return DeclarationData.Driver.EngineStopStartUtilityFactor; }
}
public virtual IOverSpeedEcoRollEngineeringInputData OverSpeedEcoRoll
{
get { return _overspeed ?? (_overspeed = Reader.OverspeedData); }
......@@ -74,6 +91,25 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
protected override XNamespace SchemaNamespace { get { return NAMESPACE_URI; } }
public override Second EngineOffStandStillThreshold
{
get { return GetDouble("EngineStopStartThreshold", DeclarationData.Driver.EngineOffStandStillThreshold.Value()).SI<Second>(); }
}
public override Second MaxEngineOffTimespan
{
get { return GetDouble("MaxEngineStopStartTimespan", DeclarationData.Driver.EngineOffStandStillThreshold.Value()).SI<Second>(); }
}
public override double EngineStopStartUtilityFactor
{
get {
return ElementExists("EngineStopStartUtilityFactor")
? GetDouble("EngineStopStartUtilityFactor")
: DeclarationData.Driver.EngineStopStartUtilityFactor;
}
}
#endregion
}
}
......@@ -80,6 +80,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
get { return GetDouble(XMLNames.Engine_WHTCEngineering); }
}
public virtual Second EngineStartTime
{
get { return null; }
}
public virtual double WHTCMotorway
{
get { throw new VectoException("Property not available in Engineering Mode"); }
......
......@@ -137,7 +137,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
RatedPowerDeclared = data.RatedPowerDeclared,
RatedSpeedDeclared = data.RatedSpeedDeclared,
MaxTorqueDeclared = data.MaxTorqueDeclared,
FuelData = DeclarationData.FuelData.Lookup(data.FuelType, tankSystem)
FuelData = DeclarationData.FuelData.Lookup(data.FuelType, tankSystem),
};
return retVal;
}
......
......@@ -50,12 +50,14 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
{
public class DeclarationDataAdapter : AbstractSimulationDataAdapter
{
public static readonly GearboxType[] SupportedGearboxTypes = {GearboxType.MT, GearboxType.AMT, GearboxType.ATPowerSplit, GearboxType.ATSerial};
public static readonly GearboxType[] SupportedGearboxTypes =
{ GearboxType.MT, GearboxType.AMT, GearboxType.ATPowerSplit, GearboxType.ATSerial };
public DriverData CreateDriverData()
{
var lookAheadData = new DriverData.LACData {
Enabled = DeclarationData.Driver.LookAhead.Enabled,
//Deceleration = DeclarationData.Driver.LookAhead.Deceleration,
MinSpeed = DeclarationData.Driver.LookAhead.MinimumSpeed,
LookAheadDecisionFactor = new LACDecisionFactor(),
......@@ -72,9 +74,15 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
"Specified Overspeed/EcoRoll Mode not allowed in declaration mode! {0}",
overspeedData.Mode);
}
var retVal = new DriverData {
LookAheadCoasting = lookAheadData,
OverSpeedEcoRoll = overspeedData,
EngineStopStart = new DriverData.EngineStopStartData() {
EngineOffStandStillThreshold = DeclarationData.Driver.EngineOffStandStillThreshold,
MaxEngineOffTimespan = DeclarationData.Driver.MaxEngineOffTimespan,
UtilityFactor = DeclarationData.Driver.EngineStopStartUtilityFactor,
},
};
return retVal;
}
......@@ -102,7 +110,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
retVal.SleeperCab = data.SleeperCab;
retVal.TrailerGrossVehicleWeight = mission.Trailer.Sum(t => t.TrailerGrossVehicleWeight).DefaultIfNull(0);
retVal.BodyAndTrailerWeight = mission.BodyCurbWeight + mission.Trailer.Sum(t => t.TrailerCurbWeight).DefaultIfNull(0);
retVal.BodyAndTrailerWeight =
mission.BodyCurbWeight + mission.Trailer.Sum(t => t.TrailerCurbWeight).DefaultIfNull(0);
retVal.Loading = loading;
retVal.DynamicTyreRadius =
......@@ -180,7 +189,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
}
internal CombustionEngineData CreateEngineData(IEngineDeclarationInputData engine, PerSecond vehicleEngineIdleSpeed,
internal CombustionEngineData CreateEngineData(
IEngineDeclarationInputData engine, PerSecond vehicleEngineIdleSpeed,
IGearboxDeclarationInputData gearbox, IEnumerable<ITorqueLimitInputData> torqueLimits, TankSystem? tankSystem = null)
{
if (!engine.SavedInDeclarationMode) {
......@@ -195,6 +205,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
retVal.ColdHotCorrectionFactor = engine.ColdHotBalancingFactor;
retVal.CorrectionFactorRegPer = engine.CorrectionFactorRegPer;
retVal.Inertia = DeclarationData.Engine.EngineInertia(retVal.Displacement, gearbox.Type);
retVal.EngineStartTime = DeclarationData.Engine.DefaultEngineStartTime;
var limits = torqueLimits.ToDictionary(e => e.Gear);
var numGears = gearbox.Gears.Count;
var fullLoadCurves = new Dictionary<uint, EngineFullLoadCurve>(numGears + 1);
......@@ -206,11 +217,13 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
VehMaxTorque(gear, numGears, limits, fullLoadCurves[0].MaxTorque));
fullLoadCurves[(uint)gear.Gear] = IntersectFullLoadCurves(fullLoadCurves[0], maxTorque);
}
retVal.FullLoadCurves = fullLoadCurves;
return retVal;
}
private static NewtonMeter VehMaxTorque(ITransmissionInputData gear, int numGears,
private static NewtonMeter VehMaxTorque(
ITransmissionInputData gear, int numGears,
Dictionary<int, ITorqueLimitInputData> limits,
NewtonMeter maxEngineTorque)
{
......@@ -221,10 +234,12 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
return limits[gear.Gear].MaxTorque;
}
}
return null;
}
private static NewtonMeter GbxMaxTorque(ITransmissionInputData gear, int numGears, NewtonMeter maxEngineTorque
private static NewtonMeter GbxMaxTorque(
ITransmissionInputData gear, int numGears, NewtonMeter maxEngineTorque
)
{
if (gear.Gear - 1 < numGears / 2) {
......@@ -238,10 +253,13 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
return gear.MaxTorque;
}
}
return null;
}
internal GearboxData CreateGearboxData(IGearboxDeclarationInputData gearbox, CombustionEngineData engine, double axlegearRatio, Meter dynamicTyreRadius, VehicleCategory vehicleCategory, ITorqueConverterDeclarationInputData torqueConverter)
internal GearboxData CreateGearboxData(
IGearboxDeclarationInputData gearbox, CombustionEngineData engine, double axlegearRatio, Meter dynamicTyreRadius,
VehicleCategory vehicleCategory, ITorqueConverterDeclarationInputData torqueConverter)
{
if (!gearbox.SavedInDeclarationMode) {
WarnDeclarationMode("GearboxData");
......@@ -251,6 +269,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
if (!SupportedGearboxTypes.Contains(gearbox.Type)) {
throw new VectoSimulationException("Unsupported gearbox type: {0}!", retVal.Type);
}
var gearsInput = gearbox.Gears;
if (gearsInput.Count < 1) {
throw new VectoSimulationException(
......@@ -269,7 +288,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var gear = gearsInput[(int)i];
var lossMap = CreateGearLossMap(gear, i, false);
var shiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon(gearbox.Type, (int)i, engine.FullLoadCurves[i + 1],
var shiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon(
gearbox.Type, (int)i, engine.FullLoadCurves[i + 1],
gearsInput, engine,
axlegearRatio, dynamicTyreRadius);
......@@ -283,14 +303,17 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
CreateATGearData(gearbox, i, gearData, tcShiftPolygon, gearDifferenceRatio, gears, vehicleCategory);
gears.Add(i + 1, gearData);
}
retVal.Gears = gears;
if (retVal.Type.AutomaticTransmission()) {
var ratio = double.IsNaN(retVal.Gears[1].Ratio) ? 1 : retVal.Gears[1].TorqueConverterRatio / retVal.Gears[1].Ratio;
retVal.PowershiftShiftTime = DeclarationData.Gearbox.PowershiftShiftTime;
retVal.TorqueConverterData = TorqueConverterDataReader.Create(torqueConverter.TCData,
retVal.TorqueConverterData = TorqueConverterDataReader.Create(
torqueConverter.TCData,
DeclarationData.TorqueConverter.ReferenceRPM, DeclarationData.TorqueConverter.MaxInputSpeed,
ExecutionMode.Declaration, ratio,
DeclarationData.TorqueConverter.CLUpshiftMinAcceleration, DeclarationData.TorqueConverter.CCUpshiftMinAcceleration);
DeclarationData.TorqueConverter.CLUpshiftMinAcceleration,
DeclarationData.TorqueConverter.CCUpshiftMinAcceleration);
retVal.TorqueConverterData.ModelName = torqueConverter.Model;
retVal.TorqueConverterData.DigestValueInput = torqueConverter.DigestValue?.DigestValue;
retVal.TorqueConverterData.CertificationMethod = torqueConverter.CertificationMethod;
......@@ -300,7 +323,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
return retVal;
}
private static void CreateATGearData(IGearboxDeclarationInputData gearbox, uint i, GearData gearData,
private static void CreateATGearData(
IGearboxDeclarationInputData gearbox, uint i, GearData gearData,
ShiftPolygon tcShiftPolygon, double gearDifferenceRatio, Dictionary<uint, GearData> gears,
VehicleCategory vehicleCategory)
{
......@@ -317,6 +341,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
// ratio between first and second gear is above threshold, torqueconverter is active in second gear as well
// -> duplicate ratio and lossmap for torque converter mode, remove locked transmission for previous gear
CreateTCSecondGearATSerial(gearData, tcShiftPolygon);
// NOTE: the lower gear in 'gears' dictionary has index i !!
gears[i].Ratio = double.NaN;
gears[i].LossMap = null;
......@@ -351,7 +376,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
}
public IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxInputData,
public IList<VectoRunData.AuxData> CreateAuxiliaryData(
IAuxiliariesDeclarationInputData auxInputData,
MissionType mission, VehicleClass hvdClass)
{
if (!auxInputData.SavedInDeclarationMode) {
......@@ -371,6 +397,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
if (auxData == null) {
throw new VectoException("Auxiliary {0} not found.", auxType);
}
var aux = new VectoRunData.AuxData {
DemandType = AuxiliaryDemandType.Constant,
Technology = auxData.Technology
......@@ -387,23 +414,26 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
aux.ID = Constants.Auxiliaries.IDs.SteeringPump;
break;
case AuxiliaryType.HVAC:
aux.PowerDemand = DeclarationData.HeatingVentilationAirConditioning.Lookup(mission,
aux.PowerDemand = DeclarationData.HeatingVentilationAirConditioning.Lookup(
mission,
auxData.Technology.FirstOrDefault(), hvdClass).PowerDemand;
aux.ID = Constants.Auxiliaries.IDs.HeatingVentilationAirCondition;
break;
case AuxiliaryType.PneumaticSystem:
aux.PowerDemand = DeclarationData.PneumaticSystem.Lookup(mission, auxData.Technology.FirstOrDefault()).PowerDemand;
aux.PowerDemand = DeclarationData.PneumaticSystem.Lookup(mission, auxData.Technology.FirstOrDefault())
.PowerDemand;
aux.ID = Constants.Auxiliaries.IDs.PneumaticSystem;
break;
case AuxiliaryType.ElectricSystem:
aux.PowerDemand = DeclarationData.ElectricSystem.Lookup(mission, auxData.Technology.FirstOrDefault()).PowerDemand;
aux.ID = Constants.Auxiliaries.IDs.ElectricSystem;
break;
default:
continue;
default: continue;
}
retVal.Add(aux);
}
return retVal;
}
......@@ -470,7 +500,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
cdASum += heightShare * share * cdA * (vAirX * vAirX + vAirY * vAirY) / (vVeh * vVeh);
}
}
points.Add(new CrossWindCorrectionCurveReader.CrossWindCorrectionEntry {
points.Add(
new CrossWindCorrectionCurveReader.CrossWindCorrectionEntry {
Velocity = vVeh,
EffectiveCrossSectionArea = cdASum
});
......@@ -492,7 +524,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
return null;
}
public AirdragData CreateAirdragData(IAirdragDeclarationInputData airdragInputData, Mission mission,
public AirdragData CreateAirdragData(
IAirdragDeclarationInputData airdragInputData, Mission mission,
Segment segment)
{
if (airdragInputData == null || airdragInputData.AirDragArea == null) {
......@@ -501,13 +534,17 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var retVal = SetCommonAirdragData(airdragInputData);
retVal.DeclaredAirdragArea = mission.MissionType == MissionType.Construction ? mission.DefaultCDxA : airdragInputData.AirDragArea;
retVal.DeclaredAirdragArea = mission.MissionType == MissionType.Construction
? mission.DefaultCDxA
: airdragInputData.AirDragArea;
var aerodynamicDragArea = retVal.DeclaredAirdragArea + mission.Trailer.Sum(t => t.DeltaCdA).DefaultIfNull(0);
retVal.CrossWindCorrectionCurve =
new CrosswindCorrectionCdxALookup(aerodynamicDragArea,
GetDeclarationAirResistanceCurve(mission.CrossWindCorrectionParameters, aerodynamicDragArea, segment.VehicleHeight),
new CrosswindCorrectionCdxALookup(
aerodynamicDragArea,
GetDeclarationAirResistanceCurve(
mission.CrossWindCorrectionParameters, aerodynamicDragArea, segment.VehicleHeight),
CrossWindCorrectionMode.DeclarationModeCorrection);
return retVal;
}
......@@ -519,8 +556,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
return new AirdragData() {
CertificationMethod = CertificationMethod.StandardValues,
DeclaredAirdragArea = mission.DefaultCDxA,
CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(aerodynamicDragArea,
GetDeclarationAirResistanceCurve(mission.CrossWindCorrectionParameters, aerodynamicDragArea, segment.VehicleHeight),
CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(
aerodynamicDragArea,
GetDeclarationAirResistanceCurve(
mission.CrossWindCorrectionParameters, aerodynamicDragArea, segment.VehicleHeight),
CrossWindCorrectionMode.DeclarationModeCorrection)
};
}
......
......@@ -56,13 +56,15 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var retVal = SetCommonVehicleData(data);
retVal.AxleConfiguration = data.AxleConfiguration;
retVal.BodyAndTrailerWeight = data.CurbMassExtra;
//retVal.CurbWeight += data.CurbMassExtra;
retVal.TrailerGrossVehicleWeight = 0.SI<Kilogram>();
retVal.Loading = data.Loading;
retVal.DynamicTyreRadius = data.DynamicTyreRadius;
var axles = data.Components.AxleWheels.AxlesEngineering;
retVal.AxleData = axles.Select(axle => new Axle {
retVal.AxleData = axles.Select(
axle => new Axle {
WheelsDimension = axle.Tyre.Dimension,
Inertia = axle.Tyre.Inertia,
TwinTyres = axle.TwinTyres,
......@@ -70,6 +72,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
AxleWeightShare = axle.AxleWeightShare,
TyreTestLoad = axle.Tyre.TyreTestLoad,
AxleType = axle.AxleType,
//Wheels = axle.WheelsStr
}).ToList();
return retVal;
......@@ -82,48 +85,54 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
switch (airdragData.CrossWindCorrectionMode) {
case CrossWindCorrectionMode.NoCorrection:
retVal.CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(airdragData.AirDragArea,
retVal.CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(
airdragData.AirDragArea,
CrossWindCorrectionCurveReader.GetNoCorrectionCurve(airdragData.AirDragArea),
CrossWindCorrectionMode.NoCorrection);
break;
case CrossWindCorrectionMode.SpeedDependentCorrectionFactor:
retVal.CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(airdragData.AirDragArea,
CrossWindCorrectionCurveReader.ReadSpeedDependentCorrectionCurve(airdragData.CrosswindCorrectionMap,
retVal.CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(
airdragData.AirDragArea,
CrossWindCorrectionCurveReader.ReadSpeedDependentCorrectionCurve(
airdragData.CrosswindCorrectionMap,
airdragData.AirDragArea), CrossWindCorrectionMode.SpeedDependentCorrectionFactor);
break;
case CrossWindCorrectionMode.VAirBetaLookupTable:
retVal.CrossWindCorrectionCurve = new CrosswindCorrectionVAirBeta(airdragData.AirDragArea,
retVal.CrossWindCorrectionCurve = new CrosswindCorrectionVAirBeta(
airdragData.AirDragArea,
CrossWindCorrectionCurveReader.ReadCdxABetaTable(airdragData.CrosswindCorrectionMap));
break;
case CrossWindCorrectionMode.DeclarationModeCorrection:
var airDragArea = airdragData.AirDragArea ??
DeclarationData.Segments.LookupCdA(data.VehicleCategory, data.AxleConfiguration, data.GrossVehicleMassRating, false);
var height = data.Height ?? DeclarationData.Segments.LookupHeight(data.VehicleCategory, data.AxleConfiguration,
DeclarationData.Segments.LookupCdA(
data.VehicleCategory, data.AxleConfiguration, data.GrossVehicleMassRating, false);
var height = data.Height ?? DeclarationData.Segments.LookupHeight(
data.VehicleCategory, data.AxleConfiguration,
data.GrossVehicleMassRating, false);
retVal.CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(airDragArea,
retVal.CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup(
airDragArea,
DeclarationDataAdapter.GetDeclarationAirResistanceCurve(
GetAirdragParameterSet(data.VehicleCategory, data.AxleConfiguration, data.Components.AxleWheels.AxlesEngineering.Count), airDragArea, height),
GetAirdragParameterSet(
data.VehicleCategory, data.AxleConfiguration, data.Components.AxleWheels.AxlesEngineering.Count), airDragArea,
height),
CrossWindCorrectionMode.DeclarationModeCorrection);
break;
default:
throw new ArgumentOutOfRangeException("CrosswindCorrection", airdragData.CrossWindCorrectionMode.ToString());
}
return retVal;
}
private string GetAirdragParameterSet(VehicleCategory vehicleCategory, AxleConfiguration axles, int numAxles)
{
switch (vehicleCategory) {
case VehicleCategory.RigidTruck:
return numAxles > axles.NumAxles() ? "RigidTrailer" : "RigidSolo";
case VehicleCategory.Tractor:
return "TractorSemitrailer";
case VehicleCategory.RigidTruck: return numAxles > axles.NumAxles() ? "RigidTrailer" : "RigidSolo";
case VehicleCategory.Tractor: return "TractorSemitrailer";
case VehicleCategory.CityBus:
case VehicleCategory.InterurbanBus:
case VehicleCategory.Coach:
return "CoachBus";
default:
throw new ArgumentOutOfRangeException("vehicleCategory", vehicleCategory, null);
case VehicleCategory.Coach: return "CoachBus";
default: throw new ArgumentOutOfRangeException("vehicleCategory", vehicleCategory, null);
}
}
......@@ -132,7 +141,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
Log.Error("{0} is in Declaration Mode but is used for Engineering Mode!", msg);
}
internal CombustionEngineData CreateEngineData(IEngineEngineeringInputData engine, IGearboxEngineeringInputData gbx, IEnumerable<ITorqueLimitInputData> torqueLimits, ITorqueConverterEngineeringInputData torqueConverter, TankSystem? tankSystem = null)
internal CombustionEngineData CreateEngineData(
IEngineEngineeringInputData engine, IGearboxEngineeringInputData gbx,
IEnumerable<ITorqueLimitInputData> torqueLimits, ITorqueConverterEngineeringInputData torqueConverter,
TankSystem? tankSystem = null)
{
if (engine.SavedInDeclarationMode) {
WarnEngineeringMode("EngineData");
......@@ -141,6 +153,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var retVal = SetCommonCombustionEngineData(engine, tankSystem);
retVal.Inertia = engine.Inertia +
(gbx != null && gbx.Type.AutomaticTransmission() ? torqueConverter.Inertia : 0.SI<KilogramSquareMeter>());
retVal.EngineStartTime = engine.EngineStartTime ?? DeclarationData.Engine.DefaultEngineStartTime;
var limits = torqueLimits.ToDictionary(e => e.Gear);
var numGears = gbx == null ? 0 : gbx.Gears.Count;
var fullLoadCurves = new Dictionary<uint, EngineFullLoadCurve>(numGears + 1);
......@@ -152,12 +165,16 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
fullLoadCurves[(uint)gear.Gear] = IntersectFullLoadCurves(fullLoadCurves[0], maxTorque);
}
}
retVal.FullLoadCurves = fullLoadCurves;
retVal.FuelConsumptionCorrectionFactor = engine.WHTCEngineering;
return retVal;
}
internal GearboxData CreateGearboxData(IGearboxEngineeringInputData gearbox, CombustionEngineData engineData, IGearshiftEngineeringInputData gearshiftData, double axlegearRatio, Meter dynamicTyreRadius, VehicleCategory vehicleCategory, ITorqueConverterEngineeringInputData torqueConverter)
internal GearboxData CreateGearboxData(
IGearboxEngineeringInputData gearbox, CombustionEngineData engineData, IGearshiftEngineeringInputData gearshiftData,
double axlegearRatio, Meter dynamicTyreRadius, VehicleCategory vehicleCategory,
ITorqueConverterEngineeringInputData torqueConverter)
{
if (gearbox.SavedInDeclarationMode) {
WarnEngineeringMode("GearboxData");
......@@ -189,7 +206,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var shiftPolygon = gear.ShiftPolygon != null && gear.ShiftPolygon.SourceType != DataSourceType.Missing
? ShiftPolygonReader.Create(gear.ShiftPolygon)
: DeclarationData.Gearbox.ComputeShiftPolygon(gearbox.Type, (int)i, engineData.FullLoadCurves[i + 1], gearbox.Gears,
: DeclarationData.Gearbox.ComputeShiftPolygon(
gearbox.Type, (int)i, engineData.FullLoadCurves[i + 1], gearbox.Gears,
engineData,
axlegearRatio, dynamicTyreRadius);
var gearData = new GearData {
......@@ -202,21 +220,23 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
CreateATGearData(gearbox, i, gearData, tcShiftPolygon, gearDifferenceRatio, gears, vehicleCategory);
gears.Add(i + 1, gearData);
}
retVal.Gears = gears;
if (retVal.Type.AutomaticTransmission()) {
var ratio = double.IsNaN(retVal.Gears[1].Ratio) ? 1 : retVal.Gears[1].TorqueConverterRatio / retVal.Gears[1].Ratio;
retVal.PowershiftShiftTime = gearbox.PowershiftShiftTime;
retVal.TorqueConverterData = TorqueConverterDataReader.Create(torqueConverter.TCData,
retVal.TorqueConverterData = TorqueConverterDataReader.Create(
torqueConverter.TCData,
torqueConverter.ReferenceRPM, torqueConverter.MaxInputSpeed, ExecutionMode.Engineering, ratio,
gearshiftData.CLUpshiftMinAcceleration, gearshiftData.CCUpshiftMinAcceleration);
}
return retVal;
}
private static void CreateATGearData(IGearboxEngineeringInputData gearbox, uint i, GearData gearData,
private static void CreateATGearData(
IGearboxEngineeringInputData gearbox, uint i, GearData gearData,
ShiftPolygon tcShiftPolygon, double gearDifferenceRatio, Dictionary<uint, GearData> gears,
VehicleCategory vehicleCategory)
{
......@@ -233,6 +253,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
// ratio between first and second gear is above threshold, torqueconverter is active in second gear as well
// -> duplicate ratio and lossmap for torque converter mode, remove locked transmission for previous gear
CreateTCSecondGearATSerial(gearData, tcShiftPolygon);
// NOTE: the lower gear in 'gears' dictionary has index i !!
gears[i].Ratio = double.NaN;
gears[i].LossMap = null;
......@@ -240,7 +261,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
}
}
private static void SetEngineeringData(IGearboxEngineeringInputData gearbox, IGearshiftEngineeringInputData gearshiftData, GearboxData retVal)
private static void SetEngineeringData(
IGearboxEngineeringInputData gearbox, IGearshiftEngineeringInputData gearshiftData, GearboxData retVal)
{
retVal.Inertia = gearbox.Type.ManualTransmission() ? gearbox.Inertia : 0.SI<KilogramSquareMeter>();
retVal.TractionInterruption = gearbox.TractionInterruption;
......@@ -280,10 +302,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
case AuxiliaryDemandType.Constant:
auxList.Add(CreateConstantAuxiliary(a));
break;
default:
throw new VectoException("Auxiliary type {0} not supported!", a.AuxiliaryType);
default: throw new VectoException("Auxiliary type {0} not supported!", a.AuxiliaryType);
}
}
return auxList;
}
......@@ -296,6 +318,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
throw new VectoSimulationException(
"Demand Map for auxiliary {0} has to contain exactly 3 columns and at least 4 rows", a.ID);
}
return new VectoRunData.AuxData {
ID = a.ID,
DemandType = AuxiliaryDemandType.Mapping,
......@@ -326,12 +349,15 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
if (driver.Lookahead == null) {
throw new VectoSimulationException("Error: Lookahead Data is missing.");
}
var lookAheadData = new DriverData.LACData {
Enabled = driver.Lookahead.Enabled,
//Deceleration = driver.Lookahead.Deceleration,
MinSpeed = driver.Lookahead.MinSpeed,
LookAheadDecisionFactor =
new LACDecisionFactor(driver.Lookahead.CoastingDecisionFactorOffset, driver.Lookahead.CoastingDecisionFactorScaling,
new LACDecisionFactor(
driver.Lookahead.CoastingDecisionFactorOffset, driver.Lookahead.CoastingDecisionFactorScaling,
driver.Lookahead.CoastingDecisionFactorTargetSpeedLookup,
driver.Lookahead.CoastingDecisionFactorVelocityDropLookup),
LookAheadDistanceFactor = driver.Lookahead.LookaheadDistanceFactor
......@@ -346,6 +372,12 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
AccelerationCurve = accelerationData,
LookAheadCoasting = lookAheadData,
OverSpeedEcoRoll = overspeedData,
EngineStopStart = new DriverData.EngineStopStartData() {
EngineOffStandStillThreshold =
driver.EngineOffStandStillThreshold ?? DeclarationData.Driver.EngineOffStandStillThreshold,
MaxEngineOffTimespan = driver.MaxEngineOffTimespan ?? DeclarationData.Driver.MaxEngineOffTimespan,
UtilityFactor = driver.EngineStopStartUtilityFactor,
}
};
return retVal;
}
......
......@@ -115,6 +115,10 @@ namespace TUGraz.VectoCore.Models.Declaration
public static class Driver
{
public static readonly Second EngineOffStandStillThreshold = 2.SI<Second>();
public static readonly Second MaxEngineOffTimespan = 120.SI<Second>();
public const double EngineStopStartUtilityFactor = 0.8;
public static class LookAhead
{
public const bool Enabled = true;
......@@ -161,6 +165,7 @@ namespace TUGraz.VectoCore.Models.Declaration
public static readonly KilogramSquareMeter EngineBaseInertia = 0.41.SI<KilogramSquareMeter>();
public static readonly SI EngineDisplacementInertia = (0.27 * 1000).SI(Unit.SI.Kilo.Gramm.Per.Meter); // [kg/m]
public static readonly Second DefaultEngineStartTime = 1.SI<Second>();
public const double TorqueLimitGearboxFactor = 0.9;
public const double TorqueLimitVehicleFactor = 0.95;
......
......@@ -56,6 +56,11 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
[ModalResultField(typeof(bool), "Ignition On")] IgnitionOn,
[ModalResultField(typeof(SI), caption: "P_ice_start [kW]", outputFactor: 1e-3)] P_ice_start,
[ModalResultField(typeof(SI), caption: "P_aux_ESS_mech [kW]", outputFactor: 1e-3)] P_aux_ice_off,
/// <summary>
/// Engine speed [1/min].
/// </summary>
......@@ -129,12 +134,12 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
/// <summary>
/// [g/h] Fuel consumption after correction for ADAS technologies. (Based on FC-AAUXc.)
/// </summary>
[ModalResultField(typeof(SI), name: "FC-ADAS", caption: "FC-ADAS [g/h]", outputFactor: 3600 * 1000)] FCADAS,
[ModalResultField(typeof(SI), name: "FC-ESS", caption: "FC-ESS [g/h]", outputFactor: 3600 * 1000)] FCEngineStopStart,
/// <summary>
/// [g/h] Fuel consumption after WHTC Correction. (Based on FC-ADAS.)
/// </summary>
[ModalResultField(typeof(SI), name: "FC-Final", caption: "FC-Final [g/h]", outputFactor: 3600 * 1000)] FCFinal,
[ModalResultField(typeof(SI), name: "FC-Final_mod", caption: "FC-Final_mod [g/h]", outputFactor: 3600 * 1000)] FCFinal,
/// <summary>
/// [km] Travelled distance.
......
......@@ -39,7 +39,7 @@ namespace TUGraz.VectoCore.Models.Simulation.DataBus
/// Defines interfaces for all different cockpits to access shared data of the powertrain.
/// </summary>
public interface IDataBus : IGearboxInfo, IAxlegearInfo, IEngineInfo, IVehicleInfo, IMileageCounter, IClutchInfo,
IBrakes, IWheelsInfo, IDriverInfo, IDrivingCycleInfo
IBrakes, IWheelsInfo, IDriverInfo, IDrivingCycleInfo, IEngineControl
{
ExecutionMode ExecutionMode { get; }
......
......@@ -118,7 +118,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
.AddComponent(data.AngledriveData != null ? new Angledrive(container, data.AngledriveData) : null)
.AddComponent(gearbox, data.Retarder, container)
.AddComponent(new Clutch(container, data.EngineData));
var engine = new CombustionEngine(container, data.EngineData, pt1Disabled: true);
var engine = new StopStartCombustionEngine(container, data.EngineData, pt1Disabled: true);
var idleController = GetIdleController(data.PTO, engine, container);
powertrain.AddComponent(engine, idleController)
......@@ -187,7 +187,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
powertrain = powertrain.AddComponent(new Clutch(container, data.EngineData));
}
var engine = new CombustionEngine(container, data.EngineData);
var engine = new StopStartCombustionEngine(container, data.EngineData);
var idleController = GetIdleController(data.PTO, engine, container);
powertrain.AddComponent(engine, idleController)
......@@ -217,7 +217,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
if (data.GearboxData.Type.ManualTransmission()) {
powertrain = powertrain.AddComponent(new Clutch(container, data.EngineData));
}
powertrain.AddComponent(new CombustionEngine(container, data.EngineData))
powertrain.AddComponent(new StopStartCombustionEngine(container, data.EngineData))
.AddAuxiliaries(container, data);
_modData.HasTorqueConverter = data.GearboxData.Type.AutomaticTransmission();
......@@ -236,7 +236,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
// DistanceBasedDrivingCycle --> driver --> vehicle --> wheels
// --> axleGear --> (retarder) --> gearBox --> (retarder) --> clutch --> engine <-- Aux
var cycle = new DistanceBasedDrivingCycle(container, data.Cycle);
var powertrain = cycle.AddComponent(new Driver(container, data.DriverData, new DefaultDriverStrategy()))
var powertrain = cycle.AddComponent(new Driver(container, data.DriverData, new DefaultDriverStrategy(data.VehicleData.ADAS)))
.AddComponent(new Vehicle(container, data.VehicleData, data.AirdragData))
.AddComponent(new Wheels(container, data.VehicleData.DynamicTyreRadius, data.VehicleData.WheelsInertia))
.AddComponent(new Brakes(container))
......@@ -247,7 +247,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
powertrain = powertrain.AddComponent(new Clutch(container, data.EngineData));
}
var engine = new CombustionEngine(container, data.EngineData);
var engine = new StopStartCombustionEngine(container, data.EngineData);
var idleController = GetIdleController(data.PTO, engine, container);
cycle.IdleController = idleController as IdleControllerSwitcher;
......
......@@ -55,6 +55,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
new List<Tuple<int, VectoSimulationComponent>>();
internal IEngineInfo Engine;
internal IEngineControl EngineCtl;
internal IGearboxInfo Gearbox;
internal IAxlegearInfo Axlegear;
internal IVehicleInfo Vehicle;
......@@ -295,6 +296,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
Engine = c;
commitPriority = 2;
})
.If<IEngineControl>(c => {
EngineCtl = c;
})
.If<IDriverInfo>(c => Driver = c)
.If<IGearboxInfo>(c => {
Gearbox = c;
......@@ -469,5 +473,15 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
{
get { return Wheels.ReducedMassWheels; }
}
#region Implementation of IEngineControl
public bool IgnitionOn
{
get { return EngineCtl.IgnitionOn; }
set { EngineCtl.IgnitionOn = value; }
}
#endregion
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment