diff --git a/AuxillaryTestHarness/AuxillaryTestHarness.vbproj b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj index 3efd9f3349b2a6c56d10e9657c62f58c92cbaef5..b935f4aaf65cd02a05ebec0567654cd1d29db4e2 100644 --- a/AuxillaryTestHarness/AuxillaryTestHarness.vbproj +++ b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj @@ -75,12 +75,6 @@ <Import Include="System.Threading.Tasks" /> </ItemGroup> <ItemGroup> - <Compile Include="ConsumerList.Designer.vb"> - <DependentUpon>ConsumerList.vb</DependentUpon> - </Compile> - <Compile Include="ConsumerList.vb"> - <SubType>Form</SubType> - </Compile> <Compile Include="Dashboard.Designer.vb"> <DependentUpon>Dashboard.vb</DependentUpon> </Compile> @@ -104,9 +98,6 @@ </Compile> </ItemGroup> <ItemGroup> - <EmbeddedResource Include="ConsumerList.resx"> - <DependentUpon>ConsumerList.vb</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="Dashboard.resx"> <DependentUpon>Dashboard.vb</DependentUpon> </EmbeddedResource> diff --git a/AuxillaryTestHarness/ConsumerList.Designer.vb b/AuxillaryTestHarness/ConsumerList.Designer.vb deleted file mode 100644 index a39cafb9dc00be794651079dedf51927346a9ebd..0000000000000000000000000000000000000000 --- a/AuxillaryTestHarness/ConsumerList.Designer.vb +++ /dev/null @@ -1,62 +0,0 @@ -<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ -Partial Class ConsumerList - Inherits System.Windows.Forms.Form - - 'Form overrides dispose to clean up the component list. - <System.Diagnostics.DebuggerNonUserCode()> _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Required by the Windows Form Designer - Private components As System.ComponentModel.IContainer - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - <System.Diagnostics.DebuggerStepThrough()> _ - Private Sub InitializeComponent() - Me.DataGridView1 = New System.Windows.Forms.DataGridView() - Me.Button1 = New System.Windows.Forms.Button() - CType(Me.DataGridView1,System.ComponentModel.ISupportInitialize).BeginInit - Me.SuspendLayout - ' - 'DataGridView1 - ' - Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.DataGridView1.Location = New System.Drawing.Point(46, 193) - Me.DataGridView1.Name = "DataGridView1" - Me.DataGridView1.Size = New System.Drawing.Size(516, 150) - Me.DataGridView1.TabIndex = 0 - ' - 'Button1 - ' - Me.Button1.Location = New System.Drawing.Point(46, 60) - Me.Button1.Name = "Button1" - Me.Button1.Size = New System.Drawing.Size(75, 23) - Me.Button1.TabIndex = 1 - Me.Button1.Text = "Button1" - Me.Button1.UseVisualStyleBackColor = true - ' - 'ConsumerList - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(622, 447) - Me.Controls.Add(Me.Button1) - Me.Controls.Add(Me.DataGridView1) - Me.Name = "ConsumerList" - Me.Text = "ConsumerList" - CType(Me.DataGridView1,System.ComponentModel.ISupportInitialize).EndInit - Me.ResumeLayout(false) - -End Sub - Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView - Friend WithEvents Button1 As System.Windows.Forms.Button -End Class diff --git a/AuxillaryTestHarness/ConsumerList.resx b/AuxillaryTestHarness/ConsumerList.resx deleted file mode 100644 index 1af7de150c99c12dd67a509fe57c10d63e4eeb04..0000000000000000000000000000000000000000 --- a/AuxillaryTestHarness/ConsumerList.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/AuxillaryTestHarness/ConsumerList.vb b/AuxillaryTestHarness/ConsumerList.vb deleted file mode 100644 index f5b2771047fae6707f8eabb7f5b869d5c992a059..0000000000000000000000000000000000000000 --- a/AuxillaryTestHarness/ConsumerList.vb +++ /dev/null @@ -1,46 +0,0 @@ -imports VectoAuxiliaries.Electrics -Public Class ConsumerList - - - -Friend ConsumerList As List(Of IElectricalConsumer) - - - - -Private Sub ConsumerList_Load( sender As Object, e As EventArgs) Handles MyBase.Load - - -ConsumerList = New List(Of IElectricalConsumer) - - - - - -End Sub - -Private sub AddConsumer( consumer as IElectricalConsumer) - -If Not ConsumerList.Contains( consumer ) then - - -ConsumerList.Add(consumer) - -Else - -MessageBox.Show("Already Exists") - - -End If - - - -End Sub - - -Private Sub Button1_Click( sender As Object, e As EventArgs) Handles Button1.Click - - AddConsumer( New ElectricalConsumer(False,"Test","Test1",2.2,.5,26.3,1)) - -End Sub -End Class \ No newline at end of file diff --git a/AuxillaryTestHarness/Dashboard.Designer.vb b/AuxillaryTestHarness/Dashboard.Designer.vb index 2816b1012508b66ab8e6bae1cc2dba64d5e7a743..a2a144d2d5f1681a69a760cc960a655d283fae4f 100644 --- a/AuxillaryTestHarness/Dashboard.Designer.vb +++ b/AuxillaryTestHarness/Dashboard.Designer.vb @@ -23,20 +23,20 @@ Partial Class Dashboard <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.brcElecConsumers = New System.Windows.Forms.BindingSource(Me.components) - Me.Panel1 = New System.Windows.Forms.Panel() + Me.pnlMain = New System.Windows.Forms.Panel() Me.btnCancel = New System.Windows.Forms.Button() Me.btnFinish = New System.Windows.Forms.Button() Me.btnForward = New System.Windows.Forms.Button() @@ -45,32 +45,33 @@ Partial Class Dashboard Me.tabMain = New System.Windows.Forms.TabControl() Me.tabGeneralConfig = New System.Windows.Forms.TabPage() Me.cboCycle = New System.Windows.Forms.ComboBox() - Me.Label3 = New System.Windows.Forms.Label() - Me.Label2 = New System.Windows.Forms.Label() + Me.lblCycle = New System.Windows.Forms.Label() + Me.lblVehiceWeight = New System.Windows.Forms.Label() Me.txtVehicleWeightKG = New System.Windows.Forms.TextBox() Me.tabElectricalConfig = New System.Windows.Forms.TabPage() + Me.btnAlternatorMapPath = New System.Windows.Forms.Button() Me.gvResultsCardOverrun = New System.Windows.Forms.DataGridView() Me.gvResultsCardTraction = New System.Windows.Forms.DataGridView() Me.gvResultsCardIdle = New System.Windows.Forms.DataGridView() - Me.Label9 = New System.Windows.Forms.Label() - Me.Label8 = New System.Windows.Forms.Label() - Me.Label7 = New System.Windows.Forms.Label() + Me.lblResultsOverrun = New System.Windows.Forms.Label() + Me.lblResultsTractionOn = New System.Windows.Forms.Label() + Me.lblResultsIdle = New System.Windows.Forms.Label() Me.chkSmartElectricals = New System.Windows.Forms.CheckBox() - Me.Label6 = New System.Windows.Forms.Label() + Me.lblElectricalConsumables = New System.Windows.Forms.Label() Me.gvElectricalConsumables = New System.Windows.Forms.DataGridView() Me.txtDoorActuationTimeSeconds = New System.Windows.Forms.TextBox() Me.txtAlternatorGearEfficiency = New System.Windows.Forms.TextBox() Me.txtAlternatorMapPath = New System.Windows.Forms.TextBox() Me.txtPowernetVoltage = New System.Windows.Forms.TextBox() - Me.labelDoorActuationTimeSeconds = New System.Windows.Forms.Label() - Me.Label5 = New System.Windows.Forms.Label() - Me.Label4 = New System.Windows.Forms.Label() - Me.Label1 = New System.Windows.Forms.Label() + Me.lblDoorActuationTimeSeconds = New System.Windows.Forms.Label() + Me.lblAlternatorGearEfficiency = New System.Windows.Forms.Label() + Me.lblAlternatormapPath = New System.Windows.Forms.Label() + Me.lblPowerNetVoltage = New System.Windows.Forms.Label() Me.tabPneumaticConfig = New System.Windows.Forms.TabPage() Me.pnlPneumaticsUserInput = New System.Windows.Forms.Panel() Me.Button1 = New System.Windows.Forms.Button() Me.btnCompressorMap = New System.Windows.Forms.Button() - Me.Label10 = New System.Windows.Forms.Label() + Me.lblPneumaticsVariablesTitle = New System.Windows.Forms.Label() Me.lblCompressorType = New System.Windows.Forms.Label() Me.lblActuationsMap = New System.Windows.Forms.Label() Me.chkSmartAirCompression = New System.Windows.Forms.CheckBox() @@ -122,13 +123,19 @@ Partial Class Dashboard Me.txtPerStopBrakeActuationNIperKG = New System.Windows.Forms.TextBox() Me.txtSmartRegenFractionTotalAirDemand = New System.Windows.Forms.TextBox() Me.tabHVACConfig = New System.Windows.Forms.TabPage() + Me.txtHVACFuellingLitresPerHour = New System.Windows.Forms.TextBox() + Me.lblHVACFuellingLitresPerHour = New System.Windows.Forms.Label() + Me.txtHVACMechanicalLoadPowerWatts = New System.Windows.Forms.TextBox() + Me.lblHVACMechanicalLoadPowerWatts = New System.Windows.Forms.Label() + Me.txtHVACElectricalLoadPowerWatts = New System.Windows.Forms.TextBox() + Me.lblHVACElectricalLoadPowerWatts = New System.Windows.Forms.Label() Me.tabPlayground = New System.Windows.Forms.TabPage() - Me.TabPage1 = New System.Windows.Forms.TabPage() Me.resultCardContextMenu = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.DeleteToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ErrorProvider = New System.Windows.Forms.ErrorProvider(Me.components) + Me.lblHVACTitle = New System.Windows.Forms.Label() CType(Me.brcElecConsumers,System.ComponentModel.ISupportInitialize).BeginInit - Me.Panel1.SuspendLayout + Me.pnlMain.SuspendLayout Me.tabMain.SuspendLayout Me.tabGeneralConfig.SuspendLayout Me.tabElectricalConfig.SuspendLayout @@ -139,23 +146,24 @@ Partial Class Dashboard Me.tabPneumaticConfig.SuspendLayout Me.pnlPneumaticsUserInput.SuspendLayout Me.pnlPneumaticAuxillaries.SuspendLayout + Me.tabHVACConfig.SuspendLayout Me.resultCardContextMenu.SuspendLayout CType(Me.ErrorProvider,System.ComponentModel.ISupportInitialize).BeginInit Me.SuspendLayout ' - 'Panel1 + 'pnlMain ' - Me.Panel1.Controls.Add(Me.btnCancel) - Me.Panel1.Controls.Add(Me.btnFinish) - Me.Panel1.Controls.Add(Me.btnForward) - Me.Panel1.Controls.Add(Me.btnBack) - Me.Panel1.Controls.Add(Me.btnStart) - Me.Panel1.Controls.Add(Me.tabMain) - Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill - Me.Panel1.Location = New System.Drawing.Point(0, 0) - Me.Panel1.Name = "Panel1" - Me.Panel1.Size = New System.Drawing.Size(945, 712) - Me.Panel1.TabIndex = 1 + Me.pnlMain.Controls.Add(Me.btnCancel) + Me.pnlMain.Controls.Add(Me.btnFinish) + Me.pnlMain.Controls.Add(Me.btnForward) + Me.pnlMain.Controls.Add(Me.btnBack) + Me.pnlMain.Controls.Add(Me.btnStart) + Me.pnlMain.Controls.Add(Me.tabMain) + Me.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.pnlMain.Location = New System.Drawing.Point(0, 0) + Me.pnlMain.Name = "pnlMain" + Me.pnlMain.Size = New System.Drawing.Size(945, 712) + Me.pnlMain.TabIndex = 1 ' 'btnCancel ' @@ -210,7 +218,7 @@ Partial Class Dashboard Me.tabMain.Controls.Add(Me.tabPneumaticConfig) Me.tabMain.Controls.Add(Me.tabHVACConfig) Me.tabMain.Controls.Add(Me.tabPlayground) - Me.tabMain.Controls.Add(Me.TabPage1) + Me.tabMain.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed Me.tabMain.Location = New System.Drawing.Point(12, 12) Me.tabMain.Name = "tabMain" Me.tabMain.SelectedIndex = 0 @@ -221,8 +229,8 @@ Partial Class Dashboard 'tabGeneralConfig ' Me.tabGeneralConfig.Controls.Add(Me.cboCycle) - Me.tabGeneralConfig.Controls.Add(Me.Label3) - Me.tabGeneralConfig.Controls.Add(Me.Label2) + Me.tabGeneralConfig.Controls.Add(Me.lblCycle) + Me.tabGeneralConfig.Controls.Add(Me.lblVehiceWeight) Me.tabGeneralConfig.Controls.Add(Me.txtVehicleWeightKG) Me.tabGeneralConfig.Location = New System.Drawing.Point(4, 22) Me.tabGeneralConfig.Name = "tabGeneralConfig" @@ -241,23 +249,23 @@ Partial Class Dashboard Me.cboCycle.Size = New System.Drawing.Size(121, 21) Me.cboCycle.TabIndex = 6 ' - 'Label3 + 'lblCycle ' - Me.Label3.AutoSize = true - Me.Label3.Location = New System.Drawing.Point(24, 78) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(33, 13) - Me.Label3.TabIndex = 5 - Me.Label3.Text = "Cycle" + Me.lblCycle.AutoSize = true + Me.lblCycle.Location = New System.Drawing.Point(24, 78) + Me.lblCycle.Name = "lblCycle" + Me.lblCycle.Size = New System.Drawing.Size(33, 13) + Me.lblCycle.TabIndex = 5 + Me.lblCycle.Text = "Cycle" ' - 'Label2 + 'lblVehiceWeight ' - Me.Label2.AutoSize = true - Me.Label2.Location = New System.Drawing.Point(21, 38) - Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(97, 13) - Me.Label2.TabIndex = 3 - Me.Label2.Text = "Vehicle Weight KG" + Me.lblVehiceWeight.AutoSize = true + Me.lblVehiceWeight.Location = New System.Drawing.Point(21, 38) + Me.lblVehiceWeight.Name = "lblVehiceWeight" + Me.lblVehiceWeight.Size = New System.Drawing.Size(97, 13) + Me.lblVehiceWeight.TabIndex = 3 + Me.lblVehiceWeight.Text = "Vehicle Weight KG" ' 'txtVehicleWeightKG ' @@ -268,23 +276,24 @@ Partial Class Dashboard ' 'tabElectricalConfig ' + Me.tabElectricalConfig.Controls.Add(Me.btnAlternatorMapPath) Me.tabElectricalConfig.Controls.Add(Me.gvResultsCardOverrun) Me.tabElectricalConfig.Controls.Add(Me.gvResultsCardTraction) Me.tabElectricalConfig.Controls.Add(Me.gvResultsCardIdle) - Me.tabElectricalConfig.Controls.Add(Me.Label9) - Me.tabElectricalConfig.Controls.Add(Me.Label8) - Me.tabElectricalConfig.Controls.Add(Me.Label7) + Me.tabElectricalConfig.Controls.Add(Me.lblResultsOverrun) + Me.tabElectricalConfig.Controls.Add(Me.lblResultsTractionOn) + Me.tabElectricalConfig.Controls.Add(Me.lblResultsIdle) Me.tabElectricalConfig.Controls.Add(Me.chkSmartElectricals) - Me.tabElectricalConfig.Controls.Add(Me.Label6) + Me.tabElectricalConfig.Controls.Add(Me.lblElectricalConsumables) Me.tabElectricalConfig.Controls.Add(Me.gvElectricalConsumables) Me.tabElectricalConfig.Controls.Add(Me.txtDoorActuationTimeSeconds) Me.tabElectricalConfig.Controls.Add(Me.txtAlternatorGearEfficiency) Me.tabElectricalConfig.Controls.Add(Me.txtAlternatorMapPath) Me.tabElectricalConfig.Controls.Add(Me.txtPowernetVoltage) - Me.tabElectricalConfig.Controls.Add(Me.labelDoorActuationTimeSeconds) - Me.tabElectricalConfig.Controls.Add(Me.Label5) - Me.tabElectricalConfig.Controls.Add(Me.Label4) - Me.tabElectricalConfig.Controls.Add(Me.Label1) + Me.tabElectricalConfig.Controls.Add(Me.lblDoorActuationTimeSeconds) + Me.tabElectricalConfig.Controls.Add(Me.lblAlternatorGearEfficiency) + Me.tabElectricalConfig.Controls.Add(Me.lblAlternatormapPath) + Me.tabElectricalConfig.Controls.Add(Me.lblPowerNetVoltage) Me.tabElectricalConfig.Location = New System.Drawing.Point(4, 22) Me.tabElectricalConfig.Name = "tabElectricalConfig" Me.tabElectricalConfig.Padding = New System.Windows.Forms.Padding(3) @@ -293,128 +302,137 @@ Partial Class Dashboard Me.tabElectricalConfig.Text = "ElectricalConfig" Me.tabElectricalConfig.UseVisualStyleBackColor = true ' + 'btnAlternatorMapPath + ' + Me.btnAlternatorMapPath.Location = New System.Drawing.Point(496, 43) + Me.btnAlternatorMapPath.Name = "btnAlternatorMapPath" + Me.btnAlternatorMapPath.Size = New System.Drawing.Size(38, 20) + Me.btnAlternatorMapPath.TabIndex = 19 + Me.btnAlternatorMapPath.Text = ". . ." + Me.btnAlternatorMapPath.UseVisualStyleBackColor = true + ' 'gvResultsCardOverrun ' - DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gvResultsCardOverrun.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 + DataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle13.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvResultsCardOverrun.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle13 Me.gvResultsCardOverrun.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.gvResultsCardOverrun.DefaultCellStyle = DataGridViewCellStyle2 + DataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle14.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.gvResultsCardOverrun.DefaultCellStyle = DataGridViewCellStyle14 Me.gvResultsCardOverrun.Location = New System.Drawing.Point(590, 451) Me.gvResultsCardOverrun.Name = "gvResultsCardOverrun" - DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gvResultsCardOverrun.RowHeadersDefaultCellStyle = DataGridViewCellStyle3 + DataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvResultsCardOverrun.RowHeadersDefaultCellStyle = DataGridViewCellStyle15 Me.gvResultsCardOverrun.Size = New System.Drawing.Size(246, 125) Me.gvResultsCardOverrun.TabIndex = 18 ' 'gvResultsCardTraction ' - DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gvResultsCardTraction.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4 + DataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvResultsCardTraction.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle16 Me.gvResultsCardTraction.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.gvResultsCardTraction.DefaultCellStyle = DataGridViewCellStyle5 + DataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle17.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.gvResultsCardTraction.DefaultCellStyle = DataGridViewCellStyle17 Me.gvResultsCardTraction.Location = New System.Drawing.Point(311, 451) Me.gvResultsCardTraction.Name = "gvResultsCardTraction" - DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gvResultsCardTraction.RowHeadersDefaultCellStyle = DataGridViewCellStyle6 + DataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvResultsCardTraction.RowHeadersDefaultCellStyle = DataGridViewCellStyle18 Me.gvResultsCardTraction.Size = New System.Drawing.Size(258, 125) Me.gvResultsCardTraction.TabIndex = 17 ' 'gvResultsCardIdle ' - DataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gvResultsCardIdle.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle7 + DataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvResultsCardIdle.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle19 Me.gvResultsCardIdle.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.gvResultsCardIdle.DefaultCellStyle = DataGridViewCellStyle8 + DataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle20.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.gvResultsCardIdle.DefaultCellStyle = DataGridViewCellStyle20 Me.gvResultsCardIdle.Location = New System.Drawing.Point(35, 451) Me.gvResultsCardIdle.Name = "gvResultsCardIdle" - DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gvResultsCardIdle.RowHeadersDefaultCellStyle = DataGridViewCellStyle9 + DataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle21.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvResultsCardIdle.RowHeadersDefaultCellStyle = DataGridViewCellStyle21 Me.gvResultsCardIdle.Size = New System.Drawing.Size(256, 125) Me.gvResultsCardIdle.TabIndex = 16 ' - 'Label9 + 'lblResultsOverrun ' - Me.Label9.AutoSize = true - Me.Label9.Location = New System.Drawing.Point(587, 435) - Me.Label9.Name = "Label9" - Me.Label9.Size = New System.Drawing.Size(83, 13) - Me.Label9.TabIndex = 15 - Me.Label9.Text = "Results Overrun" + Me.lblResultsOverrun.AutoSize = true + Me.lblResultsOverrun.Location = New System.Drawing.Point(587, 435) + Me.lblResultsOverrun.Name = "lblResultsOverrun" + Me.lblResultsOverrun.Size = New System.Drawing.Size(83, 13) + Me.lblResultsOverrun.TabIndex = 15 + Me.lblResultsOverrun.Text = "Results Overrun" ' - 'Label8 + 'lblResultsTractionOn ' - Me.Label8.AutoSize = true - Me.Label8.Location = New System.Drawing.Point(308, 435) - Me.Label8.Name = "Label8" - Me.Label8.Size = New System.Drawing.Size(98, 13) - Me.Label8.TabIndex = 14 - Me.Label8.Text = "Results TractionOn" + Me.lblResultsTractionOn.AutoSize = true + Me.lblResultsTractionOn.Location = New System.Drawing.Point(308, 435) + Me.lblResultsTractionOn.Name = "lblResultsTractionOn" + Me.lblResultsTractionOn.Size = New System.Drawing.Size(98, 13) + Me.lblResultsTractionOn.TabIndex = 14 + Me.lblResultsTractionOn.Text = "Results TractionOn" ' - 'Label7 + 'lblResultsIdle ' - Me.Label7.AutoSize = true - Me.Label7.Location = New System.Drawing.Point(38, 435) - Me.Label7.Name = "Label7" - Me.Label7.Size = New System.Drawing.Size(62, 13) - Me.Label7.TabIndex = 13 - Me.Label7.Text = "Results Idle" + Me.lblResultsIdle.AutoSize = true + Me.lblResultsIdle.Location = New System.Drawing.Point(38, 435) + Me.lblResultsIdle.Name = "lblResultsIdle" + Me.lblResultsIdle.Size = New System.Drawing.Size(62, 13) + Me.lblResultsIdle.TabIndex = 13 + Me.lblResultsIdle.Text = "Results Idle" ' 'chkSmartElectricals ' @@ -426,47 +444,44 @@ Partial Class Dashboard Me.chkSmartElectricals.Text = "SmartElectricals" Me.chkSmartElectricals.UseVisualStyleBackColor = true ' - 'Label6 + 'lblElectricalConsumables ' - Me.Label6.AutoSize = true - Me.Label6.Location = New System.Drawing.Point(34, 154) - Me.Label6.Name = "Label6" - Me.Label6.Size = New System.Drawing.Size(116, 13) - Me.Label6.TabIndex = 11 - Me.Label6.Text = "Electrical Consumables" + Me.lblElectricalConsumables.AutoSize = true + Me.lblElectricalConsumables.Location = New System.Drawing.Point(34, 154) + Me.lblElectricalConsumables.Name = "lblElectricalConsumables" + Me.lblElectricalConsumables.Size = New System.Drawing.Size(116, 13) + Me.lblElectricalConsumables.TabIndex = 11 + Me.lblElectricalConsumables.Text = "Electrical Consumables" ' 'gvElectricalConsumables ' - Me.gvElectricalConsumables.AllowUserToOrderColumns = true - Me.gvElectricalConsumables.AutoGenerateColumns = false - DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gvElectricalConsumables.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle10 + DataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle22.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvElectricalConsumables.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle22 Me.gvElectricalConsumables.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - Me.gvElectricalConsumables.DataSource = Me.brcElecConsumers - DataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle11.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.gvElectricalConsumables.DefaultCellStyle = DataGridViewCellStyle11 + DataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle23.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.gvElectricalConsumables.DefaultCellStyle = DataGridViewCellStyle23 Me.gvElectricalConsumables.Location = New System.Drawing.Point(33, 170) Me.gvElectricalConsumables.Name = "gvElectricalConsumables" - DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle12.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - DataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gvElectricalConsumables.RowHeadersDefaultCellStyle = DataGridViewCellStyle12 + DataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle24.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle24.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + DataGridViewCellStyle24.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle24.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle24.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gvElectricalConsumables.RowHeadersDefaultCellStyle = DataGridViewCellStyle24 Me.gvElectricalConsumables.Size = New System.Drawing.Size(803, 250) Me.gvElectricalConsumables.TabIndex = 10 ' @@ -498,41 +513,41 @@ Partial Class Dashboard Me.txtPowernetVoltage.Size = New System.Drawing.Size(100, 20) Me.txtPowernetVoltage.TabIndex = 2 ' - 'labelDoorActuationTimeSeconds + 'lblDoorActuationTimeSeconds ' - Me.labelDoorActuationTimeSeconds.AutoSize = true - Me.labelDoorActuationTimeSeconds.Location = New System.Drawing.Point(30, 101) - Me.labelDoorActuationTimeSeconds.Name = "labelDoorActuationTimeSeconds" - Me.labelDoorActuationTimeSeconds.Size = New System.Drawing.Size(111, 13) - Me.labelDoorActuationTimeSeconds.TabIndex = 8 - Me.labelDoorActuationTimeSeconds.Text = "DoorActuationTime(S)" + Me.lblDoorActuationTimeSeconds.AutoSize = true + Me.lblDoorActuationTimeSeconds.Location = New System.Drawing.Point(30, 101) + Me.lblDoorActuationTimeSeconds.Name = "lblDoorActuationTimeSeconds" + Me.lblDoorActuationTimeSeconds.Size = New System.Drawing.Size(111, 13) + Me.lblDoorActuationTimeSeconds.TabIndex = 8 + Me.lblDoorActuationTimeSeconds.Text = "DoorActuationTime(S)" ' - 'Label5 + 'lblAlternatorGearEfficiency ' - Me.Label5.AutoSize = true - Me.Label5.Location = New System.Drawing.Point(30, 73) - Me.Label5.Name = "Label5" - Me.Label5.Size = New System.Drawing.Size(121, 13) - Me.Label5.TabIndex = 7 - Me.Label5.Text = "AlternatorGearEfficiency" + Me.lblAlternatorGearEfficiency.AutoSize = true + Me.lblAlternatorGearEfficiency.Location = New System.Drawing.Point(30, 73) + Me.lblAlternatorGearEfficiency.Name = "lblAlternatorGearEfficiency" + Me.lblAlternatorGearEfficiency.Size = New System.Drawing.Size(121, 13) + Me.lblAlternatorGearEfficiency.TabIndex = 7 + Me.lblAlternatorGearEfficiency.Text = "AlternatorGearEfficiency" ' - 'Label4 + 'lblAlternatormapPath ' - Me.Label4.AutoSize = true - Me.Label4.Location = New System.Drawing.Point(30, 47) - Me.Label4.Name = "Label4" - Me.Label4.Size = New System.Drawing.Size(73, 13) - Me.Label4.TabIndex = 5 - Me.Label4.Text = "AlternatorMap" + Me.lblAlternatormapPath.AutoSize = true + Me.lblAlternatormapPath.Location = New System.Drawing.Point(30, 47) + Me.lblAlternatormapPath.Name = "lblAlternatormapPath" + Me.lblAlternatormapPath.Size = New System.Drawing.Size(73, 13) + Me.lblAlternatormapPath.TabIndex = 5 + Me.lblAlternatormapPath.Text = "AlternatorMap" ' - 'Label1 + 'lblPowerNetVoltage ' - Me.Label1.AutoSize = true - Me.Label1.Location = New System.Drawing.Point(30, 18) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(88, 13) - Me.Label1.TabIndex = 3 - Me.Label1.Text = "PowernetVoltage" + Me.lblPowerNetVoltage.AutoSize = true + Me.lblPowerNetVoltage.Location = New System.Drawing.Point(30, 18) + Me.lblPowerNetVoltage.Name = "lblPowerNetVoltage" + Me.lblPowerNetVoltage.Size = New System.Drawing.Size(88, 13) + Me.lblPowerNetVoltage.TabIndex = 3 + Me.lblPowerNetVoltage.Text = "PowernetVoltage" ' 'tabPneumaticConfig ' @@ -549,7 +564,7 @@ Partial Class Dashboard ' Me.pnlPneumaticsUserInput.Controls.Add(Me.Button1) Me.pnlPneumaticsUserInput.Controls.Add(Me.btnCompressorMap) - Me.pnlPneumaticsUserInput.Controls.Add(Me.Label10) + Me.pnlPneumaticsUserInput.Controls.Add(Me.lblPneumaticsVariablesTitle) Me.pnlPneumaticsUserInput.Controls.Add(Me.lblCompressorType) Me.pnlPneumaticsUserInput.Controls.Add(Me.lblActuationsMap) Me.pnlPneumaticsUserInput.Controls.Add(Me.chkSmartAirCompression) @@ -597,16 +612,16 @@ Partial Class Dashboard Me.btnCompressorMap.Text = ". . ." Me.btnCompressorMap.UseVisualStyleBackColor = true ' - 'Label10 + 'lblPneumaticsVariablesTitle ' - Me.Label10.AutoSize = true - Me.Label10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.Label10.ForeColor = System.Drawing.SystemColors.MenuHighlight - Me.Label10.Location = New System.Drawing.Point(20, 18) - Me.Label10.Name = "Label10" - Me.Label10.Size = New System.Drawing.Size(122, 13) - Me.Label10.TabIndex = 52 - Me.Label10.Text = "Pneumatic Variables" + Me.lblPneumaticsVariablesTitle.AutoSize = true + Me.lblPneumaticsVariablesTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + Me.lblPneumaticsVariablesTitle.ForeColor = System.Drawing.SystemColors.MenuHighlight + Me.lblPneumaticsVariablesTitle.Location = New System.Drawing.Point(20, 18) + Me.lblPneumaticsVariablesTitle.Name = "lblPneumaticsVariablesTitle" + Me.lblPneumaticsVariablesTitle.Size = New System.Drawing.Size(122, 13) + Me.lblPneumaticsVariablesTitle.TabIndex = 52 + Me.lblPneumaticsVariablesTitle.Text = "Pneumatic Variables" ' 'lblCompressorType ' @@ -688,7 +703,6 @@ Partial Class Dashboard ' 'txtKneelingHeightMillimeters ' - Me.ErrorProvider.SetError(Me.txtKneelingHeightMillimeters, "Non negative number") Me.txtKneelingHeightMillimeters.Location = New System.Drawing.Point(156, 344) Me.txtKneelingHeightMillimeters.Name = "txtKneelingHeightMillimeters" Me.txtKneelingHeightMillimeters.Size = New System.Drawing.Size(120, 20) @@ -723,7 +737,6 @@ Partial Class Dashboard ' 'cboCompressorType ' - Me.ErrorProvider.SetError(Me.cboCompressorType, "Select Compressor Type") Me.cboCompressorType.FormattingEnabled = true Me.cboCompressorType.Items.AddRange(New Object() {"<Select>", "CompressorType1", "CompressorType2", "CompressorType3"}) Me.cboCompressorType.Location = New System.Drawing.Point(156, 57) @@ -733,7 +746,6 @@ Partial Class Dashboard ' 'txtCompressorMap ' - Me.ErrorProvider.SetError(Me.txtCompressorMap, "Valid File Path") Me.txtCompressorMap.Location = New System.Drawing.Point(156, 94) Me.txtCompressorMap.Name = "txtCompressorMap" Me.txtCompressorMap.Size = New System.Drawing.Size(275, 20) @@ -750,7 +762,6 @@ Partial Class Dashboard ' 'txtCompressorGearRatio ' - Me.ErrorProvider.SetError(Me.txtCompressorGearRatio, "Non negative number") Me.txtCompressorGearRatio.ForeColor = System.Drawing.Color.Black Me.txtCompressorGearRatio.Location = New System.Drawing.Point(156, 139) Me.txtCompressorGearRatio.Name = "txtCompressorGearRatio" @@ -768,7 +779,6 @@ Partial Class Dashboard ' 'txtCompressorGearEfficiency ' - Me.ErrorProvider.SetError(Me.txtCompressorGearEfficiency, "Number between 0 and 1") Me.txtCompressorGearEfficiency.Location = New System.Drawing.Point(156, 183) Me.txtCompressorGearEfficiency.Name = "txtCompressorGearEfficiency" Me.txtCompressorGearEfficiency.Size = New System.Drawing.Size(121, 20) @@ -821,7 +831,6 @@ Partial Class Dashboard ' 'txtActuationsMap ' - Me.ErrorProvider.SetError(Me.txtActuationsMap, "Valid File Path") Me.txtActuationsMap.Location = New System.Drawing.Point(156, 389) Me.txtActuationsMap.Name = "txtActuationsMap" Me.txtActuationsMap.Size = New System.Drawing.Size(275, 20) @@ -992,7 +1001,6 @@ Partial Class Dashboard ' 'txtAdBlueNIperMinute ' - Me.ErrorProvider.SetError(Me.txtAdBlueNIperMinute, "Non negative number") Me.txtAdBlueNIperMinute.Location = New System.Drawing.Point(242, 57) Me.txtAdBlueNIperMinute.Name = "txtAdBlueNIperMinute" Me.txtAdBlueNIperMinute.Size = New System.Drawing.Size(100, 20) @@ -1000,7 +1008,6 @@ Partial Class Dashboard ' 'txtAirControlledSuspensionNIperMinute ' - Me.ErrorProvider.SetError(Me.txtAirControlledSuspensionNIperMinute, "Non negative number") Me.txtAirControlledSuspensionNIperMinute.Location = New System.Drawing.Point(242, 98) Me.txtAirControlledSuspensionNIperMinute.Name = "txtAirControlledSuspensionNIperMinute" Me.txtAirControlledSuspensionNIperMinute.Size = New System.Drawing.Size(100, 20) @@ -1008,7 +1015,6 @@ Partial Class Dashboard ' 'txtBrakingNoRetarderNIperKG ' - Me.ErrorProvider.SetError(Me.txtBrakingNoRetarderNIperKG, "Non negative number") Me.txtBrakingNoRetarderNIperKG.Location = New System.Drawing.Point(242, 139) Me.txtBrakingNoRetarderNIperKG.Name = "txtBrakingNoRetarderNIperKG" Me.txtBrakingNoRetarderNIperKG.Size = New System.Drawing.Size(100, 20) @@ -1016,7 +1022,6 @@ Partial Class Dashboard ' 'txtBrakingWithRetarderNIperKG ' - Me.ErrorProvider.SetError(Me.txtBrakingWithRetarderNIperKG, "Non negative number") Me.txtBrakingWithRetarderNIperKG.Location = New System.Drawing.Point(242, 183) Me.txtBrakingWithRetarderNIperKG.Name = "txtBrakingWithRetarderNIperKG" Me.txtBrakingWithRetarderNIperKG.Size = New System.Drawing.Size(100, 20) @@ -1024,7 +1029,6 @@ Partial Class Dashboard ' 'txtBreakingPerKneelingNIperKGinMM ' - Me.ErrorProvider.SetError(Me.txtBreakingPerKneelingNIperKGinMM, "Non negative number") Me.txtBreakingPerKneelingNIperKGinMM.Location = New System.Drawing.Point(242, 221) Me.txtBreakingPerKneelingNIperKGinMM.Name = "txtBreakingPerKneelingNIperKGinMM" Me.txtBreakingPerKneelingNIperKGinMM.Size = New System.Drawing.Size(100, 20) @@ -1032,7 +1036,6 @@ Partial Class Dashboard ' 'txtDeadVolBlowOutsPerLitresperHour ' - Me.ErrorProvider.SetError(Me.txtDeadVolBlowOutsPerLitresperHour, "Non negative number") Me.txtDeadVolBlowOutsPerLitresperHour.Location = New System.Drawing.Point(242, 262) Me.txtDeadVolBlowOutsPerLitresperHour.Name = "txtDeadVolBlowOutsPerLitresperHour" Me.txtDeadVolBlowOutsPerLitresperHour.Size = New System.Drawing.Size(100, 20) @@ -1040,7 +1043,6 @@ Partial Class Dashboard ' 'txtDeadVolumeLitres ' - Me.ErrorProvider.SetError(Me.txtDeadVolumeLitres, "Non negative number") Me.txtDeadVolumeLitres.Location = New System.Drawing.Point(242, 303) Me.txtDeadVolumeLitres.Name = "txtDeadVolumeLitres" Me.txtDeadVolumeLitres.Size = New System.Drawing.Size(100, 20) @@ -1048,7 +1050,6 @@ Partial Class Dashboard ' 'txtNonSmartRegenFractionTotalAirDemand ' - Me.ErrorProvider.SetError(Me.txtNonSmartRegenFractionTotalAirDemand, "Non negative number") Me.txtNonSmartRegenFractionTotalAirDemand.Location = New System.Drawing.Point(242, 344) Me.txtNonSmartRegenFractionTotalAirDemand.Name = "txtNonSmartRegenFractionTotalAirDemand" Me.txtNonSmartRegenFractionTotalAirDemand.Size = New System.Drawing.Size(100, 20) @@ -1056,7 +1057,6 @@ Partial Class Dashboard ' 'txtOverrunUtilisationForCompressionFraction ' - Me.ErrorProvider.SetError(Me.txtOverrunUtilisationForCompressionFraction, "Non negative number") Me.txtOverrunUtilisationForCompressionFraction.Location = New System.Drawing.Point(242, 385) Me.txtOverrunUtilisationForCompressionFraction.Name = "txtOverrunUtilisationForCompressionFraction" Me.txtOverrunUtilisationForCompressionFraction.Size = New System.Drawing.Size(100, 20) @@ -1064,7 +1064,6 @@ Partial Class Dashboard ' 'txtPerDoorOpeningNI ' - Me.ErrorProvider.SetError(Me.txtPerDoorOpeningNI, "Non negative number") Me.txtPerDoorOpeningNI.Location = New System.Drawing.Point(242, 426) Me.txtPerDoorOpeningNI.Name = "txtPerDoorOpeningNI" Me.txtPerDoorOpeningNI.Size = New System.Drawing.Size(100, 20) @@ -1072,7 +1071,6 @@ Partial Class Dashboard ' 'txtPerStopBrakeActuationNIperKG ' - Me.ErrorProvider.SetError(Me.txtPerStopBrakeActuationNIperKG, "Non negative number") Me.txtPerStopBrakeActuationNIperKG.Location = New System.Drawing.Point(242, 467) Me.txtPerStopBrakeActuationNIperKG.Name = "txtPerStopBrakeActuationNIperKG" Me.txtPerStopBrakeActuationNIperKG.Size = New System.Drawing.Size(100, 20) @@ -1080,7 +1078,6 @@ Partial Class Dashboard ' 'txtSmartRegenFractionTotalAirDemand ' - Me.ErrorProvider.SetError(Me.txtSmartRegenFractionTotalAirDemand, "Non negative number") Me.txtSmartRegenFractionTotalAirDemand.Location = New System.Drawing.Point(242, 508) Me.txtSmartRegenFractionTotalAirDemand.Name = "txtSmartRegenFractionTotalAirDemand" Me.txtSmartRegenFractionTotalAirDemand.Size = New System.Drawing.Size(100, 20) @@ -1088,6 +1085,13 @@ Partial Class Dashboard ' 'tabHVACConfig ' + Me.tabHVACConfig.Controls.Add(Me.lblHVACTitle) + Me.tabHVACConfig.Controls.Add(Me.txtHVACFuellingLitresPerHour) + Me.tabHVACConfig.Controls.Add(Me.lblHVACFuellingLitresPerHour) + Me.tabHVACConfig.Controls.Add(Me.txtHVACMechanicalLoadPowerWatts) + Me.tabHVACConfig.Controls.Add(Me.lblHVACMechanicalLoadPowerWatts) + Me.tabHVACConfig.Controls.Add(Me.txtHVACElectricalLoadPowerWatts) + Me.tabHVACConfig.Controls.Add(Me.lblHVACElectricalLoadPowerWatts) Me.tabHVACConfig.Location = New System.Drawing.Point(4, 22) Me.tabHVACConfig.Name = "tabHVACConfig" Me.tabHVACConfig.Size = New System.Drawing.Size(909, 610) @@ -1095,6 +1099,54 @@ Partial Class Dashboard Me.tabHVACConfig.Text = "HVACConfig" Me.tabHVACConfig.UseVisualStyleBackColor = true ' + 'txtHVACFuellingLitresPerHour + ' + Me.txtHVACFuellingLitresPerHour.Location = New System.Drawing.Point(192, 189) + Me.txtHVACFuellingLitresPerHour.Name = "txtHVACFuellingLitresPerHour" + Me.txtHVACFuellingLitresPerHour.Size = New System.Drawing.Size(100, 20) + Me.txtHVACFuellingLitresPerHour.TabIndex = 5 + ' + 'lblHVACFuellingLitresPerHour + ' + Me.lblHVACFuellingLitresPerHour.AutoSize = true + Me.lblHVACFuellingLitresPerHour.Location = New System.Drawing.Point(31, 193) + Me.lblHVACFuellingLitresPerHour.Name = "lblHVACFuellingLitresPerHour" + Me.lblHVACFuellingLitresPerHour.Size = New System.Drawing.Size(116, 13) + Me.lblHVACFuellingLitresPerHour.TabIndex = 4 + Me.lblHVACFuellingLitresPerHour.Text = "Fuelling Litres Per Hour" + ' + 'txtHVACMechanicalLoadPowerWatts + ' + Me.txtHVACMechanicalLoadPowerWatts.Location = New System.Drawing.Point(192, 137) + Me.txtHVACMechanicalLoadPowerWatts.Name = "txtHVACMechanicalLoadPowerWatts" + Me.txtHVACMechanicalLoadPowerWatts.Size = New System.Drawing.Size(100, 20) + Me.txtHVACMechanicalLoadPowerWatts.TabIndex = 3 + ' + 'lblHVACMechanicalLoadPowerWatts + ' + Me.lblHVACMechanicalLoadPowerWatts.AutoSize = true + Me.lblHVACMechanicalLoadPowerWatts.Location = New System.Drawing.Point(31, 141) + Me.lblHVACMechanicalLoadPowerWatts.Name = "lblHVACMechanicalLoadPowerWatts" + Me.lblHVACMechanicalLoadPowerWatts.Size = New System.Drawing.Size(153, 13) + Me.lblHVACMechanicalLoadPowerWatts.TabIndex = 2 + Me.lblHVACMechanicalLoadPowerWatts.Text = "Mechanical Load Power Watts" + ' + 'txtHVACElectricalLoadPowerWatts + ' + Me.txtHVACElectricalLoadPowerWatts.Location = New System.Drawing.Point(192, 85) + Me.txtHVACElectricalLoadPowerWatts.Name = "txtHVACElectricalLoadPowerWatts" + Me.txtHVACElectricalLoadPowerWatts.Size = New System.Drawing.Size(100, 20) + Me.txtHVACElectricalLoadPowerWatts.TabIndex = 1 + ' + 'lblHVACElectricalLoadPowerWatts + ' + Me.lblHVACElectricalLoadPowerWatts.AutoSize = true + Me.lblHVACElectricalLoadPowerWatts.Location = New System.Drawing.Point(31, 89) + Me.lblHVACElectricalLoadPowerWatts.Name = "lblHVACElectricalLoadPowerWatts" + Me.lblHVACElectricalLoadPowerWatts.Size = New System.Drawing.Size(141, 13) + Me.lblHVACElectricalLoadPowerWatts.TabIndex = 0 + Me.lblHVACElectricalLoadPowerWatts.Text = "Electrical Load Power Watts" + ' 'tabPlayground ' Me.tabPlayground.Location = New System.Drawing.Point(4, 22) @@ -1104,16 +1156,6 @@ Partial Class Dashboard Me.tabPlayground.Text = "Playground" Me.tabPlayground.UseVisualStyleBackColor = true ' - 'TabPage1 - ' - Me.TabPage1.Location = New System.Drawing.Point(4, 22) - Me.TabPage1.Name = "TabPage1" - Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) - Me.TabPage1.Size = New System.Drawing.Size(909, 610) - Me.TabPage1.TabIndex = 5 - Me.TabPage1.Text = "TabPage1" - Me.TabPage1.UseVisualStyleBackColor = true - ' 'resultCardContextMenu ' Me.resultCardContextMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DeleteToolStripMenuItem}) @@ -1130,16 +1172,28 @@ Partial Class Dashboard ' Me.ErrorProvider.ContainerControl = Me ' + 'lblHVACTitle + ' + Me.lblHVACTitle.AutoSize = true + Me.lblHVACTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + Me.lblHVACTitle.ForeColor = System.Drawing.SystemColors.MenuHighlight + Me.lblHVACTitle.Location = New System.Drawing.Point(31, 37) + Me.lblHVACTitle.Name = "lblHVACTitle" + Me.lblHVACTitle.Size = New System.Drawing.Size(164, 13) + Me.lblHVACTitle.TabIndex = 25 + Me.lblHVACTitle.Text = "Steady State Output Values" + ' 'Dashboard ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange Me.ClientSize = New System.Drawing.Size(945, 712) - Me.Controls.Add(Me.Panel1) + Me.Controls.Add(Me.pnlMain) Me.Name = "Dashboard" Me.Text = "Dashboard" CType(Me.brcElecConsumers,System.ComponentModel.ISupportInitialize).EndInit - Me.Panel1.ResumeLayout(false) + Me.pnlMain.ResumeLayout(false) Me.tabMain.ResumeLayout(false) Me.tabGeneralConfig.ResumeLayout(false) Me.tabGeneralConfig.PerformLayout @@ -1154,12 +1208,14 @@ Partial Class Dashboard Me.pnlPneumaticsUserInput.PerformLayout Me.pnlPneumaticAuxillaries.ResumeLayout(false) Me.pnlPneumaticAuxillaries.PerformLayout + Me.tabHVACConfig.ResumeLayout(false) + Me.tabHVACConfig.PerformLayout Me.resultCardContextMenu.ResumeLayout(false) CType(Me.ErrorProvider,System.ComponentModel.ISupportInitialize).EndInit Me.ResumeLayout(false) End Sub - Friend WithEvents Panel1 As System.Windows.Forms.Panel + Friend WithEvents pnlMain As System.Windows.Forms.Panel Friend WithEvents btnCancel As System.Windows.Forms.Button Friend WithEvents btnFinish As System.Windows.Forms.Button Friend WithEvents btnForward As System.Windows.Forms.Button @@ -1172,32 +1228,31 @@ End Sub Friend WithEvents tabMain As System.Windows.Forms.TabControl Friend WithEvents tabGeneralConfig As System.Windows.Forms.TabPage Friend WithEvents cboCycle As System.Windows.Forms.ComboBox - Friend WithEvents Label3 As System.Windows.Forms.Label - Friend WithEvents Label2 As System.Windows.Forms.Label + Friend WithEvents lblCycle As System.Windows.Forms.Label + Friend WithEvents lblVehiceWeight As System.Windows.Forms.Label Friend WithEvents txtVehicleWeightKG As System.Windows.Forms.TextBox Friend WithEvents tabElectricalConfig As System.Windows.Forms.TabPage Friend WithEvents gvResultsCardOverrun As System.Windows.Forms.DataGridView Friend WithEvents gvResultsCardTraction As System.Windows.Forms.DataGridView - Public WithEvents gvResultsCardIdle As System.Windows.Forms.DataGridView - Friend WithEvents Label9 As System.Windows.Forms.Label - Friend WithEvents Label8 As System.Windows.Forms.Label - Friend WithEvents Label7 As System.Windows.Forms.Label + Friend WithEvents lblResultsOverrun As System.Windows.Forms.Label + Friend WithEvents lblResultsTractionOn As System.Windows.Forms.Label + Friend WithEvents lblResultsIdle As System.Windows.Forms.Label Friend WithEvents chkSmartElectricals As System.Windows.Forms.CheckBox - Friend WithEvents Label6 As System.Windows.Forms.Label + Friend WithEvents lblElectricalConsumables As System.Windows.Forms.Label Friend WithEvents gvElectricalConsumables As System.Windows.Forms.DataGridView Friend WithEvents txtDoorActuationTimeSeconds As System.Windows.Forms.TextBox Friend WithEvents txtAlternatorGearEfficiency As System.Windows.Forms.TextBox Friend WithEvents txtAlternatorMapPath As System.Windows.Forms.TextBox Friend WithEvents txtPowernetVoltage As System.Windows.Forms.TextBox - Friend WithEvents labelDoorActuationTimeSeconds As System.Windows.Forms.Label - Friend WithEvents Label5 As System.Windows.Forms.Label - Friend WithEvents Label4 As System.Windows.Forms.Label - Friend WithEvents Label1 As System.Windows.Forms.Label + Friend WithEvents lblDoorActuationTimeSeconds As System.Windows.Forms.Label + Friend WithEvents lblAlternatorGearEfficiency As System.Windows.Forms.Label + Friend WithEvents lblAlternatormapPath As System.Windows.Forms.Label + Friend WithEvents lblPowerNetVoltage As System.Windows.Forms.Label Friend WithEvents tabPneumaticConfig As System.Windows.Forms.TabPage Friend WithEvents pnlPneumaticsUserInput As System.Windows.Forms.Panel Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents btnCompressorMap As System.Windows.Forms.Button - Friend WithEvents Label10 As System.Windows.Forms.Label + Friend WithEvents lblPneumaticsVariablesTitle As System.Windows.Forms.Label Friend WithEvents lblCompressorType As System.Windows.Forms.Label Friend WithEvents lblActuationsMap As System.Windows.Forms.Label Friend WithEvents chkSmartAirCompression As System.Windows.Forms.CheckBox @@ -1250,5 +1305,13 @@ End Sub Friend WithEvents txtSmartRegenFractionTotalAirDemand As System.Windows.Forms.TextBox Friend WithEvents tabHVACConfig As System.Windows.Forms.TabPage Friend WithEvents tabPlayground As System.Windows.Forms.TabPage - Friend WithEvents TabPage1 As System.Windows.Forms.TabPage + Friend WithEvents btnAlternatorMapPath As System.Windows.Forms.Button + Friend WithEvents gvResultsCardIdle As System.Windows.Forms.DataGridView + Friend WithEvents txtHVACFuellingLitresPerHour As System.Windows.Forms.TextBox + Friend WithEvents lblHVACFuellingLitresPerHour As System.Windows.Forms.Label + Friend WithEvents txtHVACMechanicalLoadPowerWatts As System.Windows.Forms.TextBox + Friend WithEvents lblHVACMechanicalLoadPowerWatts As System.Windows.Forms.Label + Friend WithEvents txtHVACElectricalLoadPowerWatts As System.Windows.Forms.TextBox + Friend WithEvents lblHVACElectricalLoadPowerWatts As System.Windows.Forms.Label + Friend WithEvents lblHVACTitle As System.Windows.Forms.Label End Class diff --git a/AuxillaryTestHarness/Dashboard.resx b/AuxillaryTestHarness/Dashboard.resx index 31f2c39b985e97532870a48af86797160674b0cd..4fdb660ffaf4b4eb642fb348c13a784ee7b62fd1 100644 --- a/AuxillaryTestHarness/Dashboard.resx +++ b/AuxillaryTestHarness/Dashboard.resx @@ -120,13 +120,13 @@ <metadata name="brcElecConsumers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> + <metadata name="resultCardContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>362, 19</value> + </metadata> <metadata name="ErrorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>168, 17</value> </metadata> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>82</value> </metadata> - <metadata name="resultCardContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>362, 19</value> - </metadata> </root> \ No newline at end of file diff --git a/AuxillaryTestHarness/Dashboard.vb b/AuxillaryTestHarness/Dashboard.vb index be7b6d8f7962b42f29eaedda40827b538a9a2199..9e2b4f9e0d4a022e05247d9f562f3933bbbbe84a 100644 --- a/AuxillaryTestHarness/Dashboard.vb +++ b/AuxillaryTestHarness/Dashboard.vb @@ -5,27 +5,13 @@ Imports System.ComponentModel Public Class Dashboard -Public auxEnvironment As New AuxillaryEnvironment("") - -Private Sub Dashboard_Load(sender As Object, e As EventArgs) Handles MyBase.Load - -cboCycle.SelectedIndex = 0 - - SetupControls() - - CreateBindings() - - 'Validate Pneumatics - - - ' ValidateChildren(True) - +#Region "Fields" -End Sub +Public auxEnvironment As New AuxillaryEnvironment("") +private TabColors As Dictionary( Of TabPage, Color) = new Dictionary( Of TabPage, Color) () -Private Sub cboCycle_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboCycle.SelectedIndexChanged +#End Region -End Sub Private Sub SetupControls() @@ -117,6 +103,8 @@ Private Sub SetupControls() End Sub +#Region "Binding Control" + Private Sub CreateBindings() 'AuxEnvironment.Vecto Bindings @@ -159,11 +147,12 @@ Private Sub CreateBindings() 'Pneumatic Auxillaries Binding - txtAdBlueNIperMinute.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"AdBlueNIperMinute") + txtAdBlueNIperMinute.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"AdBlueNIperMinute") + txtOverrunUtilisationForCompressionFraction.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"OverrunUtilisationForCompressionFraction") txtBrakingWithRetarderNIperKG.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"BrakingWithRetarderNIperKG") txtBrakingNoRetarderNIperKG.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"BrakingNoRetarderNIperKG") - txtBreakingPerKneelingNIperKGinMM.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"BreakingPerKneelingNIperKGinMM") + txtBreakingPerKneelingNIperKGinMM.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"BreakingPerKneelingNIperKGinMM",true,DataSourceUpdateMode.OnPropertyChanged,nothing,"0.########") txtPerDoorOpeningNI.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"PerDoorOpeningNI") txtPerStopBrakeActuationNIperKG.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"PerStopBrakeActuationNIperKG") txtAirControlledSuspensionNIperMinute.DataBindings.Add("Text",auxEnvironment.PneumaticAuxillariesConfig,"AirControlledSuspensionNIperMinute") @@ -188,136 +177,102 @@ Private Sub CreateBindings() End Sub +Private Sub EnsureBinding() + With tabMain + Dim lastSelectedTabIndex As Integer = .SelectedIndex + If lastSelectedTabIndex < 0 OrElse lastSelectedTabIndex > .TabCount Then lastSelectedTabIndex = 0 + For currentTab As Integer = 0 To .TabCount - 1 + .SelectedIndex = currentTab + Next + .SelectedIndex = 0 + End With + End Sub -Private Sub gvElectricalConsumables_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles gvElectricalConsumables.CellEndEdit - -End Sub - - -Private Sub gvElectricalConsumables_CellValidating(sender As Object, e As DataGridViewCellValidatingEventArgs) Handles gvElectricalConsumables.CellValidating - - Dim column As DataGridViewColumn = gvElectricalConsumables.Columns(e.ColumnIndex) - Dim s As Single - - If column.ReadOnly Then return - - - - Select Case column.Name - - Case "NominalConsumptionAmps" - If Not IsNumeric(e.FormattedValue) Then - MessageBox.Show("This value must be numeric") - e.Cancel=true - End if - - Case "NumberInActualVehicle" - If Not IsNumeric(e.FormattedValue) Then - MessageBox.Show("This value must be numeric") - e.Cancel=true - Else - s = Single.Parse(e.FormattedValue) - End If - If s Mod 1 > 0 OrElse s < 0 Then - MessageBox.Show("This value must be a positive whole number ( Integer ) ") - e.Cancel=true - End If - - - Case "PhaseIdle_TractionOn" - If Not IsNumeric(e.FormattedValue) Then - MessageBox.Show("This value must be numeric") - e.Cancel=true - Else - s = Single.Parse(e.FormattedValue) - End If - If s < 0 OrElse s > 1 Then - MessageBox.Show("This must be a value between 0 and 1 ") - e.Cancel=true - End If - - - End Select -End Sub +#End Region -Private Sub SmartResult_CellValidating( sender As Object, e As DataGridViewCellValidatingEventArgs) Handles gvResultsCardIdle.CellValidating +'Validation - Dim column As DataGridViewColumn = gvElectricalConsumables.Columns(e.ColumnIndex) +#Region "Validation Helpers" - If Not IsNumeric(e.FormattedValue) Then - MessageBox.Show("This value must be numeric") - e.Cancel=true - End If -End Sub +Public Function IsPostiveNumber(byval test As string)As boolean + 'Is this numeric sanity check. + If Not IsNumeric(test) then Return False -private sub resultCard_CellMouseUp( sender As Object, e as DataGridViewCellMouseEventArgs) Handles gvResultsCardIdle.CellMouseUp, gvResultsCardTraction.CellMouseUp, gvResultsCardOverrun.CellMouseUp - - Dim dgv As DataGridView = CType( sender, DataGridView) + Dim number As Single + If Not Single.TryParse( test, number) then Return false - if e.Button = MouseButtons.Right then + If number<=0 then Return False + - resultCardContextMenu.Show(dgv, e.Location) - resultCardContextMenu.Show(Cursor.Position) + Return true + +End Function - End if +Public Function IsZeroOrPostiveNumber(byval test As string)As boolean + 'Is this numeric sanity check. + If Not IsNumeric(test) then Return False - end sub + Dim number As Single + If Not Single.TryParse( test, number) then Return false -Private Sub resultCardContextMenu_ItemClicked( sender As Object, e As ToolStripItemClickedEventArgs) Handles resultCardContextMenu.ItemClicked + If number<0 then Return False + - Dim menu As ContextMenuStrip = CType( sender, ContextMenuStrip) + Return true + +End Function - Dim grid as DataGridView = DirectCast( menu.SourceControl, DataGridView) +Public Function IsNumberBetweenZeroandOne( test As String ) - Select Case e.ClickedItem.Text + 'Is this numeric sanity check. + If Not IsNumeric(test) then Return False + Dim number As Single - Case "Delete" + If Not Single.TryParse( test, number) then Return false - For Each selectedRow As datagridviewrow In grid.SelectedRows + If number<0 orelse number >1 then Return False - If Not selectedRow.IsNewRow then - - grid.Rows.RemoveAt(selectedRow.Index) - - End if - - Next + Return True + +End Function - case "Insert" +Public Function IsIntegerZeroOrPositiveNumber( test As string) + 'Is this numeric sanity check. + If Not IsNumeric(test) then Return False - End Select - + 'if not integer then return false + Dim number As integer + If Not integer.TryParse( test, number) then Return false + If number<0 then Return False + Return True +End Function +#End Region -End Sub +#REgion "Validation Control" '****** PNEUMATIC VALIDATION +public sub Validating_PneumaticHandler( sender as Object, e As CancelEventArgs ) Handles txtAdBlueNIperMinute.Validating, txtBrakingWithRetarderNIperKG.Validating, txtBrakingNoRetarderNIperKG.Validating, txtAirControlledSuspensionNIperMinute.Validating, txtBreakingPerKneelingNIperKGinMM.Validating, txtSmartRegenFractionTotalAirDemand.Validating, txtPerStopBrakeActuationNIperKG.Validating, txtPerDoorOpeningNI.Validating, txtOverrunUtilisationForCompressionFraction.Validating, txtNonSmartRegenFractionTotalAirDemand.Validating, txtDeadVolumeLitres.Validating, txtDeadVolBlowOutsPerLitresperHour.Validating, txtKneelingHeightMillimeters.Validating, txtCompressorMap.Validating, txtCompressorGearRatio.Validating, txtCompressorGearEfficiency.Validating, txtActuationsMap.Validating, cboDoors.Validating, cboCompressorType.Validating, cboAirSuspensionControl.Validating, cboAdBlueDosing.Validating -public sub Validating_PneumaticHandler( sender as Object, e As CancelEventArgs ) Handles txtAdBlueNIperMinute.Validating, txtBrakingWithRetarderNIperKG.Validating, txtBrakingNoRetarderNIperKG.Validating, txtAirControlledSuspensionNIperMinute.Validating, txtBreakingPerKneelingNIperKGinMM.Validating, txtSmartRegenFractionTotalAirDemand.Validating, txtPerStopBrakeActuationNIperKG.Validating, txtPerDoorOpeningNI.Validating, txtOverrunUtilisationForCompressionFraction.Validating, txtNonSmartRegenFractionTotalAirDemand.Validating, txtDeadVolumeLitres.Validating, txtDeadVolBlowOutsPerLitresperHour.Validating, txtKneelingHeightMillimeters.Validating, txtCompressorMap.Validating, txtCompressorGearRatio.Validating, txtCompressorGearEfficiency.Validating, txtActuationsMap.Validating, cboDoors.Validating, cboCompressorType.Validating, cboAirSuspensionControl.Validating, cboAdBlueDosing.Validating - - - e.Cancel= Validate_Pneumatics() - + e.Cancel= Not Validate_Pneumatics() End Sub - - Public function Validate_Pneumatics( ) As boolean Dim result As Boolean = true @@ -454,26 +409,69 @@ Public function Validate_Pneumatics( ) As boolean result=false End Try + 'Compressor Gear Efficiency : txtCompressorGearEfficiency" + If NOT IsNumberBetweenZeroandOne(txtCompressorGearEfficiency.Text) then + errorProvider.SetError(txtCompressorGearEfficiency ,"Please enter a number between 0 and 1") + result=false + else + errorProvider.SetError(txtCompressorGearEfficiency ,String.Empty) + End If + + 'Compressor Gear Ratio : txtCompressorGearRatio + If NOT IsPostiveNumber(txtCompressorGearRatio.Text) then + errorProvider.SetError(txtCompressorGearRatio ,"Please enter a number greater than 0.") + result=false + else + errorProvider.SetError(txtCompressorGearRatio ,String.Empty) + End If - 'case "txtCompressorGearEfficiency" - 'case "txtCompressorGearRatio" + 'Actuations Map : txtActuationsMap - 'case "txtActuationsMap" + 'NOT Required but included here so readers can see this is a positive ommission + '****************************************************************************** + 'Smart Air Compression : chkSmartAirCompression + 'Smart Regeneration : chkSmartRegeneration + 'Retarder Brake : chkRetarderBrake - 'case "chkSmartAirCompression" + 'txtKneelingHeightMillimeters : txtKneelingHeightMillimeters + If NOT IsPostiveNumber(txtKneelingHeightMillimeters.Text) then + errorProvider.SetError(txtKneelingHeightMillimeters ,"Please enter a number greater than 0.") + result=false + else + errorProvider.SetError(txtKneelingHeightMillimeters ,String.Empty) + End If - 'case "chkSmartRegeneration" + 'cboAirSuspensionControl : cboAirSuspensionControl + If cboAirSuspensionControl.SelectedIndex<1 then + errorProvider.SetError(cboAirSuspensionControl ,"Please make a selection.") + result=false + else + errorProvider.SetError(cboAirSuspensionControl ,String.Empty) + End If + + 'cboAdBlueDosing : cboAdBlueDosing + If cboAdBlueDosing.SelectedIndex<1 then + errorProvider.SetError(cboAdBlueDosing ,"Please make a selection.") + result=false + else + errorProvider.SetError(cboAdBlueDosing ,String.Empty) + End if + + 'cboDoors : cboDoors + If cboDoors.SelectedIndex<1 then + errorProvider.SetError(cboDoors ,"Please make a selection.") + result=false + else + errorProvider.SetError(cboDoors ,String.Empty) + End if - 'case "chkRetarderBrake" - 'case "txtKneelingHeightMillimeters" + 'Set Tab Color - 'case "cboAirSuspensionControl" + UpdateTabStatus("tabPneumaticConfig",result) - 'case "cboAdBlueDosing" - 'case "cboDoors.DataBindings" Return result @@ -481,80 +479,306 @@ Return result End function +'***** ELECTRICAL VALIDATION +public sub Validating_ElectricsHandler( sender as Object, e As CancelEventArgs ) Handles txtPowernetVoltage.Validating, txtAlternatorMapPath.Validating, txtAlternatorGearEfficiency.Validating, txtDoorActuationTimeSeconds.Validating + + e.Cancel= Not Validate_Electrics() + +End Sub +Public function Validate_Electrics() As boolean + +Dim result As Boolean = true + + + 'Powernet Voltage : txtPowernetVoltage + If Not IsPostiveNumber(txtPowernetVoltage.Text) then + errorProvider.SetError(txtPowernetVoltage ,"Please provide a non negative number.") + result= false + Else + errorProvider.SetError(txtPowernetVoltage ,String.Empty) + End if + + + 'Alternator Map path : txtAlternatorMapPath + 'Test for empty after trim + If txtAlternatorMapPath.Text.Trim.Length=0 then + errorProvider.SetError(txtAlternatorMapPath ,"Please enter the localtion of a valid compressor map.") + result=false + else + errorProvider.SetError(txtAlternatorMapPath ,String.Empty) + End if + + 'Test File is valid + Dim alt As AlternatorMap + Try + alt = New AlternatorMap( txtAlternatorMapPath.Text) + alt.Initialise() + errorProvider.SetError(txtAlternatorMapPath ,String.Empty) + Catch ex As Exception + errorProvider.SetError(txtAlternatorMapPath ,"Error : map is invalid or cannot be found, please select a Cvalid compressor map") + result=false + End Try + + + 'Door Action Time : txtDoorActuationTimeSeconds + If Not IsPostiveNumber(txtDoorActuationTimeSeconds.Text) then + errorProvider.SetError(txtDoorActuationTimeSeconds ,"Please provide a non negative number.") + result= false + Else + errorProvider.SetError(txtDoorActuationTimeSeconds ,String.Empty) + End if + + + UpdateTabStatus("tabElectricalConfig",result) + + + Return result -Public Sub Validated_PneumaticHandler( sender As Object, e As EventArgs ) Handles txtAdBlueNIperMinute.Validating, txtAdBlueNIperMinute.Validated, txtSmartRegenFractionTotalAirDemand.Validated, txtPerStopBrakeActuationNIperKG.Validated, txtPerDoorOpeningNI.Validated, txtOverrunUtilisationForCompressionFraction.Validated, txtNonSmartRegenFractionTotalAirDemand.Validated, txtDeadVolumeLitres.Validated, txtDeadVolBlowOutsPerLitresperHour.Validated, txtBreakingPerKneelingNIperKGinMM.Validated, txtBrakingWithRetarderNIperKG.Validated, txtBrakingNoRetarderNIperKG.Validated, txtAirControlledSuspensionNIperMinute.Validated, txtKneelingHeightMillimeters.Validated, txtCompressorMap.Validated, txtCompressorGearRatio.Validated, txtCompressorGearEfficiency.Validated, txtActuationsMap.Validated, cboDoors.Validated, cboCompressorType.Validated, cboAirSuspensionControl.Validated, cboAdBlueDosing.Validated -Dim control As Control = CType( sender, Control) +End Function + +'***** HVAC VALIDATION + + +'***** IMPUTS VALIDATION + + +#End Region + + + +'Form Controls & Events + +Private Sub Dashboard_Load(sender As Object, e As EventArgs) Handles MyBase.Load + + 'Required for OwnerDraw, this is required in order to color the tabs when a validation error occurs to draw + 'The attention of the user to the fact that attention is required on a particlar tab. + TabColors.Add(tabGeneralConfig,Control.DefaultBackColor) + TabColors.Add(tabElectricalConfig,Control.DefaultBackColor) + TabColors.Add(tabPneumaticConfig,Control.DefaultBackColor) + TabColors.Add(tabHVACConfig,Control.DefaultBackColor) + TabColors.Add(tabPlayground,Control.DefaultBackColor) + + 'This is here only for testing purposes, the actual cycle will be a result of Vecto input. + cboCycle.SelectedIndex = 0 + + 'General Setup of all controls + SetupControls() + + 'Binding Values in Aux environment to the input controls on relevent tabs in the form. + CreateBindings() + + 'This function is neccesary because binding does not occur when the page is invisible, so a track across all of them + 'Is required in order to set the binding. This only needs to be done once at at setup time. after values are set in the + 'Aux environment either by setting defaults of reading and setting from the Auxillaries persistance file. + EnsureBinding() + + + 'Additional atatched events + 'For Tab Coloring, this is the place where the background will get filled on the tab when attention is required. + AddHandler tabMain.DrawItem , new System.Windows.Forms.DrawItemEventHandler(addressof tabMain_DrawItem) - errorProvider.SetError(control ,string.Empty) End Sub +#Region "Tab Header Color Change" +Private sub UpdateTabStatus( pageName as string, resultGood As Boolean) -'***** ELECTRICAL VALIDATION -'Validation helpers + Dim page As TabPage = tabMain.TabPages(pageName) -Public Function IsZeroOrPostiveNumber(byval test As string)As boolean + If Not resultGood - 'Is this numeric sanity check. - If Not IsNumeric(test) then Return False + SetTabHeader( page, Color.Red) - Dim number As Single + Else + SetTabHeader( page, Control.DefaultBackColor) - If Not Single.TryParse( test, number) then Return false + End If - If number<0 then Return False - - Return true - -End Function -Public Function IsNumberBetweenZeroandOne( test As String ) - 'Is this numeric sanity check. - If Not IsNumeric(test) then Return False +End Sub - Dim number As Single +private sub SetTabHeader( page as TabPage, color As Color) - If Not Single.TryParse( test, number) then Return false + TabColors(page) = color + tabMain.Invalidate() - If number<0 orelse number >1 then Return False +End Sub - Return True - -End Function +private sub tabMain_DrawItem( sender As object, e As DrawItemEventArgs) + dim br as Brush = New SolidBrush(TabColors(tabMain.TabPages(e.Index))) -Public Function IsIntegerZeroOrPositiveNumber( test As string) - 'Is this numeric sanity check. - If Not IsNumeric(test) then Return False + using ( br ) + + e.Graphics.FillRectangle(br, e.Bounds) + dim sz as SizeF= e.Graphics.MeasureString(tabMain.TabPages(e.Index).Text, e.Font) + e.Graphics.DrawString(tabMain.TabPages(e.Index).Text, e.Font, Brushes.Black, e.Bounds.Left + (e.Bounds.Width - sz.Width) / 2, e.Bounds.Top + (e.Bounds.Height - sz.Height) / 2 + 1) - 'if not integer then return false + Dim rect As Rectangle = e.Bounds + rect.Offset(-1,-1) + rect.Inflate(1, 1) + ' e.Graphics.DrawRectangle(Pens.DarkGray, rect) + 'e.DrawFocusRectangle() - Dim number As integer + End using - If Not integer.TryParse( test, number) then Return false - If number<0 then Return False - Return True +End Sub + + +#End Region + +#Region "GridHandlers" + + + +Private Sub gvElectricalConsumables_CellValidating(sender As Object, e As DataGridViewCellValidatingEventArgs) Handles gvElectricalConsumables.CellValidating + + Dim column As DataGridViewColumn = gvElectricalConsumables.Columns(e.ColumnIndex) + Dim s As Single + + + If e.ColumnIndex=-1 then + + e.Cancel=true + Exit sub + + End If + + + + If column.ReadOnly Then return + + + + + Select Case column.Name + + Case "NominalConsumptionAmps" + If Not IsNumeric(e.FormattedValue) Then + MessageBox.Show("This value must be numeric") + e.Cancel=true + End if + + Case "NumberInActualVehicle" + If Not IsNumeric(e.FormattedValue) Then + MessageBox.Show("This value must be numeric") + e.Cancel=true + Else + s = Single.Parse(e.FormattedValue) + End If + If s Mod 1 > 0 OrElse s < 0 Then + MessageBox.Show("This value must be a positive whole number ( Integer ) ") + e.Cancel=true + End If + + + Case "PhaseIdle_TractionOn" + If Not IsNumeric(e.FormattedValue) Then + MessageBox.Show("This value must be numeric") + e.Cancel=true + Else + s = Single.Parse(e.FormattedValue) + End If + If s < 0 OrElse s > 1 Then + MessageBox.Show("This must be a value between 0 and 1 ") + e.Cancel=true + End If + + + End Select + +End Sub -End Function +Private Sub SmartResult_CellValidating( sender As Object, e As DataGridViewCellValidatingEventArgs) Handles gvResultsCardIdle.CellValidating, gvResultsCardTraction.CellValidating, gvResultsCardOverrun.CellValidating -Private Sub tabMain_Validating( sender As Object, e As CancelEventArgs) Handles tabMain.Validating + Dim column As DataGridViewColumn = gvElectricalConsumables.Columns(e.ColumnIndex) + + If Not IsNumeric(e.FormattedValue) Then + MessageBox.Show("This value must be numeric") + e.Cancel=true + End If End Sub +private sub resultCard_CellMouseUp( sender As Object, e as DataGridViewCellMouseEventArgs) + + Dim dgv As DataGridView = CType( sender, DataGridView) + + + if e.Button = MouseButtons.Right then + + resultCardContextMenu.Show(dgv, e.Location) + resultCardContextMenu.Show(Cursor.Position) + + End if + + end sub + + +Private Sub resultCardContextMenu_ItemClicked( sender As Object, e As ToolStripItemClickedEventArgs) Handles resultCardContextMenu.ItemClicked + + Dim menu As ContextMenuStrip = CType( sender, ContextMenuStrip) -Private Sub btnStart_Click( sender As Object, e As EventArgs) Handles btnStart.Click + Dim grid as DataGridView = DirectCast( menu.SourceControl, DataGridView) + + Select Case e.ClickedItem.Text + + + Case "Delete" + + For Each selectedRow As datagridviewrow In grid.SelectedRows + + If Not selectedRow.IsNewRow then + + grid.Rows.RemoveAt(selectedRow.Index) + + End if + + Next + + case "Insert" + + + End Select + + + + + + + + + +End Sub + + + + +#End Region + +#Region "Button Handlers" + +Private Sub btnStart_Click( sender As Object, e As EventArgs) Handles btnStart.Click Validate_Pneumatics() + Validate_Electrics() + End Sub + + +#End Region + + + End Class \ No newline at end of file diff --git a/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb b/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb index fe84ac2a1b76cb2a41652d07edd7dbf1df1fe61f..ed57a658a1ae3d9b885bf9de94510abdb5c6c090 100644 --- a/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb +++ b/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb @@ -52,9 +52,11 @@ Private Sub setDefaults() .ResultCardIdle= New List(Of SmartResult), .ResultCardOverrun= New List(Of SmartResult), .ResultCardTraction=New List(Of SmartResult), - .SmartElectrical=True} + .SmartElectrical=True, + .AlternatorMap="C:\Users\tb28\Source\Workspaces\VECVECTOAux\VectoAuxiliariesTests\TestFiles\testAlternatorMap.csv" + } - HvacUserInputsConfig = New HVACUserInputsConfig(1,1,New HVACInputs(),"HVACMAPPATHGOESHERE.CSV") + HvacUserInputsConfig = New HVACUserInputsConfig(1,1,New HVACInputs(),"HVACMAPPATHGOESHERE.CSV", New HVACSteadyStateModel()) End Sub diff --git a/VECTOAux/VectoAuxiliaries/Electrics/M0_5_SmartAlternatorSetEfficiency.vb b/VECTOAux/VectoAuxiliaries/Electrics/M0_5_SmartAlternatorSetEfficiency.vb index 5860ee8e6551969db4dd06cf25633e76aa659a92..11b7f229c74da1e79a60d1534d3593f71154f2ed 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/M0_5_SmartAlternatorSetEfficiency.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/M0_5_SmartAlternatorSetEfficiency.vb @@ -16,7 +16,10 @@ Private _signals As ISignals Public Function SmartIdleCurrent() As single - Return _resultCardIdle.GetSmartCurrentResult(HvacPlusNonBaseCurrents()) +Dim hvac_Plus_None_Base As Single = HvacPlusNonBaseCurrents() +Dim smart_idle_current As Single = _resultCardIdle.GetSmartCurrentResult(hvac_Plus_None_Base) + + Return smart_idle_current end Function diff --git a/VECTOAux/VectoAuxiliaries/Electrics/M0_NonSmart_AlternatorsSetEfficiency.vb b/VECTOAux/VectoAuxiliaries/Electrics/M0_NonSmart_AlternatorsSetEfficiency.vb index 1abf28ab801c7095a295284ce88e1b22aa45ea0f..f4772f420852979531bd60a3cbe7c34cedbd5497 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/M0_NonSmart_AlternatorsSetEfficiency.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/M0_NonSmart_AlternatorsSetEfficiency.vb @@ -9,16 +9,17 @@ Public Class M0_NonSmart_AlternatorsSetEfficiency Private _electricalConsumersList As IElectricalConsumerList Private _hvacInputs As IHVACInputs Private _alternatorEfficiencyMap As IAlternatorMap - Private _hvacMap As IHVACMap + Private _powernetVoltage As Single Private _signals As ISignals + Private _steadyStateModelHVAC As IHVACSteadyStateModel - Public Sub New(electricalConsumers As IElectricalConsumerList, hvacInputs As IHVACInputs, hvacMap As IHVACMap, alternatorEfficiencyMap As IAlternatorMap, powernetVoltage As Single, signals As ISignals) + Public Sub New(electricalConsumers As IElectricalConsumerList, hvacInputs As IHVACInputs, alternatorEfficiencyMap As IAlternatorMap, powernetVoltage As Single, signals As ISignals, ssmHvac As IHVACSteadyStateModel) If electricalConsumers Is Nothing Then Throw New ArgumentException("No ElectricalConsumersList Supplied") If hvacInputs Is Nothing Then Throw New ArgumentException("No hvac inputs supplied") - If hvacMap Is Nothing Then Throw New ArgumentException("No HVAC Map supplied") + If alternatorEfficiencyMap Is Nothing Then Throw New ArgumentException("No Alternator Efficiency Map Supplied") If (powernetVoltage < ElectricConstants.PowenetVoltageMin Or powernetVoltage > ElectricConstants.PowenetVoltageMax) Then Throw New ArgumentException("Powernet Voltage out of range") If signals is Nothing then Throw New ArgumentException("No Signals reference was supplied.") @@ -27,9 +28,10 @@ Public Class M0_NonSmart_AlternatorsSetEfficiency Me._hvacInputs = hvacInputs Me._alternatorEfficiencyMap = alternatorEfficiencyMap - Me._hvacMap = hvacMap Me._powernetVoltage = powernetVoltage Me._signals = signals + Me._steadyStateModelHVAC = ssmHvac + End Sub @@ -38,13 +40,11 @@ Public Class M0_NonSmart_AlternatorsSetEfficiency Public Function GetEfficiency() As Single Implements IM0_NonSmart_AlternatorsSetEfficiency.GetEfficiency 'Sanity Check. - If _signals.EngineSpeed < 1 Then Throw New ArgumentException("CrankRPM must be greater than zero") + If _signals.EngineSpeed < 1 Then Return 0 - Dim rotationalSpeed As Single = _signals.EngineSpeed - Dim currentHVACDemandAmps As Single = _hvacMap.GetElectricalDemand(_hvacInputs.Region, _hvacInputs.Season) - Dim currentElectricalConsumerDemandAmp As Single = _electricalConsumersList.GetTotalAverageDemandAmps(True) + Dim baseCurrentDemandAmps As Single = _electricalConsumersList.GetTotalAverageDemandAmps(True) - Dim totalDemandAmps As Single = currentHVACDemandAmps + currentElectricalConsumerDemandAmp + Dim totalDemandAmps As Single = baseCurrentDemandAmps + GetHVACElectricalPowerDemandAmps Return _alternatorEfficiencyMap.GetEfficiency(_signals.EngineSpeed, totalDemandAmps).Efficiency @@ -52,7 +52,7 @@ Public Class M0_NonSmart_AlternatorsSetEfficiency Public Function GetHVACElectricalPowerDemandAmps() As Single Implements IM0_NonSmart_AlternatorsSetEfficiency.GetHVACElectricalPowerDemandAmps - Return _hvacMap.GetElectricalDemand(_hvacInputs.Region, _hvacInputs.Season) / _powernetVoltage + Return _steadyStateModelHVAC.HVACElectricalLoadPowerWatts / _powernetVoltage End Function diff --git a/VECTOAux/VectoAuxiliaries/Hvac/HVACSteadyStateModel.vb b/VECTOAux/VectoAuxiliaries/Hvac/HVACSteadyStateModel.vb new file mode 100644 index 0000000000000000000000000000000000000000..0e6883efaeafedad4512f9dff1c89c38dce93e5f --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/Hvac/HVACSteadyStateModel.vb @@ -0,0 +1,33 @@ + +Namespace Hvac + +Public Class HVACSteadyStateModel +implements IHVACSteadyStateModel + +Public Property HVACElectricalLoadPowerWatts As Single Implements IHVACSteadyStateModel.HVACElectricalLoadPowerWatts +Public Property HVACFuellingLitresPerHour As Single Implements IHVACSteadyStateModel.HVACFuellingLitresPerHour +Public Property HVACMechanicalLoadPowerWatts As Single Implements IHVACSteadyStateModel.HVACMechanicalLoadPowerWatts + + +Public Sub new () + + +End Sub + + +Public Sub new( elecPowerW As Single, mechPowerW As Single, fuellingLPH As single) + + HVACElectricalLoadPowerWatts=elecPowerW + HVACFuellingLitresPerHour =mechPowerW + HVACMechanicalLoadPowerWatts=fuellingLPH + +End Sub + + +End Class + + +End Namespace + + + diff --git a/VECTOAux/VectoAuxiliaries/Hvac/HVACUserInputsConfig.vb b/VECTOAux/VectoAuxiliaries/Hvac/HVACUserInputsConfig.vb index 226572b251fd1d2b0847007f6521e7adc8374c92..5f06f21137bd9198858eb8573e541ef3924a28c7 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/HVACUserInputsConfig.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/HVACUserInputsConfig.vb @@ -8,13 +8,14 @@ Namespace Hvac Public Class HVACUserInputsConfig Implements IHVACUserInputsConfig + Public Property _compressorGearEfficiency As Single Implements IHVACUserInputsConfig._compressorGearEfficiency Public Property _compressorGearRatio As Single Implements IHVACUserInputsConfig._compressorGearRatio Public Property _hvacInputs As IHVACInputs Implements IHVACUserInputsConfig._hvacInputs Public Property _hvacMapPath As String Implements IHVACUserInputsConfig._hvacMapPath + Public Property _steadyStateModel As IHVACSteadyStateModel Implements IHVACUserInputsConfig._steadyStateModel - - Public Sub new (compressorGearEfficiency As single,compressorGearRatio As Single ,hvacInputs as IHVACInputs ,hvacMapPath As string) + Public Sub new (compressorGearEfficiency As single,compressorGearRatio As Single ,hvacInputs as IHVACInputs ,hvacMapPath As string, ssm As IHVACSteadyStateModel) 'Sanity Check if hvacMapPath.Trim().Length=0 then Throw New ArgumentException("hvacMap Path must have a string to represent the csv file location") @@ -24,9 +25,11 @@ Implements IHVACUserInputsConfig _compressorGearRatio = compressorGearRatio _hvacInputs = hvacInputs _hvacMapPath = hvacMapPath + _steadyStateModel = ssm End Sub + End Class End Namespace diff --git a/VECTOAux/VectoAuxiliaries/Hvac/IHVACSteadyStateModel.vb b/VECTOAux/VectoAuxiliaries/Hvac/IHVACSteadyStateModel.vb new file mode 100644 index 0000000000000000000000000000000000000000..45488330d333b39a88ca2f94aaeaf5238758af32 --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/Hvac/IHVACSteadyStateModel.vb @@ -0,0 +1,20 @@ + +Namespace Hvac + + +Public Interface IHVACSteadyStateModel + +Property HVACMechanicalLoadPowerWatts As Single + +Property HVACElectricalLoadPowerWatts As Single + +Property HVACFuellingLitresPerHour As single + + + +End Interface + + +End Namespace + + diff --git a/VECTOAux/VectoAuxiliaries/Hvac/IHVACUserInputsConfig.vb b/VECTOAux/VectoAuxiliaries/Hvac/IHVACUserInputsConfig.vb index 8ead247abb601cbef4e764e8af4befbe173bf9c7..d089584aa79a9b81de15812809465fece6511595 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/IHVACUserInputsConfig.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/IHVACUserInputsConfig.vb @@ -12,6 +12,8 @@ Public Interface IHVACUserInputsConfig Property _hvacMapPath As string Property _compressorGearRatio As Single Property _compressorGearEfficiency As Single + Property _steadyStateModel As IHVACSteadyStateModel + End Interface diff --git a/VECTOAux/VectoAuxiliaries/Hvac/M1_AverageHVACLoadDemand.vb b/VECTOAux/VectoAuxiliaries/Hvac/M1_AverageHVACLoadDemand.vb index 273db68da70b4f7bf5b931df1148544325b14446..e0cbe44f9be80fcf22fc6e959248c0755a5a170f 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/M1_AverageHVACLoadDemand.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/M1_AverageHVACLoadDemand.vb @@ -8,13 +8,15 @@ Namespace Hvac Private _m0 As IM0_NonSmart_AlternatorsSetEfficiency Private _alternatorGearEfficiency As Single + Private _compressorGearEfficiency As single Private _hvacInputs As IHVACInputs Private _hvacMap As IHVACMap Private _signals As ISignals Private _powernetVoltage As single + Private _steadyStateModel As IHVACSteadyStateModel - Public Sub new ( m0 As IM0_NonSmart_AlternatorsSetEfficiency, hvacMap As IHVACMap, hvacInputs As IHVACInputs, altGearEfficiency As Single, powernetVoltage As Single, signals As ISignals ) + Public Sub new ( m0 As IM0_NonSmart_AlternatorsSetEfficiency, hvacMap As IHVACMap, hvacInputs As IHVACInputs, altGearEfficiency As Single,compressorGearEfficiency As Single, powernetVoltage As Single, signals As ISignals, ssm As IHVACSteadyStateModel ) 'Sanity Check - Illegal operations without all params. If m0 is Nothing then Throw New ArgumentException("Module0 as supplied is null") @@ -26,6 +28,10 @@ Namespace Hvac If signals is Nothing then Throw New Exception ("Signals object as supplied is null") If powernetVoltage< ElectricConstants.PowenetVoltageMin orelse powernetVoltage> ElectricConstants.PowenetVoltageMax then _ Throw New ArgumentException(String.Format("PowenetVoltage supplied must be in the range {0} to {1}",ElectricConstants.PowenetVoltageMin,ElectricConstants.PowenetVoltageMax)) + If ssm is Nothing then Throw New ArgumentException("Steady State model was not supplied") + If compressorGearEfficiency< 0 orelse altGearEfficiency> 1 then _ + Throw New ArgumentException(String.Format("Compressor Gear efficiency must be between {0} and {1}",0,1 )) + 'Assign _m0=m0 @@ -33,24 +39,41 @@ Namespace Hvac _hvacInputs = hvacInputs _alternatorGearEfficiency=altGearEfficiency _signals = _Signals + _steadyStateModel=ssm + _compressorGearEfficiency = compressorGearEfficiency + + End Sub + Public Function AveragePowerDemandAtCrankFromHVACMechanicalsWatts() As Single Implements IM1_AverageHVACLoadDemand.AveragePowerDemandAtCrankFromHVACMechanicalsWatts + + Return _steadyStateModel.HVACMechanicalLoadPowerWatts / _compressorGearEfficiency + + + End Function + Public Function AveragePowerDemandAtAlternatorFromHVACElectricsWatts() As Single Implements IM1_AverageHVACLoadDemand.AveragePowerDemandAtAlternatorFromHVACElectricsWatts - Return 100'TODO FIX THIS + + Return _steadyStateModel.HVACElectricalLoadPowerWatts + End Function Public Function AveragePowerDemandAtCrankFromHVACElectricsWatts() As Single Implements IM1_AverageHVACLoadDemand.AveragePowerDemandAtCrankFromHVACElectricsWatts - Return 100'TODO FIX THIS - End Function - Public Function AveragePowerDemandAtCrankFromHVACMechanicalsWatts() As Single Implements IM1_AverageHVACLoadDemand.AveragePowerDemandAtCrankFromHVACMechanicalsWatts - Return 100'TODO FIX THIS + + Return _steadyStateModel.HVACElectricalLoadPowerWatts/ _m0.GetEfficiency() + End Function + Public Function HVACFuelingLitresPerHour() As Single Implements IM1_AverageHVACLoadDemand.HVACFuelingLitresPerHour - Return 100'TODO FIX THI + + + Return _steadyStateModel.HVACFuellingLitresPerHour + + End Function diff --git a/VECTOAux/VectoAuxiliaries/Pneumatics/PneumaticUserInputsConfig.vb b/VECTOAux/VectoAuxiliaries/Pneumatics/PneumaticUserInputsConfig.vb index b336cb0f0ada09d0faffc12b715bd6faa60cb16c..9850e818e1915a96e43abc19ca00e2a8958a567b 100644 --- a/VECTOAux/VectoAuxiliaries/Pneumatics/PneumaticUserInputsConfig.vb +++ b/VECTOAux/VectoAuxiliaries/Pneumatics/PneumaticUserInputsConfig.vb @@ -43,7 +43,7 @@ Public sub SetPropertiesToDefaults() AdBlueDosing="Pneumatic" AirSuspensionControl="Electrically" CompressorGearEfficiency=0.8 - CompressorGearRatio=0 + CompressorGearRatio=0.6 CompressorMap="C:\Users\tb28\Source\Workspaces\VECVECTOAux\VectoAuxiliariesTests\TestFiles\testCompressorMap.csv" CompressorType="" Doors="Pneumatic" diff --git a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj index b860c5c423177f6bdb2865d2cf584e93c8667d63..2d94165ce9a504f84ae781d9e5463bc68febb71e 100644 --- a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj +++ b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj @@ -89,10 +89,12 @@ <Compile Include="Hvac\HVACConstants.vb" /> <Compile Include="Hvac\HVACInputs.vb" /> <Compile Include="Electrics\IElectricalConsumerList.vb" /> + <Compile Include="Hvac\HVACSteadyStateModel.vb" /> <Compile Include="Hvac\HVACUserInputsConfig.vb" /> <Compile Include="Hvac\IHVACInputs.vb" /> <Compile Include="Hvac\HVACMapParameter.vb" /> <Compile Include="Hvac\IHVACMap.vb" /> + <Compile Include="Hvac\IHVACSteadyStateModel.vb" /> <Compile Include="Hvac\IHVACUserInputsConfig.vb" /> <Compile Include="Hvac\IM1_AverageHVACLoadDemand.vb" /> <Compile Include="ISignals.vb" /> diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_5_SmartAlternatorSetEfficiencyTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_5_SmartAlternatorSetEfficiencyTests.vb index e079c085c8e54c7502baef9b58ac4e7af027c1a2..18e396903f650bca18845f95adc0bd0dfb90a7da 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_5_SmartAlternatorSetEfficiencyTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_5_SmartAlternatorSetEfficiencyTests.vb @@ -19,6 +19,8 @@ End Sub Private sub Initialise() + +Dim ssm As New HVACSteadyStateModel(100,100,100) Dim elecConsumers As New ElectricalConsumerList(26.3,0.096,True) Dim hvacInputs As New HVACInputs(1,1) Dim hvacMap As New HVACMap("testFiles\TestHvacMap.csv") @@ -29,7 +31,7 @@ alternatoMap.Initialise() Dim signals = New Signals() signals.EngineSpeed=2000 -Dim m0 As New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers,hvacInputs,hvacMap,alternatoMap,26.3,signals) +Dim m0 As New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers,hvacInputs,alternatoMap,26.3,signals,ssm) 'Results Cards Dim readings = new List(of SmartResult) @@ -74,7 +76,7 @@ End Sub Public Sub AlternatorsEfficiencyIdle2000rpmTest() Initialise() - Dim expected As Single = 0.618566155 + Dim expected As Single = 0.573053837 Dim actual As Single = target.AlternatorsEfficiencyIdleResultCard() Assert.AreEqual(expected, actual) @@ -87,7 +89,7 @@ End Sub Public Sub AlternatorsEfficiencyTraction2000rpmTest() Initialise() - Dim expected As Single = 0.618566155 + Dim expected As Single = 0.573053837 Dim actual As Single = target.AlternatorsEfficiencyTractionOnResultCard() Assert.AreEqual(expected, actual) @@ -99,7 +101,7 @@ End Sub Public Sub AlternatorsEfficiencyOverrun2000rpmTest() Initialise() - Dim expected As Single = 0.618566155 + Dim expected As Single = 0.573053837 Dim actual As Single = target.AlternatorsEfficiencyOverrunResultCard() Assert.AreEqual(expected, actual) diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_NonSmart_AlternatorsSetEfficiencyTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_NonSmart_AlternatorsSetEfficiencyTests.vb index a588d17ea8f723fb2dab549024c8483cc1866526..fbd61769a541be61740543d8688162767cb237ec 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_NonSmart_AlternatorsSetEfficiencyTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_NonSmart_AlternatorsSetEfficiencyTests.vb @@ -22,6 +22,8 @@ Private hvacMap As IHVACMap Private alternatorMap As IAlternatorMap Private signals As Signals = New Signals Private powernetVoltage As Single = 26.3 +Private ssm As IHVACSteadyStateModel = New HVACSteadyStateModel(100,100,100) + @@ -49,41 +51,41 @@ End Sub <Test()> Public Sub CreateNewTest() - Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, hvacInputs, hvacMap, alternatorMap, powernetVoltage,signals) + Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, hvacInputs, alternatorMap, powernetVoltage,signals,ssm) Assert.IsNotNull(target) End Sub <Test()> <ExpectedException("System.ArgumentException")> Public Sub CreateNew_MissingElecConsumers_ThrowArgumentExceptionTest() - Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(Nothing, hvacInputs, hvacMap, alternatorMap, powernetVoltage,signals) + Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(Nothing, hvacInputs, alternatorMap, powernetVoltage,signals,ssm) End Sub <Test()> <ExpectedException("System.ArgumentException")> Public Sub CreateNew_MissingHVACInputs_ThrowArgumentExceptionTest() - Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, Nothing, hvacMap, alternatorMap, powernetVoltage,signals) + Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, Nothing, alternatorMap, powernetVoltage,signals,ssm) End Sub <Test()> <ExpectedException("System.ArgumentException")> Public Sub CreateNew_MissingHVACMAP_ThrowArgumentExceptionTest() - Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, hvacInputs, Nothing, alternatorMap, powernetVoltage,signals) + Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, Nothing, alternatorMap, powernetVoltage,signals,ssm) End Sub <Test()> <ExpectedException("System.ArgumentException")> Public Sub CreateNew_MissingAlternatorMap_ThrowArgumentExceptionTest() - Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, hvacInputs, hvacMap, Nothing, powernetVoltage,signals) + Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, hvacInputs, Nothing, powernetVoltage,signals,ssm) End Sub <Test()> Public Sub EfficiencyValueTest() - Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, hvacInputs, hvacMap, alternatorMap, powernetVoltage,signals) + Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, hvacInputs, alternatorMap, powernetVoltage,signals,ssm) Dim actual As Single = target.GetEfficiency() @@ -98,12 +100,12 @@ End Sub <Test()> Public Sub HVAC_PowerDemandAmpsTest() - Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, hvacInputs, hvacMap, alternatorMap, powernetVoltage,signals) + Dim target As M0_NonSmart_AlternatorsSetEfficiency = New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers, hvacInputs, alternatorMap, powernetVoltage,signals,ssm) Dim actual As Single - Dim expected As Single = 152.091263F '( HVAC POWER OUTPUT IN KW not Watts ) + Dim expected As Single = 3.80228149 - actual = target.GetHVACElectricalPowerDemandAmps() * 1000 + actual = target.GetHVACElectricalPowerDemandAmps() Assert.AreEqual(expected, actual) diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M1_HVACAverageLoadDemandTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M1_HVACAverageLoadDemandTests.vb new file mode 100644 index 0000000000000000000000000000000000000000..70efb9b5bfd7de6c75cd2cd323a21a8927bc57cf --- /dev/null +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M1_HVACAverageLoadDemandTests.vb @@ -0,0 +1,20 @@ + +Namespace UnitTests + + + +Public Class M1_HVACAverageLoadDemandTests + + + + + +End Class + + + + +End Namespace + + + diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M2_AverageElectricalLoadTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M2_AverageElectricalLoadTests.vb index 5dc9f5bc494a45895254963b00760fa3e8b19160..adc861bbe7e9b77da28f4e734b094200e4071dac 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M2_AverageElectricalLoadTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M2_AverageElectricalLoadTests.vb @@ -13,6 +13,7 @@ Namespace UnitTests Private Const csngDoorDutyCycleZeroToOne As Single = 0.0963391136801541 Private Const csngPowernetVoltage As Single = 26.3 + Private ssmHVac As IHVACSteadyStateModel = New HVACSteadyStateModel(100,100,100) @@ -28,7 +29,7 @@ Namespace UnitTests hvacmap.Initialise() Dim altMap As IAlternatorMap = CType(New AlternatorMap("testfiles\testAlternatorMap.csv"), IAlternatorMap) altMap.Initialise() - Dim m0 As New M0_NonSmart_AlternatorsSetEfficiency(consumers, hvacInp, hvacmap, altMap, 26.3,signals) + Dim m0 As New M0_NonSmart_AlternatorsSetEfficiency(consumers,hvacInp, altMap, 26.3,signals,ssmHVac) 'Get Consumers. @@ -63,7 +64,7 @@ Namespace UnitTests <Test()> Public Sub GetAveragePowerAtCrankTest() Dim target As M2_AverageElectricalLoadDemand = GetAverageElectricalDemandInstance() - Dim expected As Single = 2356.12964 + Dim expected As Single = 2286.36719 Dim actual As Single = target.GetAveragePowerAtCrank(2000) Assert.AreEqual(expected, actual) End Sub diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M5_SmartAlternatorSetGenerationTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M5_SmartAlternatorSetGenerationTests.vb index c7c491f5ef23f511b9681ee70212a5ad15d4794b..db0545ef7ad21ac07ccfb2adfdfadfe48292a1a2 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M5_SmartAlternatorSetGenerationTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M5_SmartAlternatorSetGenerationTests.vb @@ -21,6 +21,7 @@ Private const _altGearPullyEfficiency As Single =0.8 Private _m05 As M0_5_SmartAlternatorSetEfficiency Private _target As M5__SmartAlternatorSetGeneration Private _signals As ISignals = New Signals +Private ssmHVac As IHVACSteadyStateModel = New HVACSteadyStateModel(100,100,100) Private sub Initialise() @@ -32,7 +33,7 @@ Dim hvacMap As New HVACMap(_hvacMap) hvacMap.Initialise() Dim alternatoMap As New AlternatorMap(_altMap) alternatoMap.Initialise() -Dim m0 As New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers,hvacInputs,hvacMap,alternatoMap,_powerNetVoltage,_signals) +Dim m0 As New M0_NonSmart_AlternatorsSetEfficiency(elecConsumers,hvacInputs,alternatoMap,_powerNetVoltage,_signals,ssmHVac) 'Results Cards Dim readings = new List(Of SmartResult) @@ -64,7 +65,7 @@ Public Sub PowerAtCrankIdleWatts() Initialise() _target = New M5__SmartAlternatorSetGeneration(_m05,_powerNetVoltage,_altGearPullyEfficiency) - Dim expected As Single =1681.428f + Dim expected As Single =2006.922f Dim actual As Single = _target.AlternatorsGenerationPowerAtCrankIdleWatts(_rpm) Assert.AreEqual( expected, CType(Math.Round( actual,3), Single)) @@ -76,7 +77,7 @@ Public Sub PowerAtCrankTractionWatts() Initialise() _target = New M5__SmartAlternatorSetGeneration(_m05,_powerNetVoltage,_altGearPullyEfficiency) - Dim expected As Single =1681.428 + Dim expected As Single =2006.922 Dim actual As Single = _target.AlternatorsGenerationPowerAtCrankTractionOnWatts(_rpm) Assert.AreEqual( expected, CType(Math.Round(actual,3),Single)) @@ -88,7 +89,7 @@ Public Sub PowerAtCrankOverrunWatts() Initialise() _target = New M5__SmartAlternatorSetGeneration(_m05,_powerNetVoltage,_altGearPullyEfficiency) - Dim expected As Single =1681.428 + Dim expected As Single =2006.922 Dim actual As Single = _target.AlternatorsGenerationPowerAtCrankOverrunWatts(_rpm) diff --git a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj index 8509090490fa30fb2c6c84873486ccb70eaee0b7..2ef9985c0f40567e63d1e02b68e4ab33829102f5 100644 --- a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj +++ b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj @@ -93,6 +93,7 @@ <Compile Include="UnitTests\AveragePneumaticLoadDemandTests.vb" /> <Compile Include="UnitTests\ElectricalConsumerListTests.vb" /> <Compile Include="UnitTests\HVACMapTests.vb" /> + <Compile Include="UnitTests\M1_HVACAverageLoadDemandTests.vb" /> <Compile Include="UnitTests\M5_SmartAlternatorSetGenerationTests.vb" /> <Compile Include="UnitTests\PneumaticActuationsMapTests.vb" /> <Compile Include="UnitTests\AirCompressorTests.vb" />