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

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

- load-dependent RRC (in development)

parent f895b3ce
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,7 @@ Partial Class F_VEH
Me.ColumnHeader7 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.ColumnHeader8 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.ColumnHeader9 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.ButAxlAdd = New System.Windows.Forms.Button()
Me.Label23 = New System.Windows.Forms.Label()
Me.CbAxleConfig = New System.Windows.Forms.ComboBox()
......@@ -570,7 +571,7 @@ Partial Class F_VEH
Me.LvRRC.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.LvRRC.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader7, Me.ColumnHeader8, Me.ColumnHeader9})
Me.LvRRC.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader7, Me.ColumnHeader8, Me.ColumnHeader9, Me.ColumnHeader1})
Me.LvRRC.FullRowSelect = True
Me.LvRRC.GridLines = True
Me.LvRRC.HideSelection = False
......@@ -585,18 +586,23 @@ Partial Class F_VEH
'
'ColumnHeader7
'
Me.ColumnHeader7.Text = "Axle"
Me.ColumnHeader7.Width = 36
Me.ColumnHeader7.Text = "#"
Me.ColumnHeader7.Width = 22
'
'ColumnHeader8
'
Me.ColumnHeader8.Text = "Max. axle weight [kg]"
Me.ColumnHeader8.Width = 120
Me.ColumnHeader8.Text = "Weight share [-]"
Me.ColumnHeader8.Width = 94
'
'ColumnHeader9
'
Me.ColumnHeader9.Text = "RRC [-]"
Me.ColumnHeader9.Width = 79
Me.ColumnHeader9.Width = 55
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "Fz ISO [N]"
Me.ColumnHeader1.Width = 65
'
'ButAxlAdd
'
......@@ -932,4 +938,5 @@ Partial Class F_VEH
Friend WithEvents OpenWithToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ShowInFolderToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents BtCdFileOpen As System.Windows.Forms.Button
Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
End Class
......@@ -212,6 +212,7 @@ Public Class F_VEH
lvi.SubItems(0).Text = i.ToString
lvi.SubItems.Add(sl(0))
lvi.SubItems.Add(sl(1))
lvi.SubItems.Add(sl(2))
LvRRC.Items.Add(lvi)
Next
......@@ -283,9 +284,9 @@ Public Class F_VEH
VEH0.RtFile.Init(fPATH(file), Me.TbRtPath.Text)
VEH0.VehCat = CType(Me.CbCat.SelectedIndex, tVehCat)
VEH0.RRCs.Clear()
For Each LV0 In LvRRC.Items
VEH0.RRCs.Add(New Single() {CSng(LV0.SubItems(1).Text), CSng(LV0.SubItems(2).Text)})
VEH0.RRCs.Add(New Single() {CSng(LV0.SubItems(1).Text), CSng(LV0.SubItems(2).Text), CSng(LV0.SubItems(3).Text)})
Next
VEH0.MassMax = CSng(fTextboxToNumString(Me.TbMassMax.Text))
......@@ -592,6 +593,7 @@ Public Class F_VEH
lv0.SubItems(0).Text = Me.LvRRC.Items.Count + 1
lv0.SubItems.Add(Trim(dlog.TbWeight.Text))
lv0.SubItems.Add(Trim(dlog.TbRRC.Text))
lv0.SubItems.Add(Trim(dlog.TbFzISO.Text))
Me.LvRRC.Items.Add(lv0)
......@@ -661,10 +663,12 @@ Public Class F_VEH
dlog.TbWeight.Text = LV0.SubItems(1).Text
dlog.TbRRC.Text = LV0.SubItems(2).Text
dlog.TbFzISO.Text = LV0.SubItems(3).Text
If dlog.ShowDialog = Windows.Forms.DialogResult.OK Then
LV0.SubItems(1).Text = dlog.TbWeight.Text
LV0.SubItems(2).Text = dlog.TbRRC.Text
LV0.SubItems(3).Text = dlog.TbFzISO.Text
Change()
......
......@@ -31,6 +31,9 @@ Partial Class F_VEH_Axle
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.TbRRC = New System.Windows.Forms.TextBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label6 = New System.Windows.Forms.Label()
Me.TbFzISO = New System.Windows.Forms.TextBox()
Me.TableLayoutPanel1.SuspendLayout()
Me.SuspendLayout()
'
......@@ -42,7 +45,7 @@ Partial Class F_VEH_Axle
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TableLayoutPanel1.Controls.Add(Me.OK_Button, 0, 0)
Me.TableLayoutPanel1.Controls.Add(Me.Cancel_Button, 1, 0)
Me.TableLayoutPanel1.Location = New System.Drawing.Point(83, 74)
Me.TableLayoutPanel1.Location = New System.Drawing.Point(83, 98)
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
Me.TableLayoutPanel1.RowCount = 1
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
......@@ -71,11 +74,11 @@ Partial Class F_VEH_Axle
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(17, 15)
Me.Label1.Location = New System.Drawing.Point(33, 15)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(86, 13)
Me.Label1.Size = New System.Drawing.Size(72, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Max. axle weight"
Me.Label1.Text = "Weight Share"
'
'TbWeight
'
......@@ -89,9 +92,9 @@ Partial Class F_VEH_Axle
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(199, 15)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(25, 13)
Me.Label2.Size = New System.Drawing.Size(16, 13)
Me.Label2.TabIndex = 1
Me.Label2.Text = "[kg]"
Me.Label2.Text = "[-]"
'
'Label3
'
......@@ -118,15 +121,43 @@ Partial Class F_VEH_Axle
Me.TbRRC.Size = New System.Drawing.Size(84, 20)
Me.TbRRC.TabIndex = 5
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(27, 67)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(78, 13)
Me.Label5.TabIndex = 1
Me.Label5.Text = "Fz (ISO 28580)"
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(199, 67)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(21, 13)
Me.Label6.TabIndex = 1
Me.Label6.Text = "[N]"
'
'TbFzISO
'
Me.TbFzISO.Location = New System.Drawing.Point(109, 64)
Me.TbFzISO.Name = "TbFzISO"
Me.TbFzISO.Size = New System.Drawing.Size(84, 20)
Me.TbFzISO.TabIndex = 5
'
'F_VEH_Axle
'
Me.AcceptButton = Me.OK_Button
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.CancelButton = Me.Cancel_Button
Me.ClientSize = New System.Drawing.Size(241, 115)
Me.ClientSize = New System.Drawing.Size(241, 139)
Me.Controls.Add(Me.TbFzISO)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.TbRRC)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.TbWeight)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
......@@ -153,5 +184,8 @@ Partial Class F_VEH_Axle
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents TbRRC As System.Windows.Forms.TextBox
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents TbFzISO As System.Windows.Forms.TextBox
End Class
......@@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -14,6 +14,11 @@ Public Class F_VEH_Axle
Exit Sub
End If
If Not IsNumeric(Me.TbFzISO.Text) OrElse Trim(Me.TbFzISO.Text) = "" Then
MsgBox("Fz ISO input is not valid!")
Exit Sub
End If
Me.DialogResult = System.Windows.Forms.DialogResult.OK
Me.Close()
End Sub
......
......@@ -306,7 +306,11 @@ Public Class cVEH
If line(0) = sKey.Break Then Exit Do
Try
RRCs.Add(New Single() {CSng(line(0)), CSng(line(1))})
If UBound(line) > 1 Then
RRCs.Add(New Single() {CSng(line(0)), CSng(line(1)), CSng(line(2))})
Else
RRCs.Add(New Single() {0.0, CSng(line(1)), 0.0})
End If
Catch ex As Exception
WorkerMsg(tMsgID.Err, ex.Message, MsgSrc)
file.Close()
......@@ -433,9 +437,9 @@ lbError:
'Axle configuration - Update 16.10.2012
file.WriteLine("c Axle configurations")
file.WriteLine("c Max. axle weight [kg], RRC [N/N]")
file.WriteLine("c Axle weight share [-], RRC [N/N],Fz ISO [N]")
For Each sl In RRCs
file.WriteLine(CStr(sl(0)), CStr(sl(1)))
file.WriteLine(CStr(sl(0)), CStr(sl(1)), CStr(sl(2)))
Next
file.WriteLine(sKey.Break)
......@@ -489,11 +493,20 @@ lbError:
Return False
End If
'Check if sum=100%
sumW = 0
sumprod = 0
For Each sl In RRCs
sumW += sl(0)
sumprod += sl(0) * sl(1)
Next
If Math.Abs(sumW - 1) > 0.0001 Then
WorkerMsg(tMsgID.Err, "Sum of axle weight shares is not 100%!", MsgSrc, "<GUI>" & sFilePath)
Return False
End If
sumprod = 0
For Each sl In RRCs
sumprod += sl(0) * (sl(1) * 100 * ((siLoading + siMass + MassExtra) * 9.81 * sl(0) / sl(2)) ^ (0.9 - 1)) 'Beta=0.9
Next
siFr0 = sumprod / sumW
......@@ -607,9 +620,6 @@ lbError:
MyGBmaps.Add(GBmap0)
'Calculate average efficiency for fast approx. calculation
If i > 0 Then
EffSum = 0
......
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