Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 97a9d01f authored by Raphael LUZ's avatar Raphael LUZ
Browse files

2.0.2-beta1

* AT/TC Update
+ Various smaller fixes
parent 813bb872
No related branches found
No related tags found
No related merge requests found
### VECTO x.x (current source)
* Alternative engine inertia power calculation (due to Torque converter calculation)
### VECTO 2.0.1-beta1-hotfix.VECTO-33
* Fixed VECTO-34
* Updated .vsum(.json)
* Added l/100km and CO2 results. (Fixed VECTO-33)
* Added FC-Final.
* Added Loading. (json)
* Added missing fuel parameters. (json)
* Updated README.md
### VECTO 2.0.1-beta1
* Updated Segment Table header
* Fixed Eco Roll (VECTO-30)
* Fixed Cycles in VECTO Editor being overwritten in Engineering Mode (VECTO-31)
### VECTO 2.0.1-beta0
* Update Notes > Release Notes
* Segment Table header
### VECTO 2.0
* Updated CSV file format. Now only one header with units included.
* Changed input file comment symbol form "c" to "#".
......
nue,mue,MP1000 (1000/rpm)^2*Nm
1.000,1.000,0.00
1.005,1.000,0.00
1.100,1.000,-40.34
1.222,1.000,-80.34
1.375,1.000,-136.11
1.571,1.000,-216.52
1.833,1.000,-335.19
2.200,1.000,-528.77
2.750,1.000,-883.40
4.400,1.000,-2462.17
11.000,1.000,-16540.98
......@@ -62,8 +62,10 @@ Public Class cGBX
Public TCnUin As Single
Public TC_PeBrake As Single
Public TCMout As Single
Public TCnout As Single
Public TCmustReduce As Boolean
Public TCnUout As Single
Public TCReduce As Boolean
Public TCNeutral As Boolean
Private TCnuMax As Single
Private MyFileList As List(Of String)
......@@ -169,7 +171,7 @@ Public Class cGBX
dic0.Add("TCactive", IsTCgear(i))
dic0.Add("ShiftPolygon", gs_files(i).PathOrDummy)
End If
ls.Add(dic0)
Next
dic.Add("Gears", ls)
......@@ -335,10 +337,12 @@ Public Class cGBX
Try
Do While Not file.EndOfFile
line = file.ReadLine
TCnu.Add(CSng(line(0)))
TCmu.Add(CSng(line(1)))
TCtorque.Add(CSng(line(2)))
TCdim += 1
If CSng(line(0)) < 1 Then
TCnu.Add(CSng(line(0)))
TCmu.Add(CSng(line(1)))
TCtorque.Add(CSng(line(2)))
TCdim += 1
End If
Loop
Catch ex As Exception
WorkerMsg(tMsgID.Err, "Error while reading Torque Converter file! (" & ex.Message & ")", MsgSrc)
......@@ -353,177 +357,226 @@ Public Class cGBX
Return False
End If
TCnuMax = TCnu(TCdim)
'Add default values for nu>1
If Not file.OpenRead(MyDeclPath & "DefaultTC.vtcc") Then
WorkerMsg(tMsgID.Err, "Default Torque Converter file not found!", MsgSrc)
Return False
End If
'Skip Header
file.ReadLine()
Try
Do While Not file.EndOfFile
line = file.ReadLine
TCnu.Add(CSng(line(0)))
TCmu.Add(CSng(line(1)))
TCtorque.Add(CSng(line(2)))
TCdim += 1
Loop
Catch ex As Exception
WorkerMsg(tMsgID.Err, "Error while reading Default Torque Converter file! (" & ex.Message & ")", MsgSrc)
Return False
End Try
file.Close()
Return True
End Function
Public Function TCiteration(ByVal Gear As Integer, ByVal nUout As Single, ByVal PeOut As Single, ByVal t As Integer) As Boolean
Public Function TCiterationV2(ByVal Gear As Integer, ByVal nUout As Single, ByVal PeOut As Single, ByVal t As Integer, Optional ByVal LastnU As Single? = Nothing, Optional ByVal LastPe As Single? = Nothing) As Boolean
Dim i As Integer
Dim iDim As Integer
Dim nUin As Single
Dim Mout As Single
Dim Min As Single
Dim VZ As Integer
Dim nUstep As Single
Dim lastErr As Single
Dim MinMax As Single
Dim nuStep As Single
Dim nuMin As Single
Dim nuMax As Single
Dim nu As Single
Dim mu As Single
Dim MoutCalc As Single
Dim nUup As Single
Dim nUdown As Single
Dim Paux As Single
Dim PaMot As Single
Dim Pfull As Single
Dim PinMax As Single
Dim nuList As New List(Of Single)
Dim McalcRatio As New List(Of Single)
Dim McalcRatMax As Single
Dim ErrMin As Single
Dim iMin As Integer
Dim Brake As Boolean
Dim FirstDone As Boolean
Dim MsgSrc As String
MsgSrc = "GBX/TCiteration/t= " & t
TC_PeBrake = 0
TCmustReduce = False
TCReduce = False
nuStep = 0.001
Brake = False
TCNeutral = False
'Dim nUmin As Single
'Dim nUmax As Single
'Power to torque
Mout = nPeToM(nUout, PeOut)
'rpm-limits
'nUmin = nnormTonU(GBX.fGSnnDown(Mout))
'nUmax = nnormTonU(GBX.fGSnnUp(Mout))
'Start values: Estimate torque converter state
'nUin = Math.Min(VEH.nNenn, nUout * 2)
If t = 0 Then
nUin = nUout
Else
nUin = MODdata.nU(t - 1)
End If
'Set nu boundaries
nuMin = Math.Max(nUout / ENG.Nrated, TCnu(0))
nuMax = Math.Min(TCnuMax, nUout / ENG.Nidle)
'If nUin > nUmax Then nUin = nUmax
'If nUin < nUmin Then nUin = nUmin
If Mout < 0 Then
nu = nUout / nUin
If nu > TCnu(TCdim) Then
nu = TCnu(TCdim)
nUin = nUout / nu
ElseIf nu < TCnu(0) Then
nu = TCnu(0)
nUin = nUout / nu
End If
mu = fTCmu(nu)
MoutCalc = fTCtorque(nu, nUin) * mu
'Speed too low in motoring(check if nu=1 allows enough engine speed)
If nUout < ENG.Nidle Then
TCNeutral = True
Return True
End If
nUstep = DEV.TCnUstep
nu = 1
If MoutCalc > Mout Then
VZ = -1
Else
VZ = 1
nu = nuMin
End If
FirstDone = False
nu -= nuStep
iDim = -1
Do While nu + nuStep <= nuMax
'nu
nu += nuStep
lastErr = 99999
'Iteration
Do While Math.Abs(1 - MoutCalc / Mout) > DEV.TCiterPrec And nUstep > DEV.TCnUstepMin
nUin += VZ * nUstep
nu = nUout / nUin
If nu > TCnu(TCdim) Or nu < TCnu(0) Then
nUin -= VZ * nUstep
nUstep /= 2
VZ *= -1
Continue Do
End If
'Abort if nu<=0
If nu <= 0 Then Continue Do
'mu
mu = fTCmu(nu)
Min = Mout / mu
'Up/Downshift rpms
nUup = GBX.Shiftpolygons(Gear).fGSnUup(Min)
nUdown = GBX.Shiftpolygons(Gear).fGSnUdown(Min)
'If nUin > 1.05 * nUup - 0.0001 Then
If nUin > ENG.Nrated - 0.0001 Then
'nUin = 1.05 * nUup
nUin = ENG.Nrated
nUstep /= 2
VZ *= -1
Continue Do
ElseIf nUin < 0.95 * nUdown + 0.0001 Then
nUin = 0.95 * nUdown
nUstep /= 2
VZ *= -1
Continue Do
End If
'Abort if mu<=0
If mu <= 0 Then Continue Do
'nIn
nUin = nUout / nu
MoutCalc = fTCtorque(nu, nUin) * mu
If Math.Abs(1 - MoutCalc / Mout) > lastErr Then
nUstep /= 2
VZ *= -1
'MinMax
Paux = MODdata.Px.fPaux(t, Math.Max(nUin, ENG.Nidle))
If LastnU Is Nothing Then
PaMot = 0
Else
PaMot = (ENG.I_mot * (nUin - LastnU) * 0.01096 * nUin) * 0.001
End If
lastErr = Math.Abs(1 - MoutCalc / Mout)
Loop
'Calc nu again because nUin might have changed
nu = nUout / nUin
If nUin < ENG.Nidle Then
If LastPe Is Nothing Then
Pfull = FLD(Gear).Pfull(nUin)
Else
Pfull = FLD(Gear).Pfull(nUin, LastPe)
End If
PinMax = 0.999 * (Pfull - Paux - PaMot)
MinMax = nPeToM(nUin, PinMax)
MODdata.ModErrors.TCextrapol = ""
'Min
Min = Mout / mu
nUin = ENG.Nidle
nu = nUout / nUin
'Correct Min if too high
If Min > MinMax Then Continue Do
If nu > TCnu(TCdim) Then
nu = TCnu(TCdim)
nUin = nUout / nu
ElseIf nu < TCnu(0) Then
'Calculated output torque for given mu
MoutCalc = fTCtorque(nu, nUin) * mu
WorkerMsg(tMsgID.Err, "Torque converter creeping not possible with current TC characteristics!", MsgSrc)
Return False
'Add to lists
nuList.Add(nu)
McalcRatio.Add(MoutCalc / Mout)
iDim += 1
'nu = TCnu(0)
'nUin = nUout / nu
'Calc smallest error for each mu value
If FirstDone Then
If Math.Abs(1 - McalcRatio(i)) < ErrMin Then
ErrMin = Math.Abs(1 - McalcRatio(i))
iMin = i
End If
If McalcRatio(i) > McalcRatMax Then McalcRatMax = McalcRatio(i)
Else
FirstDone = True
ErrMin = Math.Abs(1 - McalcRatio(i))
iMin = i
McalcRatMax = McalcRatio(i)
End If
mu = fTCmu(nu)
MoutCalc = fTCtorque(nu, nUin) * mu
End If
'Abort if error is small enough
If ErrMin <= DEV.TCiterPrec Then Exit Do
Loop
If iDim = -1 Then
TCReduce = True
Return True
End If
If Math.Abs(1 - MoutCalc / Mout) > DEV.TCiterPrec Then
If ErrMin > DEV.TCiterPrec Then
If MoutCalc < Mout Then
If McalcRatMax >= 1 Then
'Creeping...
FirstDone = False
For i = 0 To iDim
If McalcRatio(i) > 1 Then
If FirstDone Then
If Math.Abs(1 - McalcRatio(i)) < ErrMin Then
ErrMin = Math.Abs(1 - McalcRatio(i))
iMin = i
End If
Else
FirstDone = True
ErrMin = Math.Abs(1 - McalcRatio(i))
iMin = i
End If
End If
Next
If MoutCalc > 0 Then TCmustReduce = True
Brake = True
Else
TC_PeBrake = nMtoPe(nUout, Mout - MoutCalc)
If MoutCalc > 0 Then
TCReduce = True
Return True
End If
End If
End If
TCMin = MoutCalc / mu
TCnUin = nUin
nu = nuList(iMin)
mu = fTCmu(nu)
TCnUin = nUout / nu
TCMout = fTCtorque(nu, TCnUin) * mu
TCMin = TCMout / mu
TCnUout = nUout
If Brake Then TC_PeBrake = nMtoPe(TCnUout, Mout - TCMout)
TCMout = MoutCalc
TCnout = nUout
Return True
End Function
Private Function fTCmu(ByVal nu As Single) As Single
Dim i As Int32
......
......@@ -498,7 +498,7 @@ Public Class cVECTO
Catch ex As Exception
file.Close()
WorkerMsg(tMsgID.Err, "Error in .vacc file. " & ex.Message & " (" & stDesMaxFile.FullPath & ")", MsgSrc)
WorkerMsg(tMsgID.Err, "Error in .vacc file. " & ex.Message & " (" & stDesMaxFile.FullPath & ")", MsgSrc, stDesMaxFile.FullPath)
Return False
End Try
......
......@@ -494,6 +494,11 @@ Public Class cVEH
Return False
End If
If rdyn <= 0 Then
WorkerMsg(tMsgID.Err, "rdyn is invalid!", MsgSrc, "<GUI>" & sFilePath)
Return False
End If
RRC = 0
m_red0 = 0
For Each a0 In Axles
......
......@@ -15,7 +15,6 @@ Public Class cMOD
Public Pe As List(Of Single)
Public nU As List(Of Single)
Public nUvorg As List(Of Single)
Public dnUvorg As List(Of Single)
Public tDim As Integer
Public tDimOgl As Integer
Public Px As cPower
......@@ -167,7 +166,6 @@ Public Class cMOD
If DRI.Nvorg Then
nUvorg.Insert(t, nUvorg(t))
dnUvorg.Insert(t, dnUvorg(t))
End If
If DRI.AuxDef Then
......@@ -183,7 +181,6 @@ Public Class cMOD
If DRI.Nvorg Then
nUvorg.RemoveAt(t)
dnUvorg.RemoveAt(t)
End If
If DRI.AuxDef Then
......@@ -224,7 +221,6 @@ Public Class cMOD
If DRI.Nvorg Then
MODdata.nUvorg = New List(Of Single)
MODdata.dnUvorg = New List(Of Single)
L = DRI.Values(tDriComp.nU)
......@@ -233,11 +229,6 @@ Public Class cMOD
MODdata.nUvorg.Add(((L(s + 1) + L(s)) / 2))
Next
'Angular acceleration
For s = 0 To tDim
MODdata.dnUvorg.Add(L(s + 1) - L(s))
Next
End If
'Specify average Aux and Aux-lists, when Aux present in DRI and VEH
......@@ -282,7 +273,6 @@ Public Class cMOD
If DRI.Nvorg Then
MODdata.nUvorg = New List(Of Single)
MODdata.dnUvorg = New List(Of Single)
L = DRI.Values(tDriComp.nU)
......@@ -291,13 +281,6 @@ Public Class cMOD
MODdata.nUvorg.Add(L(s))
Next
'Angular acceleration
MODdata.dnUvorg.Add(L(1) - L(0))
For s = 1 To MODdata.tDim - 1
MODdata.dnUvorg.Add((L(s + 1) - L(s - 1)) / 2)
Next
MODdata.dnUvorg.Add(L(MODdata.tDim) - L(MODdata.tDim - 1))
End If
End Sub
......
......@@ -75,6 +75,7 @@ Public Class cPower
Dim ProgBarShare As Int16
Dim ProgBarLACpart As Int16
Dim dist As New List(Of Double)
Dim LastnU As Single = 0
Dim MsgSrc As String
......@@ -178,22 +179,36 @@ Public Class cPower
'Gear
If VehState0 = tVehState.Stopped Then
Gear = 0
'Engine Speed
If Nvorg Then
nU = MODdata.nUvorg(i)
Else
nU = ENG.Nidle
End If
Else
If Gvorg Then
Gear = Math.Min(Vh.GearVorg(i), GBX.GearCount)
Else
Gear = fFastGearCalc(Vist, Pwheel)
End If
'Engine Speed
If Nvorg Then
nU = MODdata.nUvorg(i)
Else
nU = fnU(Vist, Gear, False)
End If
End If
'Engine Speed
'ICE-inertia
If Nvorg Then
nU = MODdata.nUvorg(i)
PaMot = (ENG.I_mot * MODdata.dnUvorg(i) * 0.01096 * MODdata.nUvorg(i)) * 0.001
If i = 0 Then
PaMot = 0
Else
nU = fnU(Vist, Gear, False)
PaMot = ((ENG.I_mot * (GBX.Igetr(0) * GBX.Igetr(Gear) / (VEH.rdyn / 1000)) ^ 2) * aist * Vist) * 0.001
PaMot = (ENG.I_mot * (nU - LastnU) * 0.01096 * nU) * 0.001
End If
'Aux Demand
......@@ -310,6 +325,7 @@ Public Class cPower
End If
LastnU = nU
Gears.Add(Gear)
......@@ -639,15 +655,6 @@ lbGschw:
'Eco-Roll Speed Correction (because PreRun speed profile might still be too high or speed might generally be too low)
If Vh.EcoRoll(jz) AndAlso Vist > MODdata.Vh.Vsoll(jz) - VEC.UnderSpeed / 3.6 AndAlso Not VehState0 = tVehState.Stopped AndAlso Pplus Then
' If Declaration.CurrentMission.MissionID = tMission.RegionalDelivery And Declaration.CurrentLoading = tLoading.FullLoaded Then Stop
Vh.ReduceSpeed(jz, 0.9999)
FirstSecItar = False
GoTo lbGschw
......@@ -851,12 +858,25 @@ lbCheck:
PaGetr = fPaG(Vist, aist)
Pkup = Pwheel + PlossGB + PlossDiff + PaGetr + PlossRt
If Not GBX.TCiteration(Gear, fnUout(Vist, Gear), Pkup, jz) Then
WorkerMsg(tMsgID.Err, "TC Iteration failed!", MsgSrc & "/t= " & jz + 1)
Return False
If jz = 0 Then
If Not GBX.TCiterationV2(Gear, fnUout(Vist, Gear), Pkup, jz) Then
WorkerMsg(tMsgID.Err, "TC Iteration failed!", MsgSrc & "/t= " & jz + 1)
Return False
End If
Else
If Not GBX.TCiterationV2(Gear, fnUout(Vist, Gear), Pkup, jz, MODdata.nU(jz - 1), MODdata.Pe(jz - 1)) Then
WorkerMsg(tMsgID.Err, "TC Iteration failed!", MsgSrc & "/t= " & jz + 1)
Return False
End If
End If
If GBX.TCmustReduce Then
If GBX.TCNeutral Then
Gear = 0
Clutch = tEngClutch.Opened
GoTo lbCheck
End If
If GBX.TCReduce Then
Vh.ReduceSpeed(jz, 0.999)
FirstSecItar = False
GoTo lbGschw
......@@ -870,8 +890,8 @@ lbCheck:
'*** Start: Revolutions Check
'Check whether Revolutions too high! => Upshift
Do While nU > 1.2 * (ENG.Nrated - ENG.Nidle) + ENG.Nidle And Gear < GBX.GearCount
'Check whether Revolutions too high! => Speed Reduction
Do While nU > 1.2 * (ENG.Nrated - ENG.Nidle) + ENG.Nidle
Gear += 1
nU = fnU(Vist, Gear, Clutch = tEngClutch.Slipping)
Loop
......@@ -901,21 +921,15 @@ lb_nOK:
Paux = fPaux(jz, Math.Max(nU, ENG.Nidle))
'ICE-inertia
If Clutch = tEngClutch.Opened Then
If jz = 0 Then
PaMot = 0
Else
'Not optimal since jz-1 to jz not the right interval
PaMot = (ENG.I_mot * (nU - MODdata.nU(jz - 1)) * 0.01096 * nU) * 0.001
End If
If jz = 0 Then
PaMot = 0
Else
If Nvorg Then
PaMot = (ENG.I_mot * MODdata.dnUvorg(jz) * 0.01096 * MODdata.nUvorg(jz)) * 0.001
Else
PaMot = ((ENG.I_mot * (GBX.Igetr(0) * GBX.Igetr(Gear) / (VEH.rdyn / 1000)) ^ 2) * aist * Vist) * 0.001
End If
'Not optimal since jz-1 to jz not the right interval
PaMot = (ENG.I_mot * (nU - MODdata.nU(jz - 1)) * 0.01096 * nU) * 0.001
End If
'Total Engine-power
' => Pantr
' => P
......@@ -1202,7 +1216,7 @@ lb_nOK:
If nU = 0 Then
MODdata.TCnu.Add(0)
Else
MODdata.TCnu.Add(GBX.TCnout / nU)
MODdata.TCnu.Add(GBX.TCnUout / nU)
End If
If GBX.TCMin = 0 Then
MODdata.TCmu.Add(0)
......@@ -1210,7 +1224,7 @@ lb_nOK:
MODdata.TCmu.Add(GBX.TCMout / GBX.TCMin)
End If
MODdata.TCMout.Add(GBX.TCMout)
MODdata.TCnOut.Add(GBX.TCnout)
MODdata.TCnOut.Add(GBX.TCnUout)
Else
If Clutch = tEngClutch.Opened Then
MODdata.TCnu.Add(0)
......@@ -1568,7 +1582,7 @@ lb_nOK:
PvD = fPwheel(t, v, a, Grad)
Pe = PvD + fPlossGB(PvD, v, Gear, True) + fPlossDiff(PvD, v, True) + fPaG(v, a) + fPlossRt(v, Gear) + fPaux(t, nU) + fPaMot(t, Gear, v, a)
Pe = PvD + fPlossGB(PvD, v, Gear, True) + fPlossDiff(PvD, v, True) + fPaG(v, a) + fPlossRt(v, Gear) + fPaux(t, nU) + fPaMotSimple(t, Gear, v, a)
Diff = Math.Abs(Pdrag - Pe)
......@@ -1604,7 +1618,7 @@ lb_nOK:
LastDiff = Diff
PvD = fPwheel(t, v, a, Grad)
Pe = PvD + fPlossGB(PvD, v, Gear, True) + fPlossDiff(PvD, v, True) + fPaG(v, a) + fPlossRt(v, Gear) + fPaux(t, nU) + fPaMot(t, Gear, v, a)
Pe = PvD + fPlossGB(PvD, v, Gear, True) + fPlossDiff(PvD, v, True) + fPaG(v, a) + fPlossRt(v, Gear) + fPaux(t, nU) + fPaMotSimple(t, Gear, v, a)
Diff = Math.Abs(Pdrag - Pe)
......@@ -1614,7 +1628,6 @@ lb_nOK:
End Function
Private Function fCoastingSpeed(ByVal t As Integer, ByVal s As Double, ByVal Gear As Integer, ByVal dt As Integer) As Single
Dim a As Single
Dim v As Single
......@@ -1691,6 +1704,8 @@ lb_nOK:
MsgSrc = "StartGear"
If GBX.TCon Then Return 1
If t = 0 AndAlso VehState0 <> tVehState.Stopped Then
'Calculate gear when cycle starts with speed > 0
......@@ -1769,9 +1784,12 @@ lb_nOK:
Dim nUdown As Single
Dim Md As Single
Dim Pe As Single
Dim nUnext As Single
Dim OutOfRpmRange As Boolean
Dim PlusGearLockUp As Boolean
Dim MinusGearTC As Boolean
'First time step OR first time step after stand still
'First time step (for vehicles with TC always the first gear is used)
If t = 0 Then Return fStartGear(0, Grad)
If MODdata.VehState(t - 1) = tVehState.Stopped Then Return 1
......@@ -1787,17 +1805,39 @@ lb_nOK:
'If idling (but no vehicle stop...?) then
If LastGear = 0 Then Return 1
'If lockup-clutch already closed then goto normal shift model
If Not GBX.IsTCgear(LastGear) Then Return fGearVECTO(t, Grad)
If LastGear < GBX.GearCount Then
PlusGearLockUp = Not GBX.IsTCgear(LastGear + 1)
Else
PlusGearLockUp = False
End If
If LastGear > 1 Then
MinusGearTC = GBX.IsTCgear(LastGear - 1)
Else
MinusGearTC = False
End If
'Rpm
nU = MODdata.nU(t - 1)
OutOfRpmRange = (nU >= 1.2 * (ENG.Nrated - ENG.Nidle) + ENG.Nidle Or nU < ENG.Nidle)
If LastGear < GBX.GearCount AndAlso Not GBX.IsTCgear(LastGear + 1) Then
nUnext = Vist * 60.0 * GBX.Igetr(0) * GBX.Igetr(LastGear + 1) / (2 * VEH.rdyn * Math.PI / 1000)
Else
nUnext = 0
End If
'No gear change 3s after last one -except rpm out of range
If Not OutOfRpmRange AndAlso t - LastGearChange <= GBX.gs_ShiftTime And t > GBX.gs_ShiftTime - 1 Then Return LastGear
OutOfRpmRange = (nU >= 1.2 * (ENG.Nrated - ENG.Nidle) + ENG.Nidle)
If MinusGearTC Then
If Vist * 60.0 * GBX.Igetr(0) * GBX.Igetr(LastGear) / (2 * VEH.rdyn * Math.PI / 1000) <= ENG.Nidle Then
Return LastGear - 1
End If
End If
'No gear change 3s after last one -except rpm out of range
If Not PlusGearLockUp Then
If Not OutOfRpmRange AndAlso t - LastGearChange <= GBX.gs_ShiftTime And t > GBX.gs_ShiftTime - 1 Then Return LastGear
End If
'previous power demand
......@@ -1810,21 +1850,31 @@ lb_nOK:
nUup = GBX.Shiftpolygons(LastGear).fGSnUup(Md)
nUdown = GBX.Shiftpolygons(LastGear).fGSnUdown(Md)
If nU > nUup Then
If fnn(Vist, LastGear + 1, False) > nUdown Then
'Upshift
If PlusGearLockUp Then
If nUnext > nUup AndAlso Pe <= FLD(LastGear + 1).Pfull(nUnext) Then
Return LastGear + 1
Else
Return LastGear
End If
Else
'TODO: 1C > 2C
End If
ElseIf nU < nUdown Then
Return LastGear - 1
'Downshift
If MinusGearTC Then
If nU < ENG.Nidle Then
Return LastGear - 1
End If
Else
Return LastGear
If nU < nUdown Then
Return LastGear - 1
End If
End If
Return LastGear
End Function
Private Function fGearVECTO(ByVal t As Integer, ByVal Grad As Single) As Integer
......@@ -2096,12 +2146,14 @@ lb10:
nU = fnU(V, Gear, False)
If Nvorg Then
'Drehzahlvorgabe
PaM = (ENG.I_mot * MODdata.dnUvorg(t) * 0.01096 * MODdata.nUvorg(t)) * 0.001
If t = 0 Then
PaM = 0
Else
PaM = ((ENG.I_mot * (GBX.Igetr(0) * GBX.Igetr(Gear) / (VEH.rdyn / 1000)) ^ 2) * a * V) * 0.001
PaM = (ENG.I_mot * (nU - MODdata.nU(t - 1)) * 0.01096 * nU) * 0.001
End If
If Clutch = tEngClutch.Closed Then
Return (PvD + fPlossGB(PvD, V, Gear, True) + fPlossDiff(PvD, V, True) + fPaG(V, a) + fPaux(t, nU) + PaM)
Else 'Clutch = tEngClutch.Slipping
......@@ -2188,12 +2240,8 @@ lb10:
Return CSng(((VEH.Mass + VEH.MassExtra + VEH.m_red + VEH.Loading) * a * v) * 0.001)
End Function
Private Function fPaMot(ByVal t As Integer, ByVal Gear As Integer, ByVal v As Single, ByVal a As Single) As Single
If Nvorg Then
Return (ENG.I_mot * MODdata.dnUvorg(t) * 0.01096 * MODdata.nUvorg(t)) * 0.001
Else
Return ((ENG.I_mot * (GBX.Igetr(0) * GBX.Igetr(Gear) / (VEH.rdyn / 1000)) ^ 2) * a * v) * 0.001
End If
Private Function fPaMotSimple(ByVal t As Integer, ByVal Gear As Integer, ByVal v As Single, ByVal a As Single) As Single
Return ((ENG.I_mot * (GBX.Igetr(0) * GBX.Igetr(Gear) / (VEH.rdyn / 1000)) ^ 2) * a * v) * 0.001
End Function
'----------------Slope resistance ----------------
......@@ -2202,7 +2250,7 @@ lb10:
End Function
'----------------Ancillaries(Nebenaggregate) ----------------
Private Function fPaux(ByVal t As Integer, ByVal nU As Single) As Single
Public Function fPaux(ByVal t As Integer, ByVal nU As Single) As Single
Return CSng(MODdata.Vh.Padd(t) + VEC.PauxSum(t, nU))
End Function
......
......@@ -12,7 +12,7 @@ Imports System.Collections.Generic
Module VECTO_Global
Public Const VECTOvers As String = "2.0.1-beta1-hotfix.VECTO-33"
Public Const VECTOvers As String = "2.0.2-beta1"
Public Const LicSigAppCode As String = "VECTO-Release-0093C61E0A2E4BFA9A7ED7E729C56AE4"
Public MyAppPath As String
Public MyConfPath As String
......
......@@ -598,7 +598,7 @@ Class cVSUM
MAP0.FilePath = ENG0.PathMAP
Try
If Not MAP0.ReadFile(False) Then Return False 'Fehlermeldungen werden auch bei "MsgOutput = False" ausgegeben
If Not MAP0.ReadFile(True) Then Return False
Catch ex As Exception
WorkerMsg(tMsgID.Err, "File read error! (" & ENG0.PathMAP & ")", MsgSrc)
Return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment