diff --git a/VECTO/GUI/F_GBX.vb b/VECTO/GUI/F_GBX.vb index b04334821a2c5e642a445aa816ea6f1b786c4dd4..979de2aaf95da094debb00748651207779a9fe70 100644 --- a/VECTO/GUI/F_GBX.vb +++ b/VECTO/GUI/F_GBX.vb @@ -202,7 +202,7 @@ Public Class F_GBX Me.TbName.Text = GBX0.ModelName Me.TbTracInt.Text = GBX0.TracIntrSi.ToString - Me.TBI_getr.Text = GBX0.I_Getriebe.ToString + Me.TBI_getr.Text = GBX0.GbxInertia.ToString Me.ChTCon.Checked = GBX0.TCon @@ -288,7 +288,7 @@ Public Class F_GBX If Trim(GBX0.ModelName) = "" Then GBX0.ModelName = "Undefined" GBX0.TracIntrSi = fTextboxToNumString(Me.TbTracInt.Text) - GBX0.I_Getriebe = fTextboxToNumString(Me.TBI_getr.Text) + GBX0.GbxInertia = fTextboxToNumString(Me.TBI_getr.Text) For i = 0 To Me.LvGears.Items.Count - 1 GBX0.IsTCgear.Add(Me.LvGears.Items(i).SubItems(1).Text = "on" And i > 0) diff --git a/VECTO/Input Files/cGBX.vb b/VECTO/Input Files/cGBX.vb index af6ea3f1ed60fd1b57f2fae128f509f3ed7a2bb1..c5e55a1b5b394e2195e3554badbeaacd2e056186 100644 --- a/VECTO/Input Files/cGBX.vb +++ b/VECTO/Input Files/cGBX.vb @@ -19,7 +19,7 @@ Public Class cGBX Private sFilePath As String Public ModelName As String - Public I_Getriebe As Single + Public GbxInertia As Single Public TracIntrSi As Single Public Igetr As List(Of Single) @@ -107,7 +107,7 @@ Public Class cGBX Private Sub SetDefault() ModelName = "" - I_Getriebe = 0 + GbxInertia = 0 TracIntrSi = 0 Igetr = New List(Of Single) @@ -158,7 +158,7 @@ Public Class cGBX dic.Add("ModelName", ModelName) - dic.Add("Inertia", I_Getriebe) + dic.Add("Inertia", GbxInertia) dic.Add("TracInt", TracIntrSi) ls = New List(Of Object) @@ -220,7 +220,7 @@ Public Class cGBX FileVersion = JSON.Content("Header")("FileVersion") ModelName = JSON.Content("Body")("ModelName") - I_Getriebe = JSON.Content("Body")("Inertia") + GbxInertia = JSON.Content("Body")("Inertia") TracIntrSi = JSON.Content("Body")("TracInt") i = -1 @@ -293,7 +293,7 @@ Public Class cGBX Return False End If - I_Getriebe = cDeclaration.GbInertia + GbxInertia = cDeclaration.GbInertia TracIntrSi = Declaration.TracInt(gs_Type) gs_SkipGears = Declaration.SkipGears(gs_Type) gs_ShiftTime = Declaration.ShiftTime(gs_Type) diff --git a/VECTO/MODcalc/cPower.vb b/VECTO/MODcalc/cPower.vb index 3acbb1e70c39b621924ceacb1d72dd8a1d9faeef..08a595caf6ea59d2eba17ef1500de29283364c14 100644 --- a/VECTO/MODcalc/cPower.vb +++ b/VECTO/MODcalc/cPower.vb @@ -1793,11 +1793,12 @@ lb_nOK: Dim nUup As Single Dim nUdown As Single Dim Tq As Single - Dim Pe As Single + Dim LastPe As Single Dim nUnext As Single Dim OutOfRpmRange As Boolean Dim PlusGearLockUp As Boolean Dim MinusGearTC As Boolean + Dim iRatio As Single 'First time step (for vehicles with TC always the first gear is used) If t = 0 Then Return fStartGear(0, Grad) @@ -1851,10 +1852,10 @@ lb_nOK: End If 'previous power demand - Pe = MODdata.Pe(t - 1) + LastPe = MODdata.Pe(t - 1) 'previous torque demand - Tq = Pe * 1000 / (nU * 2 * Math.PI / 60) + Tq = LastPe * 1000 / (nU * 2 * Math.PI / 60) 'Up/Downshift rpms nUup = GBX.Shiftpolygons(LastGear).fGSnUup(Tq) @@ -1862,16 +1863,19 @@ lb_nOK: 'Upshift If PlusGearLockUp Then - If nUnext > nUup AndAlso Pe <= FLD(LastGear + 1).Pfull(nUnext) Then + If nUnext > nUup AndAlso LastPe <= FLD(LastGear + 1).Pfull(nUnext) Then Return LastGear + 1 End If Else - 'TODO: 1C-to-2C - 'If LastGear < GBX.GearCount Then - ' If fnUout(Vist, LastGear + 1) > Math.Min(900, GBX.Igetr(LastGear + 1) / GBX.Igetr(LastGear) * FLD(LastGear).N95h - 150) AndAlso fPeGearModTC(LastGear + 1, t, Vist, aist, Grad) > 0.7 * (FLD(LastGear).Pfull(MODdata.nU(t - 1)) + MODdata.PaGB(t - 1) + MODdata.PlossGB(t - 1)) Then - ' Return LastGear + 1 - ' End If - 'End If + '1C-to-2C + If LastGear < GBX.GearCount Then + + iRatio = GBX.Igetr(LastGear + 1) / GBX.Igetr(LastGear) + + If fnUout(Vact, LastGear + 1) > Math.Min(900, iRatio * (FLD(LastGear).N95h - 150)) AndAlso FLD(LastGear + 1).Pfull(nU * iRatio, LastPe) > 0.7 * FLD(LastGear).Pfull(nU, LastPe) Then + Return LastGear + 1 + End If + End If End If @@ -2176,14 +2180,6 @@ lb10: End Function - Private Function fPeGearModTC(ByVal Gear As Integer, ByVal t As Integer, ByVal V As Single, ByVal a As Single, ByVal Grad As Single) As Single - - - 'TODO... - Return 0 - - End Function - Private Function fPeGearMod(ByVal Gear As Integer, ByVal t As Integer, ByVal Grad As Single) As Single Return fPeGearMod(Gear, t, MODdata.Vh.V(t), MODdata.Vh.a(t), Grad) End Function @@ -2354,7 +2350,7 @@ lb10: '----------------Gearbox inertia ---------------- Private Function fPaG(ByVal V As Single, ByVal a As Single) As Single Dim Mred As Single - Mred = GBX.I_Getriebe * (GBX.Igetr(0) / (VEH.rdyn / 1000)) ^ 2 + Mred = GBX.GbxInertia * (GBX.Igetr(0) / (VEH.rdyn / 1000)) ^ 2 Return (Mred * a * V) * 0.001 End Function