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 d81dfc05 authored by Raphael LUZ's avatar Raphael LUZ
Browse files

Merge branch 'Pwheel_Input'

- Pwheel driving cycle input implemented
- FC [g/h] are always saved in output, not only in Engine Only mode
parents af4688ff 9aa326d9
Branches
Tags
No related merge requests found
...@@ -58,6 +58,9 @@ Public Class cDRI ...@@ -58,6 +58,9 @@ Public Class cDRI
''' <remarks></remarks> ''' <remarks></remarks>
Public Pvorg As Boolean Public Pvorg As Boolean
Public PwheelVorg As Boolean
''' <summary> ''' <summary>
''' True= Cycle includes additional auxiliary power demand (not to be confused with auxiliary supply power). Defined in ReadFile. ''' True= Cycle includes additional auxiliary power demand (not to be confused with auxiliary supply power). Defined in ReadFile.
''' </summary> ''' </summary>
...@@ -125,6 +128,7 @@ Public Class cDRI ...@@ -125,6 +128,7 @@ Public Class cDRI
Nvorg = False Nvorg = False
Gvorg = False Gvorg = False
Pvorg = False Pvorg = False
PwheelVorg = False
tDim = -1 tDim = -1
t0 = 1 'Default if no time steps are defined in driving cycle t0 = 1 'Default if no time steps are defined in driving cycle
AuxDef = False AuxDef = False
...@@ -196,6 +200,7 @@ Public Class cDRI ...@@ -196,6 +200,7 @@ Public Class cDRI
DRIcheck.Add(tDriComp.s, False) DRIcheck.Add(tDriComp.s, False)
DRIcheck.Add(tDriComp.StopTime, False) DRIcheck.Add(tDriComp.StopTime, False)
DRIcheck.Add(tDriComp.Torque, False) DRIcheck.Add(tDriComp.Torque, False)
DRIcheck.Add(tDriComp.Pwheel, False)
If file.EndOfFile Then If file.EndOfFile Then
WorkerMsg(tMsgID.Err, "Driving cycle invalid!", MsgSrc) WorkerMsg(tMsgID.Err, "Driving cycle invalid!", MsgSrc)
...@@ -276,6 +281,7 @@ Public Class cDRI ...@@ -276,6 +281,7 @@ Public Class cDRI
GradVorg = DRIcheck(tDriComp.Grad) GradVorg = DRIcheck(tDriComp.Grad)
VairVorg = DRIcheck(tDriComp.VairVres) And DRIcheck(tDriComp.VairBeta) VairVorg = DRIcheck(tDriComp.VairVres) And DRIcheck(tDriComp.VairBeta)
Mvorg = DRIcheck(tDriComp.Torque) Mvorg = DRIcheck(tDriComp.Torque)
PwheelVorg = DRIcheck(tDriComp.Pwheel)
If Mvorg And Pvorg Then If Mvorg And Pvorg Then
WorkerMsg(tMsgID.Warn, "Engine torque and power defined in cycle! Torque will be ignored!", MsgSrc) WorkerMsg(tMsgID.Warn, "Engine torque and power defined in cycle! Torque will be ignored!", MsgSrc)
......
...@@ -618,6 +618,8 @@ Public Class cMOD ...@@ -618,6 +618,8 @@ Public Class cMOD
If Not VEC.EngOnly Then If Not VEC.EngOnly Then
If DRI.Vvorg Then
'distance 'distance
dist += .Vh.V(t) dist += .Vh.V(t)
s.Append(Sepp & dist) s.Append(Sepp & dist)
...@@ -631,6 +633,23 @@ Public Class cMOD ...@@ -631,6 +633,23 @@ Public Class cMOD
'Acc. 'Acc.
s.Append(Sepp & .Vh.a(t)) s.Append(Sepp & .Vh.a(t))
Else
'distance
s.Append(Sepp & "-")
'Actual-speed.
s.Append(Sepp & "-")
'Target-speed
s.Append(Sepp & "-")
'Acc.
s.Append(Sepp & "-")
End If
'Slope 'Slope
s.Append(Sepp & .Grad(t)) s.Append(Sepp & .Grad(t))
......
...@@ -45,6 +45,9 @@ Public Class cPower ...@@ -45,6 +45,9 @@ Public Class cPower
Private EngSideInertia As Single Private EngSideInertia As Single
Private PwheelVorg As Boolean
Public Function PreRun() As Boolean Public Function PreRun() As Boolean
Dim i As Integer Dim i As Integer
Dim i0 As Integer Dim i0 As Integer
...@@ -494,11 +497,13 @@ Public Class cPower ...@@ -494,11 +497,13 @@ Public Class cPower
MsgSrc = "Power/Calc" MsgSrc = "Power/Calc"
'Abort if no speed given 'Abort if no speed given
If Not DRI.Vvorg Then If Not DRI.Vvorg And Not (DRI.PwheelVorg And DRI.Nvorg And DRI.Gvorg) Then
WorkerMsg(tMsgID.Err, "Driving cycle is not valid! Vehicle Speed required.", MsgSrc) WorkerMsg(tMsgID.Err, "Driving cycle is not valid! Vehicle Speed required or Pwheel + Gear + Engine Speed.", MsgSrc)
Return False Return False
End If End If
PwheelVorg = DRI.PwheelVorg
'Messages 'Messages
If Not Cfg.DistCorr Then WorkerMsg(tMsgID.Warn, "Distance Correction is disabled!", MsgSrc) If Not Cfg.DistCorr Then WorkerMsg(tMsgID.Warn, "Distance Correction is disabled!", MsgSrc)
...@@ -572,7 +577,7 @@ Public Class cPower ...@@ -572,7 +577,7 @@ Public Class cPower
FirstSecItar = True FirstSecItar = True
'Secondary Progressbar 'Secondary Progressbar
ProgBarCtrl.ProgJobInt = CInt((100 / ProgBarShare) * jz / MODdata.tDim + (100 - 100 / ProgBarShare)) ProgBarCtrl.ProgJobInt = CInt((100 / ProgBarShare) * (jz + 1) / (MODdata.tDim + 1) + (100 - 100 / ProgBarShare))
' Determine State ' Determine State
...@@ -583,8 +588,11 @@ lbGschw: ...@@ -583,8 +588,11 @@ lbGschw:
'Calculate Speed​/Acceleration ------------------- 'Calculate Speed​/Acceleration -------------------
'Now through DRI-class 'Now through DRI-class
If Not PwheelVorg Then
Vact = Vh.V(jz) Vact = Vh.V(jz)
aact = Vh.a(jz) aact = Vh.a(jz)
End If
'distance 'distance
dist = dist0 + Vact dist = dist0 + Vact
...@@ -642,10 +650,23 @@ lbGschw: ...@@ -642,10 +650,23 @@ lbGschw:
End If End If
'--------------- '---------------
'Power demand at wheels
Pwheel = fPwheel(jz, Vh.fGrad(dist))
'Determine Driving-state ------------------------- 'Determine Driving-state -------------------------
Pplus = False Pplus = False
Pminus = False Pminus = False
If PwheelVorg Then
Select Case Pwheel
Case Is > 0.0001
VehState0 = tVehState.Acc
Case Is < -0.0001
VehState0 = tVehState.Dec
Case Else
VehState0 = tVehState.Stopped
End Select
Else
If Vact < 0.0001 Then If Vact < 0.0001 Then
VehState0 = tVehState.Stopped VehState0 = tVehState.Stopped
Else Else
...@@ -658,7 +679,8 @@ lbGschw: ...@@ -658,7 +679,8 @@ lbGschw:
End If End If
End If End If
Pwheel = fPwheel(jz, Vh.fGrad(dist)) End If
Select Case Pwheel Select Case Pwheel
Case Is > 0.0001 Case Is > 0.0001
...@@ -699,7 +721,7 @@ lbGschw: ...@@ -699,7 +721,7 @@ lbGschw:
Else Else
'Check whether Clutch will slip (important for Gear-shifting model): 'Check whether Clutch will slip (important for Gear-shifting model):
If Not GBX.TCon AndAlso fnn(Vact, 1, False) < ClutchNorm And Pplus Then If Not GBX.TCon AndAlso fnn(Vact, 1, False) < ClutchNorm And Pplus And Not PwheelVorg Then
Clutch = tEngClutch.Slipping Clutch = tEngClutch.Slipping
Else Else
Clutch = tEngClutch.Closed Clutch = tEngClutch.Closed
...@@ -737,7 +759,7 @@ lbGschw: ...@@ -737,7 +759,7 @@ lbGschw:
Else Else
If Not GBX.TCon AndAlso fnn(Vact, Gear, False) < ClutchNorm And Pplus And Not VehState0 = tVehState.Dec Then If Not GBX.TCon AndAlso fnn(Vact, Gear, False) < ClutchNorm And Pplus And Not VehState0 = tVehState.Dec And Not PwheelVorg Then
Clutch = tEngClutch.Slipping Clutch = tEngClutch.Slipping
Else Else
Clutch = tEngClutch.Closed Clutch = tEngClutch.Closed
...@@ -747,6 +769,12 @@ lbGschw: ...@@ -747,6 +769,12 @@ lbGschw:
End If End If
If PwheelVorg Then
nU = MODdata.nUvorg(jz)
Vact = fV(nU, Gear)
End If
If Gear = -1 Then If Gear = -1 Then
WorkerMsg(tMsgID.Err, "Error in Gear Shift Model!", MsgSrc & "/t= " & jz + 1) WorkerMsg(tMsgID.Err, "Error in Gear Shift Model!", MsgSrc & "/t= " & jz + 1)
Return False Return False
...@@ -1135,7 +1163,10 @@ lb_nOK: ...@@ -1135,7 +1163,10 @@ lb_nOK:
'Check whether P above Full-load => Reduce Speed 'Check whether P above Full-load => Reduce Speed
If P > Pmax Then If P > Pmax Then
If EngState0 = tEngState.Load Or EngState0 = tEngState.FullLoad Then If EngState0 = tEngState.Load Or EngState0 = tEngState.FullLoad Then
If Vact > 0.01 Then If PwheelVorg Then
MODdata.Vh.Pwheel(jz) *= 0.999
GoTo lbGschw
ElseIf Vact > 0.01 Then
Vh.ReduceSpeed(jz, 0.9999) Vh.ReduceSpeed(jz, 0.9999)
FirstSecItar = False FirstSecItar = False
GoTo lbGschw GoTo lbGschw
...@@ -1144,6 +1175,7 @@ lb_nOK: ...@@ -1144,6 +1175,7 @@ lb_nOK:
WorkerMsg(tMsgID.Err, "Engine full load too low for vehicle start! Road gradient = " & Vh.fGrad(dist) & "[%] at " & dist.ToString("#.0") & "[m]", MsgSrc & "/t= " & jz + 1) WorkerMsg(tMsgID.Err, "Engine full load too low for vehicle start! Road gradient = " & Vh.fGrad(dist) & "[%] at " & dist.ToString("#.0") & "[m]", MsgSrc & "/t= " & jz + 1)
Return False Return False
End If End If
Else 'tEngState.Idle, tEngState.Stopped, tEngState.Drag Else 'tEngState.Idle, tEngState.Stopped, tEngState.Drag
If FirstSecItar Then If FirstSecItar Then
If P > 0.1 Then WorkerMsg(tMsgID.Warn, "Pwheel > 0 but EngState undefined ?!", MsgSrc & "/t= " & jz + 1) If P > 0.1 Then WorkerMsg(tMsgID.Warn, "Pwheel > 0 but EngState undefined ?!", MsgSrc & "/t= " & jz + 1)
...@@ -1171,11 +1203,12 @@ lb_nOK: ...@@ -1171,11 +1203,12 @@ lb_nOK:
TracIntrIs = 1 TracIntrIs = 1
End If End If
If Not PwheelVorg Then
Vrollout = fRolloutSpeed(jz, TracIntrIs, Vh.fGrad(dist)) Vrollout = fRolloutSpeed(jz, TracIntrIs, Vh.fGrad(dist))
If Vrollout < Vact Or VehState0 <> tVehState.Dec Then Vh.SetSpeed(jz, Vrollout) If Vrollout < Vact Or VehState0 <> tVehState.Dec Then Vh.SetSpeed(jz, Vrollout)
GoTo lbGschw GoTo lbGschw
End If
End If End If
...@@ -1224,10 +1257,18 @@ lb_nOK: ...@@ -1224,10 +1257,18 @@ lb_nOK:
MODdata.EngState.Add(EngState0) MODdata.EngState.Add(EngState0)
If DRI.PwheelVorg Then
MODdata.Pa.Add(0)
MODdata.Pair.Add(0)
MODdata.Proll.Add(0)
MODdata.Pstg.Add(0)
Else
MODdata.Pa.Add(fPaFZ(MODdata.Vh.V(jz), MODdata.Vh.a(jz))) MODdata.Pa.Add(fPaFZ(MODdata.Vh.V(jz), MODdata.Vh.a(jz)))
MODdata.Pair.Add(fPair(MODdata.Vh.V(jz), jz)) MODdata.Pair.Add(fPair(MODdata.Vh.V(jz), jz))
MODdata.Proll.Add(fPr(MODdata.Vh.V(jz), Vh.fGrad(dist))) MODdata.Proll.Add(fPr(MODdata.Vh.V(jz), Vh.fGrad(dist)))
MODdata.Pstg.Add(fPs(MODdata.Vh.V(jz), Vh.fGrad(dist))) MODdata.Pstg.Add(fPs(MODdata.Vh.V(jz), Vh.fGrad(dist)))
End If
MODdata.Pbrake.Add(Pbrake) MODdata.Pbrake.Add(Pbrake)
MODdata.Psum.Add(Pwheel) MODdata.Psum.Add(Pwheel)
MODdata.PauxSum.Add(Paux) MODdata.PauxSum.Add(Paux)
...@@ -1302,14 +1343,18 @@ lb_nOK: ...@@ -1302,14 +1343,18 @@ lb_nOK:
TracIntrIs = 1 TracIntrIs = 1
End If End If
If Not PwheelVorg Then
Vrollout = fRolloutSpeed(jz + 1, TracIntrIs, Vh.fGrad(dist)) Vrollout = fRolloutSpeed(jz + 1, TracIntrIs, Vh.fGrad(dist))
If Vrollout < Vh.V(jz + 1) Or VehState0 <> tVehState.Dec Then Vh.SetSpeed(jz + 1, Vrollout) If Vrollout < Vh.V(jz + 1) Or VehState0 <> tVehState.Dec Then Vh.SetSpeed(jz + 1, Vrollout)
End If
End If End If
End If End If
If Not PwheelVorg Then
If Vh.Vsoll(jz) - Vact > 1.5 Then SecSpeedRed += 1 If Vh.Vsoll(jz) - Vact > 1.5 Then SecSpeedRed += 1
End If
LastGearChange = -1 LastGearChange = -1
...@@ -2235,6 +2280,10 @@ lb10: ...@@ -2235,6 +2280,10 @@ lb10:
Return U Return U
End Function End Function
Private Function fV(ByVal nU As Single, ByVal Gear As Integer) As Single
Return nU * (2 * VEH.rdyn * Math.PI / 1000) / (60.0 * GBX.Igetr(0) * GBX.Igetr(Gear))
End Function
Private Function fnUout(ByVal V As Single, ByVal Gear As Integer) As Single Private Function fnUout(ByVal V As Single, ByVal Gear As Integer) As Single
Return V * 60.0 * GBX.Igetr(0) * GBX.Igetr(Gear) / (2 * VEH.rdyn * Math.PI / 1000) Return V * 60.0 * GBX.Igetr(0) * GBX.Igetr(Gear) / (2 * VEH.rdyn * Math.PI / 1000)
End Function End Function
...@@ -2245,7 +2294,11 @@ lb10: ...@@ -2245,7 +2294,11 @@ lb10:
'--------------Power before Diff = At Wheel ------------- '--------------Power before Diff = At Wheel -------------
Private Function fPwheel(ByVal t As Integer, ByVal Grad As Single) As Single Private Function fPwheel(ByVal t As Integer, ByVal Grad As Single) As Single
If PwheelVorg Then
Return MODdata.Vh.Pwheel(t)
Else
Return fPr(MODdata.Vh.V(t), Grad) + fPair(MODdata.Vh.V(t), t) + fPaFZ(MODdata.Vh.V(t), MODdata.Vh.a(t)) + fPs(MODdata.Vh.V(t), Grad) Return fPr(MODdata.Vh.V(t), Grad) + fPair(MODdata.Vh.V(t), t) + fPaFZ(MODdata.Vh.V(t), MODdata.Vh.a(t)) + fPs(MODdata.Vh.V(t), Grad)
End If
End Function End Function
Private Function fPwheel(ByVal t As Integer, ByVal v As Single, ByVal a As Single, ByVal Grad As Single) As Single Private Function fPwheel(ByVal t As Integer, ByVal v As Single, ByVal a As Single, ByVal Grad As Single) As Single
......
...@@ -20,6 +20,7 @@ Public Class cVh ...@@ -20,6 +20,7 @@ Public Class cVh
Private lPadd As List(Of Single) Private lPadd As List(Of Single)
Private lVairVres As List(Of Single) Private lVairVres As List(Of Single)
Private lVairBeta As List(Of Single) Private lVairBeta As List(Of Single)
Public Pwheel As List(Of Single)
Public EcoRoll As List(Of Boolean) Public EcoRoll As List(Of Boolean)
'Calculated 'Calculated
...@@ -50,6 +51,7 @@ Public Class cVh ...@@ -50,6 +51,7 @@ Public Class cVh
Weg = New List(Of Double) Weg = New List(Of Double)
lVairVres = New List(Of Single) lVairVres = New List(Of Single)
lVairBeta = New List(Of Single) lVairBeta = New List(Of Single)
Pwheel = New List(Of Single)
EcoRoll = New List(Of Boolean) EcoRoll = New List(Of Boolean)
NoDistCorr = New List(Of Boolean) NoDistCorr = New List(Of Boolean)
iAlt = 1 iAlt = 1
...@@ -69,6 +71,7 @@ Public Class cVh ...@@ -69,6 +71,7 @@ Public Class cVh
lVairVres = Nothing lVairVres = Nothing
lVairBeta = Nothing lVairBeta = Nothing
EcoRoll = Nothing EcoRoll = Nothing
Pwheel = Nothing
NoDistCorr = Nothing NoDistCorr = Nothing
End Sub End Sub
...@@ -111,7 +114,7 @@ Public Class cVh ...@@ -111,7 +114,7 @@ Public Class cVh
End If End If
'Altitude / distance 'Altitude / distance
If Not DRI.Scycle Then If Not DRI.Scycle And DRI.Vvorg Then
L = DRI.Values(tDriComp.Alt) L = DRI.Values(tDriComp.Alt)
lAlt0.Add(0) lAlt0.Add(0)
ls0.Add(lV0(0)) ls0.Add(lV0(0))
...@@ -178,6 +181,13 @@ Public Class cVh ...@@ -178,6 +181,13 @@ Public Class cVh
End If End If
If DRI.PwheelVorg Then
L = DRI.Values(tDriComp.Pwheel)
For s = 0 To MODdata.tDim
Pwheel.Add(L(s))
Next
End If
For s = 0 To MODdata.tDim For s = 0 To MODdata.tDim
EcoRoll.Add(False) EcoRoll.Add(False)
NoDistCorr.Add(False) NoDistCorr.Add(False)
...@@ -356,9 +366,17 @@ Public Class cVh ...@@ -356,9 +366,17 @@ Public Class cVh
End If End If
End Sub End Sub
Public Sub DistCorrInit() Public Function DistCorrInit() As Boolean
Dim i As Int16 Dim i As Int16
If Not Cfg.DistCorr Then Return True
If Not DRI.Vvorg Then
WorkerMsg(tMsgID.Err, "Distance Correction not possible without speed input!", "DistCorrInit")
Return False
End If
WegX = 0 WegX = 0
dWegIst = 0 dWegIst = 0
...@@ -368,11 +386,15 @@ Public Class cVh ...@@ -368,11 +386,15 @@ Public Class cVh
WegV.Add(lV0(i)) WegV.Add(lV0(i))
Next Next
End Sub Return True
End Function
Public Function DistCorrection(ByVal t As Integer, ByVal VehState As tVehState) As Boolean Public Function DistCorrection(ByVal t As Integer, ByVal VehState As tVehState) As Boolean
Dim v As Single Dim v As Single
If Not DRI.Vvorg Then Return False
v = lV(t) v = lV(t)
dWegIst += v dWegIst += v
...@@ -441,6 +463,7 @@ Public Class cVh ...@@ -441,6 +463,7 @@ Public Class cVh
lGears.Insert(t, lGears(t)) lGears.Insert(t, lGears(t))
lPadd.Insert(t, lPadd(t)) lPadd.Insert(t, lPadd(t))
EcoRoll.Insert(t, EcoRoll(t)) EcoRoll.Insert(t, EcoRoll(t))
Pwheel.Insert(t, Pwheel(t))
NoDistCorr.Insert(t, NoDistCorr(t)) NoDistCorr.Insert(t, NoDistCorr(t))
If DRI.VairVorg Then If DRI.VairVorg Then
...@@ -471,6 +494,7 @@ Public Class cVh ...@@ -471,6 +494,7 @@ Public Class cVh
lGears.Insert(t, lGears(t)) lGears.Insert(t, lGears(t))
lPadd.Insert(t, lPadd(t)) lPadd.Insert(t, lPadd(t))
EcoRoll.Insert(t, EcoRoll(t)) EcoRoll.Insert(t, EcoRoll(t))
Pwheel.Insert(t, Pwheel(t))
NoDistCorr.Insert(t, NoDistCorr(t)) NoDistCorr.Insert(t, NoDistCorr(t))
If DRI.VairVorg Then If DRI.VairVorg Then
...@@ -503,6 +527,7 @@ Public Class cVh ...@@ -503,6 +527,7 @@ Public Class cVh
lGears.RemoveAt(t) lGears.RemoveAt(t)
lPadd.RemoveAt(t) lPadd.RemoveAt(t)
EcoRoll.RemoveAt(t) EcoRoll.RemoveAt(t)
Pwheel.RemoveAt(t)
NoDistCorr.RemoveAt(t) NoDistCorr.RemoveAt(t)
If DRI.VairVorg Then If DRI.VairVorg Then
...@@ -572,6 +597,8 @@ Public Class cVh ...@@ -572,6 +597,8 @@ Public Class cVh
Dim dh As Single Dim dh As Single
Dim ds As Single Dim ds As Single
If Not DRI.Vvorg Then Return 0
If ls0(0) >= s Then If ls0(0) >= s Then
i = 1 i = 1
GoTo lbInt GoTo lbInt
......
...@@ -439,10 +439,12 @@ lbSkip0: ...@@ -439,10 +439,12 @@ lbSkip0:
If MsgOut Then WorkerMsg(tMsgID.Normal, "Driving Cycle Preprocessing", MsgSrc) If MsgOut Then WorkerMsg(tMsgID.Normal, "Driving Cycle Preprocessing", MsgSrc)
If DRI.Vvorg Then
If Not MODdata.Px.PreRun Then If Not MODdata.Px.PreRun Then
CyclAbrtedByErr = True CyclAbrtedByErr = True
GoTo lbAusg GoTo lbAusg
End If End If
End If
If VECTOworker.CancellationPending Then GoTo lbAbort If VECTOworker.CancellationPending Then GoTo lbAbort
...@@ -450,7 +452,10 @@ lbSkip0: ...@@ -450,7 +452,10 @@ lbSkip0:
If MsgOut Then WorkerMsg(tMsgID.Normal, "Vehicle Calc", MsgSrc) If MsgOut Then WorkerMsg(tMsgID.Normal, "Vehicle Calc", MsgSrc)
MODdata.Vh.DistCorrInit() If Not MODdata.Vh.DistCorrInit() Then
CyclAbrtedByErr = True
GoTo lbAusg
End If
If Not MODdata.Px.Calc() Then If Not MODdata.Px.Calc() Then
CyclAbrtedByErr = True CyclAbrtedByErr = True
...@@ -461,7 +466,7 @@ lbSkip0: ...@@ -461,7 +466,7 @@ lbSkip0:
If VECTOworker.CancellationPending Then GoTo lbAbort If VECTOworker.CancellationPending Then GoTo lbAbort
'Calculate CycleKin (for erg/sum, etc.) 'Calculate CycleKin (for erg/sum, etc.)
MODdata.CylceKin.Calc() If DRI.Vvorg Then MODdata.CylceKin.Calc()
End If End If
'---------------------------------------------------------------------------- '----------------------------------------------------------------------------
......
...@@ -121,6 +121,8 @@ Module VECTO_Global ...@@ -121,6 +121,8 @@ Module VECTO_Global
Return tDriComp.Torque Return tDriComp.Torque
Case sKey.DRI.Alt Case sKey.DRI.Alt
Return tDriComp.Alt Return tDriComp.Alt
Case sKey.DRI.Pwheel
Return tDriComp.Pwheel
Case Else Case Else
Return tDriComp.Undefined Return tDriComp.Undefined
...@@ -639,6 +641,7 @@ Public Class csKey ...@@ -639,6 +641,7 @@ Public Class csKey
Public s As String = "<S>" Public s As String = "<S>"
Public StopTime As String = "<STOP>" Public StopTime As String = "<STOP>"
Public Torque As String = "<ME>" Public Torque As String = "<ME>"
Public Pwheel As String = "<PWHEEL>"
End Class End Class
Public Class csKeyAux Public Class csKeyAux
......
...@@ -67,6 +67,7 @@ Public Enum tDriComp ...@@ -67,6 +67,7 @@ Public Enum tDriComp
s s
StopTime StopTime
Torque Torque
Pwheel
End Enum End Enum
Public Enum tVehState Public Enum tVehState
......
...@@ -89,6 +89,7 @@ Class cVSUM ...@@ -89,6 +89,7 @@ Class cVSUM
If Not VEC.EngOnly Then If Not VEC.EngOnly Then
'Average-Speed. calculation 'Average-Speed. calculation
If DRI.Vvorg Then
sum = 0 sum = 0
For t = 0 To t1 For t = 0 To t1
sum += MODdata.Vh.V(t) sum += MODdata.Vh.V(t)
...@@ -101,6 +102,8 @@ Class cVSUM ...@@ -101,6 +102,8 @@ Class cVSUM
'altitude change 'altitude change
VSUMentries("\\G").ValueString = MODdata.Vh.AltIntp(Vquer * (t1 + 1) / 3.6, False) - MODdata.Vh.AltIntp(0, False) VSUMentries("\\G").ValueString = MODdata.Vh.AltIntp(Vquer * (t1 + 1) / 3.6, False) - MODdata.Vh.AltIntp(0, False)
End If
'Auxiliary energy consumption 'Auxiliary energy consumption
If VEC.AuxDef Then If VEC.AuxDef Then
For Each key In VEC.AuxPaths.Keys For Each key In VEC.AuxPaths.Keys
...@@ -118,33 +121,26 @@ Class cVSUM ...@@ -118,33 +121,26 @@ Class cVSUM
'FC 'FC
If MODdata.FCerror Then If MODdata.FCerror Then
If VEC.EngOnly Then
VSUMentries("FC_h").ValueString = "ERROR" VSUMentries("FC_h").ValueString = "ERROR"
Else
VSUMentries("FC_km").ValueString = "ERROR" If Not VEC.EngOnly Then VSUMentries("FC_km").ValueString = "ERROR"
End If
If MODdata.FCAUXcSet Then If MODdata.FCAUXcSet Then
If VEC.EngOnly Then
VSUMentries("FC-AUXc_h").ValueString = "ERROR" VSUMentries("FC-AUXc_h").ValueString = "ERROR"
Else If Not VEC.EngOnly Then VSUMentries("FC-AUXc_km").ValueString = "ERROR"
VSUMentries("FC-AUXc_km").ValueString = "ERROR"
End If
End If End If
If Cfg.DeclMode Then If Cfg.DeclMode Then
If VEC.EngOnly Then
VSUMentries("FC-WHTCc_h").ValueString = "ERROR" VSUMentries("FC-WHTCc_h").ValueString = "ERROR"
Else If Not VEC.EngOnly Then VSUMentries("FC-WHTCc_km").ValueString = "ERROR"
VSUMentries("FC-WHTCc_km").ValueString = "ERROR"
End If
End If End If
Else Else
If VEC.EngOnly Then
VSUMentries("FC_h").ValueString = MODdata.FCavg VSUMentries("FC_h").ValueString = MODdata.FCavg
Else
If Not VEC.EngOnly And DRI.Vvorg Then
VSUMentries("FC_km").ValueString = (MODdata.FCavg / Vquer) VSUMentries("FC_km").ValueString = (MODdata.FCavg / Vquer)
VSUMentries("FCl_km").ValueString = (100 * MODdata.FCavgFinal / Vquer) / (Cfg.FuelDens * 1000) '[l/100km] VSUMentries("FCl_km").ValueString = (100 * MODdata.FCavgFinal / Vquer) / (Cfg.FuelDens * 1000) '[l/100km]
...@@ -160,25 +156,14 @@ Class cVSUM ...@@ -160,25 +156,14 @@ Class cVSUM
End If End If
If MODdata.FCAUXcSet Then If MODdata.FCAUXcSet Then
If VEC.EngOnly Then
VSUMentries("FC-AUXc_h").ValueString = MODdata.FCavgAUXc VSUMentries("FC-AUXc_h").ValueString = MODdata.FCavgAUXc
Else If Not VEC.EngOnly Then VSUMentries("FC-AUXc_km").ValueString = (MODdata.FCavgAUXc / Vquer)
VSUMentries("FC-AUXc_km").ValueString = (MODdata.FCavgAUXc / Vquer)
End If
End If End If
If Cfg.DeclMode Then If Cfg.DeclMode Then
If VEC.EngOnly Then
VSUMentries("FC-WHTCc_h").ValueString = MODdata.FCavgWHTCc VSUMentries("FC-WHTCc_h").ValueString = MODdata.FCavgWHTCc
Else If Not VEC.EngOnly Then VSUMentries("FC-WHTCc_km").ValueString = (MODdata.FCavgWHTCc / Vquer)
VSUMentries("FC-WHTCc_km").ValueString = (MODdata.FCavgWHTCc / Vquer)
End If End If
End If
End If End If
...@@ -452,11 +437,7 @@ Class cVSUM ...@@ -452,11 +437,7 @@ Class cVSUM
End If End If
End Sub End Sub
''' <summary>
''' Initializes the specified job file.
''' </summary>
''' <param name="JobFile">The job file.</param>
''' <returns></returns>
Public Function Init(ByVal JobFile As String) As Boolean Public Function Init(ByVal JobFile As String) As Boolean
Dim JobFiles As New List(Of String) Dim JobFiles As New List(Of String)
Dim str As String Dim str As String
...@@ -640,11 +621,12 @@ Class cVSUM ...@@ -640,11 +621,12 @@ Class cVSUM
Return False Return False
End Try End Try
If VEC0.EngOnly Then AddToVSUM("FC_h", "FCh", "[g/h]")
AddToVSUM("FC_h", "FC", "[g/h]") AddToVSUM("FC-AUXc_h", "FCh-AUXc", "[g/h]")
AddToVSUM("FC-AUXc_h", "FC-AUXc", "[g/h]") AddToVSUM("FC-WHTCc_h", "FCh-WHTCc", "[g/h]")
AddToVSUM("FC-WHTCc_h", "FC-WHTCc", "[g/h]")
Else If Not VEC0.EngOnly Then
AddToVSUM("FC_km", "FC", "[g/km]") AddToVSUM("FC_km", "FC", "[g/km]")
AddToVSUM("FC-AUXc_km", "FC-AUXc", "[g/km]") AddToVSUM("FC-AUXc_km", "FC-AUXc", "[g/km]")
AddToVSUM("FC-WHTCc_km", "FC-WHTCc", "[g/km]") AddToVSUM("FC-WHTCc_km", "FC-WHTCc", "[g/km]")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment