diff --git a/VECTO Changelog.txt b/VECTO Changelog.txt index d5ee1b49f3e3a0ded2832d4927c4edcb619e83a9..81cccc3fa47979fae17f7fc7bac866b60bbc336f 100644 --- a/VECTO Changelog.txt +++ b/VECTO Changelog.txt @@ -5,6 +5,11 @@ VECTO ?.? (future release) VECTO 1.1 x (current source - next release) + +VECTO 1.1 beta 4 +- Engine Start/Stop implemented +- Fixed error in FC interpolation (invalid extrapolation errors) + VECTO 1.1 beta 3 - FC Extrapolation will abort the calculation - Transmission Type selection in Gearbox (.vgbx) file. diff --git a/VECTO/GUI/F_GEN.Designer.vb b/VECTO/GUI/F_GEN.Designer.vb index 69ca551288e87c45f1d9fc220d47f215dc26dc90..3c6980d9e2d8de9a12dae6d1aeb73e5b158e3ef0 100644 --- a/VECTO/GUI/F_GEN.Designer.vb +++ b/VECTO/GUI/F_GEN.Designer.vb @@ -103,13 +103,18 @@ Partial Class F_GEN Me.TextBoxTRS = New System.Windows.Forms.TextBox() Me.CheckBoxDynKor = New System.Windows.Forms.CheckBox() Me.CheckBoxSCR = New System.Windows.Forms.CheckBox() - Me.ChBStartStop = New System.Windows.Forms.CheckBox() Me.CheckBoxColdSt = New System.Windows.Forms.CheckBox() Me.ButOpenTRS = New System.Windows.Forms.Button() Me.ButtonTRS = New System.Windows.Forms.Button() Me.ComboBoxGearShift = New System.Windows.Forms.ComboBox() Me.TabControl1 = New System.Windows.Forms.TabControl() Me.TabPgDriver = New System.Windows.Forms.TabPage() + Me.ChBStartStop = New System.Windows.Forms.CheckBox() + Me.GrStartStop = New System.Windows.Forms.GroupBox() + Me.TBSSspeed = New System.Windows.Forms.TextBox() + Me.TBSStime = New System.Windows.Forms.TextBox() + Me.LabelSStime = New System.Windows.Forms.Label() + Me.LabelSSspeed = New System.Windows.Forms.Label() Me.BtAccOpen = New System.Windows.Forms.Button() Me.Label1 = New System.Windows.Forms.Label() Me.BtDesMaxBr = New System.Windows.Forms.Button() @@ -128,12 +133,6 @@ Partial Class F_GEN Me.Label8 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label() Me.TextBoxIncPe = New System.Windows.Forms.TextBox() - Me.TabPgStartStop = New System.Windows.Forms.TabPage() - Me.GroupBoxStartStop = New System.Windows.Forms.GroupBox() - Me.LabelSStime = New System.Windows.Forms.Label() - Me.LabelSSspeed = New System.Windows.Forms.Label() - Me.TBSStime = New System.Windows.Forms.TextBox() - Me.TBSSspeed = New System.Windows.Forms.TextBox() Me.TabPgTEST = New System.Windows.Forms.TabPage() Me.GrGearShift = New System.Windows.Forms.GroupBox() Me.TBpfast = New System.Windows.Forms.TextBox() @@ -185,10 +184,9 @@ Partial Class F_GEN Me.GrAux.SuspendLayout() Me.TabControl1.SuspendLayout() Me.TabPgDriver.SuspendLayout() + Me.GrStartStop.SuspendLayout() Me.TabPgKF.SuspendLayout() Me.GroupBox2.SuspendLayout() - Me.TabPgStartStop.SuspendLayout() - Me.GroupBoxStartStop.SuspendLayout() Me.TabPgTEST.SuspendLayout() Me.GrGearShift.SuspendLayout() Me.StatusStrip1.SuspendLayout() @@ -1026,18 +1024,6 @@ Partial Class F_GEN Me.CheckBoxSCR.Text = "Exhaust System Simulation" Me.CheckBoxSCR.UseVisualStyleBackColor = True ' - 'ChBStartStop - ' - Me.ChBStartStop.AutoSize = True - Me.ChBStartStop.Checked = True - Me.ChBStartStop.CheckState = System.Windows.Forms.CheckState.Checked - Me.ChBStartStop.Location = New System.Drawing.Point(282, 53) - Me.ChBStartStop.Name = "ChBStartStop" - Me.ChBStartStop.Size = New System.Drawing.Size(101, 17) - Me.ChBStartStop.TabIndex = 9 - Me.ChBStartStop.Text = "ICE Start / Stop" - Me.ChBStartStop.UseVisualStyleBackColor = True - ' 'CheckBoxColdSt ' Me.CheckBoxColdSt.AutoSize = True @@ -1090,7 +1076,6 @@ Partial Class F_GEN Me.TabControl1.Controls.Add(Me.TabPgColdSt) Me.TabControl1.Controls.Add(Me.TabPgHEV) Me.TabControl1.Controls.Add(Me.TabPgKF) - Me.TabControl1.Controls.Add(Me.TabPgStartStop) Me.TabControl1.Controls.Add(Me.TabPgTEST) Me.TabControl1.Location = New System.Drawing.Point(1, 107) Me.TabControl1.Name = "TabControl1" @@ -1101,6 +1086,8 @@ Partial Class F_GEN ' 'TabPgDriver ' + Me.TabPgDriver.Controls.Add(Me.ChBStartStop) + Me.TabPgDriver.Controls.Add(Me.GrStartStop) Me.TabPgDriver.Controls.Add(Me.BtAccOpen) Me.TabPgDriver.Controls.Add(Me.Label1) Me.TabPgDriver.Controls.Add(Me.BtDesMaxBr) @@ -1113,6 +1100,63 @@ Partial Class F_GEN Me.TabPgDriver.Text = "Driver" Me.TabPgDriver.UseVisualStyleBackColor = True ' + 'ChBStartStop + ' + Me.ChBStartStop.AutoSize = True + Me.ChBStartStop.Checked = True + Me.ChBStartStop.CheckState = System.Windows.Forms.CheckState.Checked + Me.ChBStartStop.Location = New System.Drawing.Point(9, 94) + Me.ChBStartStop.Name = "ChBStartStop" + Me.ChBStartStop.Size = New System.Drawing.Size(101, 17) + Me.ChBStartStop.TabIndex = 39 + Me.ChBStartStop.Text = "ICE Start / Stop" + Me.ChBStartStop.UseVisualStyleBackColor = True + ' + 'GrStartStop + ' + Me.GrStartStop.Controls.Add(Me.TBSSspeed) + Me.GrStartStop.Controls.Add(Me.TBSStime) + Me.GrStartStop.Controls.Add(Me.LabelSStime) + Me.GrStartStop.Controls.Add(Me.LabelSSspeed) + Me.GrStartStop.Location = New System.Drawing.Point(9, 117) + Me.GrStartStop.Name = "GrStartStop" + Me.GrStartStop.Size = New System.Drawing.Size(207, 87) + Me.GrStartStop.TabIndex = 38 + Me.GrStartStop.TabStop = False + Me.GrStartStop.Text = "Engine Start Stop" + ' + 'TBSSspeed + ' + Me.TBSSspeed.Location = New System.Drawing.Point(120, 19) + Me.TBSSspeed.Name = "TBSSspeed" + Me.TBSSspeed.Size = New System.Drawing.Size(64, 20) + Me.TBSSspeed.TabIndex = 34 + ' + 'TBSStime + ' + Me.TBSStime.Location = New System.Drawing.Point(120, 45) + Me.TBSStime.Name = "TBSStime" + Me.TBSStime.Size = New System.Drawing.Size(64, 20) + Me.TBSStime.TabIndex = 36 + ' + 'LabelSStime + ' + Me.LabelSStime.AutoSize = True + Me.LabelSStime.Location = New System.Drawing.Point(13, 48) + Me.LabelSStime.Name = "LabelSStime" + Me.LabelSStime.Size = New System.Drawing.Size(101, 13) + Me.LabelSStime.TabIndex = 35 + Me.LabelSStime.Text = "Min ICE-On Time [s]" + ' + 'LabelSSspeed + ' + Me.LabelSSspeed.AutoSize = True + Me.LabelSSspeed.Location = New System.Drawing.Point(19, 21) + Me.LabelSSspeed.Name = "LabelSSspeed" + Me.LabelSSspeed.Size = New System.Drawing.Size(95, 13) + Me.LabelSSspeed.TabIndex = 37 + Me.LabelSSspeed.Text = "Max Speed [km/h]" + ' 'BtAccOpen ' Me.BtAccOpen.Image = Global.VECTO.My.Resources.Resources.application_export_icon_small @@ -1294,65 +1338,6 @@ Partial Class F_GEN Me.TextBoxIncPe.Size = New System.Drawing.Size(61, 20) Me.TextBoxIncPe.TabIndex = 0 ' - 'TabPgStartStop - ' - Me.TabPgStartStop.Controls.Add(Me.GroupBoxStartStop) - Me.TabPgStartStop.Location = New System.Drawing.Point(4, 22) - Me.TabPgStartStop.Name = "TabPgStartStop" - Me.TabPgStartStop.Padding = New System.Windows.Forms.Padding(3) - Me.TabPgStartStop.Size = New System.Drawing.Size(646, 442) - Me.TabPgStartStop.TabIndex = 4 - Me.TabPgStartStop.Text = "Start-Stop" - Me.TabPgStartStop.UseVisualStyleBackColor = True - ' - 'GroupBoxStartStop - ' - Me.GroupBoxStartStop.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.GroupBoxStartStop.Controls.Add(Me.LabelSStime) - Me.GroupBoxStartStop.Controls.Add(Me.LabelSSspeed) - Me.GroupBoxStartStop.Controls.Add(Me.TBSStime) - Me.GroupBoxStartStop.Controls.Add(Me.TBSSspeed) - Me.GroupBoxStartStop.Location = New System.Drawing.Point(6, 6) - Me.GroupBoxStartStop.Name = "GroupBoxStartStop" - Me.GroupBoxStartStop.Size = New System.Drawing.Size(634, 319) - Me.GroupBoxStartStop.TabIndex = 12 - Me.GroupBoxStartStop.TabStop = False - Me.GroupBoxStartStop.Text = "Parameters" - ' - 'LabelSStime - ' - Me.LabelSStime.AutoSize = True - Me.LabelSStime.Location = New System.Drawing.Point(23, 55) - Me.LabelSStime.Name = "LabelSStime" - Me.LabelSStime.Size = New System.Drawing.Size(101, 13) - Me.LabelSStime.TabIndex = 2 - Me.LabelSStime.Text = "Min ICE-On Time [s]" - ' - 'LabelSSspeed - ' - Me.LabelSSspeed.AutoSize = True - Me.LabelSSspeed.Location = New System.Drawing.Point(29, 28) - Me.LabelSSspeed.Name = "LabelSSspeed" - Me.LabelSSspeed.Size = New System.Drawing.Size(95, 13) - Me.LabelSSspeed.TabIndex = 2 - Me.LabelSSspeed.Text = "Max Speed [km/h]" - ' - 'TBSStime - ' - Me.TBSStime.Location = New System.Drawing.Point(130, 52) - Me.TBSStime.Name = "TBSStime" - Me.TBSStime.Size = New System.Drawing.Size(64, 20) - Me.TBSStime.TabIndex = 2 - ' - 'TBSSspeed - ' - Me.TBSSspeed.Location = New System.Drawing.Point(130, 26) - Me.TBSSspeed.Name = "TBSSspeed" - Me.TBSSspeed.Size = New System.Drawing.Size(64, 20) - Me.TBSSspeed.TabIndex = 1 - ' 'TabPgTEST ' Me.TabPgTEST.Controls.Add(Me.GrGearShift) @@ -1368,7 +1353,6 @@ Partial Class F_GEN Me.TabPgTEST.Controls.Add(Me.ComboBoxEngType) Me.TabPgTEST.Controls.Add(Me.CheckBoxDynKor) Me.TabPgTEST.Controls.Add(Me.ComboBoxEclass) - Me.TabPgTEST.Controls.Add(Me.ChBStartStop) Me.TabPgTEST.Controls.Add(Me.CheckBoxSCR) Me.TabPgTEST.Controls.Add(Me.ButOpenTRS) Me.TabPgTEST.Controls.Add(Me.ComboBoxVehType) @@ -1797,12 +1781,11 @@ Partial Class F_GEN Me.TabControl1.ResumeLayout(False) Me.TabPgDriver.ResumeLayout(False) Me.TabPgDriver.PerformLayout() + Me.GrStartStop.ResumeLayout(False) + Me.GrStartStop.PerformLayout() Me.TabPgKF.ResumeLayout(False) Me.GroupBox2.ResumeLayout(False) Me.GroupBox2.PerformLayout() - Me.TabPgStartStop.ResumeLayout(False) - Me.GroupBoxStartStop.ResumeLayout(False) - Me.GroupBoxStartStop.PerformLayout() Me.TabPgTEST.ResumeLayout(False) Me.TabPgTEST.PerformLayout() Me.GrGearShift.ResumeLayout(False) @@ -1880,12 +1863,6 @@ Partial Class F_GEN Friend WithEvents ButOpenEMO As System.Windows.Forms.Button Friend WithEvents ButOpenEXS As System.Windows.Forms.Button Friend WithEvents ButOK As System.Windows.Forms.Button - Friend WithEvents GroupBoxStartStop As System.Windows.Forms.GroupBox - Friend WithEvents ChBStartStop As System.Windows.Forms.CheckBox - Friend WithEvents LabelSSspeed As System.Windows.Forms.Label - Friend WithEvents TBSSspeed As System.Windows.Forms.TextBox - Friend WithEvents LabelSStime As System.Windows.Forms.Label - Friend WithEvents TBSStime As System.Windows.Forms.TextBox Friend WithEvents TextBoxEXS As System.Windows.Forms.TextBox Friend WithEvents TextBoxTRS As System.Windows.Forms.TextBox Friend WithEvents TbGBX As System.Windows.Forms.TextBox @@ -1904,7 +1881,6 @@ Partial Class F_GEN Friend WithEvents TextBoxMAC As System.Windows.Forms.TextBox Friend WithEvents TextBoxMAA As System.Windows.Forms.TextBox Friend WithEvents TabPgKF As System.Windows.Forms.TabPage - Friend WithEvents TabPgStartStop As System.Windows.Forms.TabPage Friend WithEvents CbSOCnIter As System.Windows.Forms.CheckBox Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents TbSOCstart As System.Windows.Forms.TextBox @@ -1970,4 +1946,10 @@ Partial Class F_GEN Friend WithEvents OpenWithGRAPHiToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents OpenWithToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents ShowInFolderToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents ChBStartStop As System.Windows.Forms.CheckBox + Friend WithEvents GrStartStop As System.Windows.Forms.GroupBox + Friend WithEvents TBSSspeed As System.Windows.Forms.TextBox + Friend WithEvents TBSStime As System.Windows.Forms.TextBox + Friend WithEvents LabelSStime As System.Windows.Forms.Label + Friend WithEvents LabelSSspeed As System.Windows.Forms.Label End Class diff --git a/VECTO/GUI/F_GEN.vb b/VECTO/GUI/F_GEN.vb index 580eaefb4260a96f5c3a34499366ee58e7a1a2d7..6b72e993e047c74537fe06a856bfaafb83f3d08c 100644 --- a/VECTO/GUI/F_GEN.vb +++ b/VECTO/GUI/F_GEN.vb @@ -9,7 +9,6 @@ Public Class F_GEN Private pgColdSt As TabPage Private pgHEV As TabPage Private pgMapCr As TabPage - Private pgStStop As TabPage Private pgTest As TabPage Private pgDriver As TabPage @@ -37,7 +36,6 @@ Public Class F_GEN pgColdSt = Me.TabPgColdSt pgHEV = Me.TabPgHEV pgMapCr = Me.TabPgKF - pgStStop = Me.TabPgStartStop pgTest = Me.TabPgTEST pgDriver = Me.TabPgDriver @@ -261,20 +259,6 @@ Public Class F_GEN End If End Sub - Private Sub SetStStoptab(ByVal OnOff As Boolean) - If OnOff Then - If Not pgStStopON Then - pgStStopON = True - Me.TabControl1.TabPages.Insert(1, pgStStop) - End If - Else - If pgStStopON Then - pgStStopON = False - Me.TabControl1.Controls.Remove(pgStStop) - End If - End If - End Sub - Private Sub SetDrivertab(ByVal OnOff As Boolean) If OnOff Then If Not pgDriverON Then @@ -972,16 +956,6 @@ Public Class F_GEN Call Change() End Sub - 'Start/Stop - checkbox change - Private Sub ChBStartStop_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChBStartStop.CheckedChanged - SetStStoptab(Me.ChBStartStop.Checked) - Change() - End Sub - - 'Start / Stop - Textbox change - Private Sub TBSSspeed_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TBSSspeed.TextChanged, TBSStime.TextChanged - Change() - End Sub 'TextBox.TextChanged Events => Change() Private Sub TextBoxVEH_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBoxVEH.TextChanged @@ -1090,7 +1064,13 @@ Public Class F_GEN Change() End Sub + Private Sub TBSSspeed_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBSSspeed.TextChanged + Change() + End Sub + Private Sub TBSStime_TextChanged(sender As System.Object, e As System.EventArgs) Handles TBSStime.TextChanged + Change() + End Sub #End Region @@ -1345,6 +1325,11 @@ lbDlog: End Sub + Private Sub ChBStartStop_CheckedChanged_1(sender As System.Object, e As System.EventArgs) Handles ChBStartStop.CheckedChanged + Change() + Me.GrStartStop.Enabled = Me.ChBStartStop.Checked + End Sub + #Region "Open File Context Menu" Private CmFiles As String() @@ -1384,4 +1369,7 @@ lbDlog: #End Region + + + End Class diff --git a/VECTO/Input Files/cDRI.vb b/VECTO/Input Files/cDRI.vb index 0b9a489d9a588c72212406c918c712e21ca24348..87f6f9889508af52a6558548a936e5e569477b80 100644 --- a/VECTO/Input Files/cDRI.vb +++ b/VECTO/Input Files/cDRI.vb @@ -858,6 +858,12 @@ lbEr: For i = 0 To tDim - 1 vm = (Speed(i) + Speed(i + 1)) / 2 + + If vm = 0 Then + WorkerMsg(tMsgID.Err, "Speed can't be zero while distance changes! (line " & i.ToString & ")", MsgSrc) + Return False + End If + ds = Dist(i + 1) - Dist(i) dt = ds / vm diff --git a/VECTO/Input Files/cGEN.vb b/VECTO/Input Files/cGEN.vb index 396d9a0298dbbbd2ad641602479d1487d1ef77f4..163649c19c66a2cecbb6e2d44199850931628d4a 100644 --- a/VECTO/Input Files/cGEN.vb +++ b/VECTO/Input Files/cGEN.vb @@ -276,12 +276,6 @@ Public Class cGEN 'boEXSja = CBool(file.ReadLine(0)) 'stPathExs.Init(MyPath, file.ReadLine(0)) - 'If file.EndOfFile Then GoTo lbClose - - 'boStartStop = CBool(file.ReadLine(0)) - 'siStStV = CSng(file.ReadLine(0)) - 'siStStT = CSng(file.ReadLine(0)) - 'boSOCnJa = CBool(file.ReadLine(0)) 'siSOCstart = CSng(file.ReadLine(0)) @@ -354,6 +348,12 @@ Public Class cGEN VehMode = tVehMode.StandardMode End If + If file.EndOfFile Then GoTo lbClose + + boStartStop = CBool(file.ReadLine(0)) + siStStV = CSng(file.ReadLine(0)) + siStStT = CSng(file.ReadLine(0)) + lbClose: file.Close() @@ -660,14 +660,6 @@ lbClose: 'fGEN.WriteLine("c Exhaust System Simulation Configuration File") 'fGEN.WriteLine(stPathExs.PathOrDummy) - 'Start/Stop - 'fGEN.WriteLine("c ICE Auto-Start/Stop (1/0) - Non HEV only") - 'fGEN.WriteLine(Math.Abs(CInt(boStartStop))) - 'fGEN.WriteLine("c Start/Stop Max Speed [km/h]") - 'fGEN.WriteLine(siStStV) - 'fGEN.WriteLine("c Start/Stop Min ICE-On Time [s]") - 'fGEN.WriteLine(siStStT) - 'SOC-Start Iteration 'fGEN.WriteLine("c SOC Start Iteration (1/0) - HEV only") 'fGEN.WriteLine(Math.Abs(CInt(boSOCnJa))) @@ -716,6 +708,14 @@ lbClose: fGEN.WriteLine("c Engine Only Mode (1/0)") fGEN.WriteLine(CStr(Math.Abs(CInt(EngOnly)))) + 'Start/Stop + fGEN.WriteLine("c ICE Auto-Start/Stop (1/0) - Non HEV only") + fGEN.WriteLine(Math.Abs(CInt(boStartStop))) + fGEN.WriteLine("c Start/Stop Max Speed [km/h]") + fGEN.WriteLine(siStStV) + fGEN.WriteLine("c Start/Stop Min ICE-On Time [s]") + fGEN.WriteLine(siStStT) + fGEN.Close() fGEN = Nothing diff --git a/VECTO/MODcalc/cPower.vb b/VECTO/MODcalc/cPower.vb index 2424b94dc76cc85d81edc7e31a585ffbcb234b52..fa1204de0efcd8a23e91431294aa4926f7d7a4d7 100644 --- a/VECTO/MODcalc/cPower.vb +++ b/VECTO/MODcalc/cPower.vb @@ -439,6 +439,9 @@ lb10: Dim LastPmax As Single + Dim Vcoasting As Single + + Dim MsgSrc As String @@ -821,7 +824,7 @@ lbCheck: Else If MODdata.nn(jz - 1) <= 0.00001 Then - nn = 0 + nn = MODdata.nn(jz - 1) GoTo lb_nOK End If @@ -928,7 +931,6 @@ lb_nOK: End If Else If Nvorg Then - 'Revolutions-setting PaMot = (VEH.I_mot * MODdata.dnUvorg(jz) * 0.01096 * MODdata.nUvorg(jz)) * 0.001 Else PaMot = ((VEH.I_mot * (VEH.AchsI * VEH.Igetr(Gear) / (0.5 * VEH.Dreifen)) ^ 2) * aist * Vist) * 0.001 @@ -1065,6 +1067,18 @@ lb_nOK: Else ' tEngState.Drag (tEngState.Idle, tEngState.Stopped kann's hier nicht geben weil Clutch <> Closed) If P < Pmin Then + 'Overspeed + If DEV.OverSpeedOn Then + Vcoasting = fCoastingSpeed(jz, Gear, nU, Pmin) + + + + End If + + + + + MODdata.ModErrors.TrLossMapExtr = "" 'VKM to Drag-curve @@ -1490,6 +1504,72 @@ lb_nOK: End Function + + + Private Function fCoastingSpeed(ByVal t As Integer, ByVal Gear As Integer, ByVal nU As Single, ByVal Pdrag As Single) As Single + + Dim vstep As Double + Dim vVorz As Integer + Dim Pe As Single + Dim a As Single + Dim v As Single + Dim eps As Single + Dim PvD As Single + Dim LastDiff As Single + Dim Diff As Single + + v = MODdata.Vh.V(t) + + vstep = 0.1 + eps = 0.001 + a = MODdata.Vh.a(t) + + 'PlossGB = fPlossGBfwd(Pkup, v, Gear) + 'Pe = fPvD(t, v, a) + PlossGB + fPlossDiffFwd(Pkup - PlossGB, Vist) + fPaG(v, a) + fPlossRt(v, Gear) + + PvD = fPvD(t, v, a) + Pe = PvD + fPlossGB(PvD, v, Gear) + fPlossDiff(PvD, v) + fPaG(v, a) + fPlossRt(v, Gear) + fPaux(t, nU) + fPaMot(t, Gear) + + Diff = Math.Abs(Pdrag - Pe) / VEH.Pnenn + + If Diff > eps Then + vVorz = -1 + ElseIf PvD < -eps Then + vVorz = 1 + Else + Return v + End If + + LastDiff = Math.Abs(Pdrag - Pe) / VEH.Pnenn + + Do While Diff > eps And Math.Abs(LastDiff - Diff) > eps + + If LastDiff < Diff Then + vVorz *= -1 + vstep *= 0.5 + + If vstep = 0 Then Exit Do + + End If + + v += vVorz * vstep + + a = 2 * (v - MODdata.Vh.V0(t)) / 1 'dt = 1[s] + + LastDiff = Diff + + PvD = fPvD(t, v, a) + Pe = PvD + fPlossGB(PvD, v, Gear) + fPlossDiff(PvD, v) + fPaG(v, a) + fPlossRt(v, Gear) + fPaux(t, nU) + fPaMot(t, Gear) + + Diff = Math.Abs(Pdrag - Pe) / VEH.Pnenn + + Loop + + Return v + + End Function + + #Region "Schaltmodelle" Private Function fStartGear(ByVal t As Integer) As Integer @@ -1831,6 +1911,22 @@ lb_nOK: End If + '*** Error-Msg-Check *** + 'Current rpm + nU = fnU(Vist, Gear, Clutch = tEngClutch.Slipping) + nn = (nU - VEH.nLeerl) / (VEH.nNenn - VEH.nLeerl) + 'Current power demand + Pe = Math.Min(fPeGearMod(Gear, t) * VEH.Pnenn, FLD.Pfull(nn)) + Pe = Math.Max(Pe, FLD.Pdrag(nn)) + 'Current torque demand + Md = Pe * 1000 / (nU * 2 * Math.PI / 60) + 'Clear old errors + MODdata.ModErrors.GSextrapol = "" + 'Check for errors + GBX.fGSnnDown(Md) + GBX.fGSnnUp(Md) + + 'If GearCorrection is OFF then return here If Not DEV.GearCorrection Then Return Gear @@ -3315,6 +3411,14 @@ lb20: Return CSng(((VEH.Mass + VEH.MassExtra + VEH.m_raeder_red + VEH.Loading) * a * v) * 0.001) End Function + Private Function fPaMot(ByVal t As Integer, ByVal Gear As Integer) As Single + If Nvorg Then + Return (VEH.I_mot * MODdata.dnUvorg(t) * 0.01096 * MODdata.nUvorg(t)) * 0.001 + Else + Return ((VEH.I_mot * (VEH.AchsI * VEH.Igetr(Gear) / (0.5 * VEH.Dreifen)) ^ 2) * aist * Vist) * 0.001 + End If + End Function + '----------------Slope resistance ---------------- Private Function fPs(ByVal v As Single, ByVal t As Integer) As Single fPs = CSng(((VEH.Loading + VEH.Mass + VEH.MassExtra) * 9.81 * MODdata.Vh.Grad(t) * 0.01 * v) * 0.001) diff --git a/VECTO/VECTO_Global.vb b/VECTO/VECTO_Global.vb index 39712d7eddabec29167359f27e564a8ab6048e45..04da4e5a0fd498ee669ed6b4f2ce32758e8d6765 100644 --- a/VECTO/VECTO_Global.vb +++ b/VECTO/VECTO_Global.vb @@ -2,7 +2,7 @@ Module VECTO_Global - Public Const VECTOvers As String = "1.1 beta 3" + Public Const VECTOvers As String = "1.1 beta 4" Public MyAppPath As String Public MyConfPath As String Public MyDeclPath As String diff --git a/VECTO/cDEV.vb b/VECTO/cDEV.vb index cdffccf3e4f156c89a7465dc02e6ef41d76c511e..8343fa0ff053226a08f0e55fe2663f985f1a3a57 100644 --- a/VECTO/cDEV.vb +++ b/VECTO/cDEV.vb @@ -13,6 +13,11 @@ Public Class cDEV Public TCnUstep As Single Public TCnUstepMin As Single + Public OverSpeedOn As Boolean + Public OverSpeed As Single + Public UnderSpeed As Single + Public EcoRollOn As Boolean + '************************************************************************************************************** '************************************************************************************************************** '********************************* Instructions for integrating new DEV-Options ********************************* @@ -115,10 +120,14 @@ Public Class cDEV Conf0.BoolVal = False MyOptions.Add("TestOptions", Conf0) + + Conf0 = New cDEVoption(tDEVconfType.tBoolean, "Gear Correcion (gear shift polygons model only!)", False) Conf0.BoolVal = False MyOptions.Add("GearCorrection", Conf0) + + Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "TC iteration: target precision for torque ratio") Conf0.SingleVal = 0.001 MyOptions.Add("TCiterPrec", Conf0) @@ -132,6 +141,23 @@ Public Class cDEV MyOptions.Add("TCnUstepMin", Conf0) + Conf0 = New cDEVoption(tDEVconfType.tBoolean, "OverSpeed", False) + Conf0.BoolVal = False + MyOptions.Add("OverSpeedOn", Conf0) + + Conf0 = New cDEVoption(tDEVconfType.tBoolean, "EcoRoll", False) + Conf0.BoolVal = False + MyOptions.Add("EcoRollOn", Conf0) + + Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "OverSpeed [km/h]") + Conf0.SingleVal = 10 + MyOptions.Add("OverSpeed", Conf0) + + Conf0 = New cDEVoption(tDEVconfType.tSingleVal, "UnderSpeed [km/h]") + Conf0.SingleVal = 10 + MyOptions.Add("UnderSpeed", Conf0) + + '**************************** END: Parameters Configuration '***************************** '***************************************************************************************** '***************************************************************************************** @@ -146,6 +172,11 @@ Public Class cDEV TCiterPrec = MyOptions("TCiterPrec").SingleVal TCnUstep = MyOptions("TCnUstep").SingleVal TCnUstepMin = MyOptions("TCnUstepMin").SingleVal + + OverSpeedOn = MyOptions("OverSpeedOn").BoolVal + OverSpeed = MyOptions("EcoRollOn").BoolVal + UnderSpeed = MyOptions("OverSpeed").SingleVal + EcoRollOn = MyOptions("UnderSpeed").SingleVal End Sub 'Demo for Delegate Function diff --git a/VECTO/cDelaunayMap.vb b/VECTO/cDelaunayMap.vb index 68ef5b03070199f77913b7ae7f3929f3888c16bd..136c66a5b95ce7292b36821351ae4176cdbd9281 100644 --- a/VECTO/cDelaunayMap.vb +++ b/VECTO/cDelaunayMap.vb @@ -48,14 +48,14 @@ Public Class cDelaunayMap - '#If DEBUG Then - ' Debug.Print("x,y,z,x,y,z") - ' For Each tr In lDT - ' Debug.Print(tr.P1.X & "," & tr.P1.Y & "," & tr.P1.Z & "," & tr.P2.X & "," & tr.P2.Y & "," & tr.P2.Z) - ' Debug.Print(tr.P3.X & "," & tr.P3.Y & "," & tr.P3.Z & "," & tr.P2.X & "," & tr.P2.Y & "," & tr.P2.Z) - ' Debug.Print(tr.P1.X & "," & tr.P1.Y & "," & tr.P1.Z & "," & tr.P3.X & "," & tr.P3.Y & "," & tr.P3.Z) - ' Next - '#End If +#If DEBUG Then + Debug.Print("x,y,z,x,y,z") + For Each tr In lDT + Debug.Print(tr.P1.X & "," & tr.P1.Y & "," & tr.P1.Z & "," & tr.P2.X & "," & tr.P2.Y & "," & tr.P2.Z) + Debug.Print(tr.P3.X & "," & tr.P3.Y & "," & tr.P3.Z & "," & tr.P2.X & "," & tr.P2.Y & "," & tr.P2.Z) + Debug.Print(tr.P1.X & "," & tr.P1.Y & "," & tr.P1.Z & "," & tr.P3.X & "," & tr.P3.Y & "," & tr.P3.Z) + Next +#End If @@ -100,8 +100,14 @@ Public Class cDelaunayMap Next 'ERROR: Extrapolation + +#If DEBUG Then + Debug.Print(x & "," & y) +#End If + Throw New ArgumentException("Extrapolation not possible!") + Return Nothing End Function @@ -210,7 +216,7 @@ Public Class cDelaunayMap v = (dot00 * dot12 - dot01 * dot02) * invDenom ' Check if point is in triangle - Return (u >= 0) And (v >= 0) And (u + v < 1) + Return (u >= 0) And (v >= 0) And (u + v <= 1) End Function