From ee774b2a275d7df36ca3821c382ce2a066707837 Mon Sep 17 00:00:00 2001 From: "Burns, Terry" <Terry.Burns@ricardo.com> Date: Tue, 11 Nov 2014 16:35:49 +0000 Subject: [PATCH] WIP - M9 Completed including tests also integrated into Harness UI. Now need to validate that the live modules in the auxEnvironment are providing values which are properly reflected in the outputs of M9. git-tfs-id: [http://tfs00.element.root.com:8080/tfs/TFSCollection]$/VECTO;C1666 --- .../AuxillaryTestHarness.vbproj | 3 + AuxillaryTestHarness/Dashboard.Designer.vb | 615 +++++++++++------- AuxillaryTestHarness/Dashboard.resx | 2 +- AuxillaryTestHarness/Dashboard.vb | 13 +- AuxillaryTestHarness/testFuelGoodMap.vmap | 186 ++++++ .../VectoAuxiliaries/AuxillaryEnvironment.vb | 17 +- .../DownstreamModules/IFUEL.vb | 19 - .../DownstreamModules/IFUELMAP.vb | 19 + .../VectoAuxiliaries/DownstreamModules/IM9.vb | 3 - .../VectoAuxiliaries/DownstreamModules/M9.vb | 22 +- .../DownstreamModules/cDelaunayMap.vb | 493 ++++++++++++++ .../DownstreamModules/cFile V3.vb | 150 +++++ VECTOAux/VectoAuxiliaries/IVectoInputs.vb | 1 + .../VectoAuxiliaries/VectoAuxiliaries.vbproj | 4 +- VECTOAux/VectoAuxiliaries/VectoInputs.vb | 5 +- .../TestFiles/testFuelGoodMap.vmap | 186 ++++++ .../UnitTests/FuelMapTests.vb | 40 ++ .../UnitTests/M9Tests.vb | 73 ++- .../VectoAuxiliariesTests.vbproj | 4 + 19 files changed, 1583 insertions(+), 272 deletions(-) create mode 100644 AuxillaryTestHarness/testFuelGoodMap.vmap delete mode 100644 VECTOAux/VectoAuxiliaries/DownstreamModules/IFUEL.vb create mode 100644 VECTOAux/VectoAuxiliaries/DownstreamModules/IFUELMAP.vb create mode 100644 VECTOAux/VectoAuxiliaries/DownstreamModules/cDelaunayMap.vb create mode 100644 VECTOAux/VectoAuxiliaries/DownstreamModules/cFile V3.vb create mode 100644 VECTOAux/VectoAuxiliariesTests/TestFiles/testFuelGoodMap.vmap create mode 100644 VECTOAux/VectoAuxiliariesTests/UnitTests/FuelMapTests.vb diff --git a/AuxillaryTestHarness/AuxillaryTestHarness.vbproj b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj index 1257416d5f..1a5a4e8914 100644 --- a/AuxillaryTestHarness/AuxillaryTestHarness.vbproj +++ b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj @@ -171,6 +171,9 @@ <Content Include="testAlternatorMap - Copy.csv"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> + <Content Include="testFuelGoodMap.vmap"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> </ItemGroup> <ItemGroup> <ProjectReference Include="..\VECTOAux\VectoAuxiliaries\VectoAuxiliaries.vbproj"> diff --git a/AuxillaryTestHarness/Dashboard.Designer.vb b/AuxillaryTestHarness/Dashboard.Designer.vb index b5391fdead..4693c0b99a 100644 --- a/AuxillaryTestHarness/Dashboard.Designer.vb +++ b/AuxillaryTestHarness/Dashboard.Designer.vb @@ -23,22 +23,25 @@ Partial Class Dashboard <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - 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() + 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() Me.pnlMain = New System.Windows.Forms.Panel() Me.btnCancel = New System.Windows.Forms.Button() Me.tabMain = New System.Windows.Forms.TabControl() Me.tabGeneralConfig = New System.Windows.Forms.TabPage() + Me.btnFuelMap = New System.Windows.Forms.Button() + Me.lblFuelMap = New System.Windows.Forms.Label() + Me.txtFuelMap = New System.Windows.Forms.TextBox() Me.cboCycle = New System.Windows.Forms.ComboBox() Me.lblCycle = New System.Windows.Forms.Label() Me.lblVehiceWeight = New System.Windows.Forms.Label() @@ -124,6 +127,14 @@ Partial Class Dashboard Me.txtHVACElectricalLoadPowerWatts = New System.Windows.Forms.TextBox() Me.lblHVACElectricalLoadPowerWatts = New System.Windows.Forms.Label() Me.tabPlayground = New System.Windows.Forms.TabPage() + Me.lblM8_Title = New System.Windows.Forms.Label() + Me.pnlM8 = New System.Windows.Forms.Panel() + Me.lblM8CompressorFlag = New System.Windows.Forms.Label() + Me.txtM8_out_CompressorFlag = New System.Windows.Forms.TextBox() + Me.lblM8SmartElectricalAltPwrGenAtCrank = New System.Windows.Forms.Label() + Me.lblM8AuxPowerAtCrankFromAllAncillaries = New System.Windows.Forms.Label() + Me.txtM8_out_SmartElectricalAltPwrGenAtCrank = New System.Windows.Forms.TextBox() + Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries = New System.Windows.Forms.TextBox() Me.lblM7_Title = New System.Windows.Forms.Label() Me.Panel4 = New System.Windows.Forms.Panel() Me.lblM7_SmartPneumaticsOnlyAux_AirCompPwrRegenAtCrank = New System.Windows.Forms.Label() @@ -236,14 +247,16 @@ Partial Class Dashboard Me.DeleteToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ErrorProvider = New System.Windows.Forms.ErrorProvider(Me.components) Me.Timer1 = New System.Windows.Forms.Timer(Me.components) - Me.Panel5 = New System.Windows.Forms.Panel() - Me.lblM8CompressorFlag = New System.Windows.Forms.Label() - Me.txtM8_out_CompressorFlag = New System.Windows.Forms.TextBox() - Me.lblM8SmartElectricalAltPwrGenAtCrank = New System.Windows.Forms.Label() - Me.lblM8AuxPowerAtCrankFromAllAncillaries = New System.Windows.Forms.Label() - Me.txtM8_out_SmartElectricalAltPwrGenAtCrank = New System.Windows.Forms.TextBox() - Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries = New System.Windows.Forms.TextBox() - Me.lblM8_Title = New System.Windows.Forms.Label() + Me.pnlM9 = New System.Windows.Forms.Panel() + Me.lblM9TotalCycleFuelConsumptionCompressorOnContinuously = New System.Windows.Forms.Label() + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously = New System.Windows.Forms.TextBox() + Me.lblM9LitresOfAirCompressoryOnlyOnInOverrun = New System.Windows.Forms.Label() + Me.lblM9LitresOfAirCompressorOnContinuously = New System.Windows.Forms.Label() + Me.txtM9_out_LitresOfAirCompressorOnlyOnInOverrun = New System.Windows.Forms.TextBox() + Me.txtM9_out_LitresOfAirConsumptionCompressorONContinuously = New System.Windows.Forms.TextBox() + Me.lblM9Title = New System.Windows.Forms.Label() + Me.lblM9TotalCycleFuelConsumptionCompressorOFFContinuously = New System.Windows.Forms.Label() + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously = New System.Windows.Forms.TextBox() Me.pnlMain.SuspendLayout Me.tabMain.SuspendLayout Me.tabGeneralConfig.SuspendLayout @@ -257,6 +270,7 @@ Partial Class Dashboard Me.pnlPneumaticAuxillaries.SuspendLayout Me.tabHVACConfig.SuspendLayout Me.tabPlayground.SuspendLayout + Me.pnlM8.SuspendLayout Me.Panel4.SuspendLayout Me.Panel2.SuspendLayout Me.Panel3.SuspendLayout @@ -269,7 +283,7 @@ Partial Class Dashboard Me.pnl_M0_Displays.SuspendLayout Me.resultCardContextMenu.SuspendLayout CType(Me.ErrorProvider,System.ComponentModel.ISupportInitialize).BeginInit - Me.Panel5.SuspendLayout + Me.pnlM9.SuspendLayout Me.SuspendLayout ' 'pnlMain @@ -309,6 +323,9 @@ Partial Class Dashboard ' 'tabGeneralConfig ' + Me.tabGeneralConfig.Controls.Add(Me.btnFuelMap) + Me.tabGeneralConfig.Controls.Add(Me.lblFuelMap) + Me.tabGeneralConfig.Controls.Add(Me.txtFuelMap) Me.tabGeneralConfig.Controls.Add(Me.cboCycle) Me.tabGeneralConfig.Controls.Add(Me.lblCycle) Me.tabGeneralConfig.Controls.Add(Me.lblVehiceWeight) @@ -316,11 +333,36 @@ Partial Class Dashboard Me.tabGeneralConfig.Location = New System.Drawing.Point(4, 22) Me.tabGeneralConfig.Name = "tabGeneralConfig" Me.tabGeneralConfig.Padding = New System.Windows.Forms.Padding(3) - Me.tabGeneralConfig.Size = New System.Drawing.Size(966, 704) + Me.tabGeneralConfig.Size = New System.Drawing.Size(1158, 704) Me.tabGeneralConfig.TabIndex = 0 Me.tabGeneralConfig.Text = "GeneralConfig" Me.tabGeneralConfig.UseVisualStyleBackColor = true ' + 'btnFuelMap + ' + Me.btnFuelMap.Location = New System.Drawing.Point(778, 126) + Me.btnFuelMap.Name = "btnFuelMap" + Me.btnFuelMap.Size = New System.Drawing.Size(38, 23) + Me.btnFuelMap.TabIndex = 9 + Me.btnFuelMap.Text = ". . . " + Me.btnFuelMap.UseVisualStyleBackColor = true + ' + 'lblFuelMap + ' + Me.lblFuelMap.AutoSize = true + Me.lblFuelMap.Location = New System.Drawing.Point(31, 131) + Me.lblFuelMap.Name = "lblFuelMap" + Me.lblFuelMap.Size = New System.Drawing.Size(51, 13) + Me.lblFuelMap.TabIndex = 8 + Me.lblFuelMap.Text = "Fuel Map" + ' + 'txtFuelMap + ' + Me.txtFuelMap.Location = New System.Drawing.Point(123, 127) + Me.txtFuelMap.Name = "txtFuelMap" + Me.txtFuelMap.Size = New System.Drawing.Size(649, 20) + Me.txtFuelMap.TabIndex = 7 + ' 'cboCycle ' Me.cboCycle.FormattingEnabled = true @@ -333,7 +375,7 @@ Partial Class Dashboard 'lblCycle ' Me.lblCycle.AutoSize = true - Me.lblCycle.Location = New System.Drawing.Point(24, 78) + Me.lblCycle.Location = New System.Drawing.Point(31, 82) Me.lblCycle.Name = "lblCycle" Me.lblCycle.Size = New System.Drawing.Size(33, 13) Me.lblCycle.TabIndex = 5 @@ -342,15 +384,15 @@ Partial Class Dashboard 'lblVehiceWeight ' Me.lblVehiceWeight.AutoSize = true - Me.lblVehiceWeight.Location = New System.Drawing.Point(21, 38) + Me.lblVehiceWeight.Location = New System.Drawing.Point(31, 38) Me.lblVehiceWeight.Name = "lblVehiceWeight" - Me.lblVehiceWeight.Size = New System.Drawing.Size(97, 13) + Me.lblVehiceWeight.Size = New System.Drawing.Size(88, 13) Me.lblVehiceWeight.TabIndex = 3 - Me.lblVehiceWeight.Text = "Vehicle Weight KG" + Me.lblVehiceWeight.Text = "Vehicle Mass KG" ' 'txtVehicleWeightKG ' - Me.txtVehicleWeightKG.Location = New System.Drawing.Point(123, 35) + Me.txtVehicleWeightKG.Location = New System.Drawing.Point(123, 34) Me.txtVehicleWeightKG.Name = "txtVehicleWeightKG" Me.txtVehicleWeightKG.Size = New System.Drawing.Size(100, 20) Me.txtVehicleWeightKG.TabIndex = 2 @@ -378,7 +420,7 @@ Partial Class Dashboard Me.tabElectricalConfig.Location = New System.Drawing.Point(4, 22) Me.tabElectricalConfig.Name = "tabElectricalConfig" Me.tabElectricalConfig.Padding = New System.Windows.Forms.Padding(3) - Me.tabElectricalConfig.Size = New System.Drawing.Size(966, 704) + Me.tabElectricalConfig.Size = New System.Drawing.Size(1158, 704) Me.tabElectricalConfig.TabIndex = 1 Me.tabElectricalConfig.Text = "ElectricalConfig" Me.tabElectricalConfig.UseVisualStyleBackColor = true @@ -394,97 +436,97 @@ Partial Class Dashboard ' 'gvResultsCardOverrun ' - 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 + 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 Me.gvResultsCardOverrun.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - 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 + 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 Me.gvResultsCardOverrun.Location = New System.Drawing.Point(590, 451) Me.gvResultsCardOverrun.Name = "gvResultsCardOverrun" - 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 + 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 Me.gvResultsCardOverrun.Size = New System.Drawing.Size(246, 125) Me.gvResultsCardOverrun.TabIndex = 18 ' 'gvResultsCardTraction ' - 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 + 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 Me.gvResultsCardTraction.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - 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 + 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 Me.gvResultsCardTraction.Location = New System.Drawing.Point(311, 451) Me.gvResultsCardTraction.Name = "gvResultsCardTraction" - 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 + 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 Me.gvResultsCardTraction.Size = New System.Drawing.Size(258, 125) Me.gvResultsCardTraction.TabIndex = 17 ' 'gvResultsCardIdle ' - 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 + 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 Me.gvResultsCardIdle.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - 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 + 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 Me.gvResultsCardIdle.Location = New System.Drawing.Point(35, 451) Me.gvResultsCardIdle.Name = "gvResultsCardIdle" - 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 + 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 Me.gvResultsCardIdle.Size = New System.Drawing.Size(256, 125) Me.gvResultsCardIdle.TabIndex = 16 ' @@ -536,33 +578,33 @@ Partial Class Dashboard ' 'gvElectricalConsumables ' - 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 + 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 Me.gvElectricalConsumables.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - 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 + 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 Me.gvElectricalConsumables.Location = New System.Drawing.Point(33, 170) Me.gvElectricalConsumables.Name = "gvElectricalConsumables" - 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 + 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 Me.gvElectricalConsumables.Size = New System.Drawing.Size(803, 250) Me.gvElectricalConsumables.TabIndex = 10 ' @@ -636,7 +678,7 @@ Partial Class Dashboard Me.tabPneumaticConfig.Controls.Add(Me.pnlPneumaticAuxillaries) Me.tabPneumaticConfig.Location = New System.Drawing.Point(4, 22) Me.tabPneumaticConfig.Name = "tabPneumaticConfig" - Me.tabPneumaticConfig.Size = New System.Drawing.Size(966, 704) + Me.tabPneumaticConfig.Size = New System.Drawing.Size(1158, 704) Me.tabPneumaticConfig.TabIndex = 2 Me.tabPneumaticConfig.Text = "PneumaticConfig" Me.tabPneumaticConfig.UseVisualStyleBackColor = true @@ -1155,7 +1197,7 @@ Partial Class Dashboard 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(966, 704) + Me.tabHVACConfig.Size = New System.Drawing.Size(1158, 704) Me.tabHVACConfig.TabIndex = 3 Me.tabHVACConfig.Text = "HVACConfig" Me.tabHVACConfig.UseVisualStyleBackColor = true @@ -1222,8 +1264,10 @@ Partial Class Dashboard 'tabPlayground ' Me.tabPlayground.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.tabPlayground.Controls.Add(Me.lblM9Title) + Me.tabPlayground.Controls.Add(Me.pnlM9) Me.tabPlayground.Controls.Add(Me.lblM8_Title) - Me.tabPlayground.Controls.Add(Me.Panel5) + Me.tabPlayground.Controls.Add(Me.pnlM8) Me.tabPlayground.Controls.Add(Me.lblM7_Title) Me.tabPlayground.Controls.Add(Me.Panel4) Me.tabPlayground.Controls.Add(Me.lblM6Title) @@ -1267,11 +1311,88 @@ Partial Class Dashboard Me.tabPlayground.Text = "Playground" Me.tabPlayground.UseVisualStyleBackColor = true ' + 'lblM8_Title + ' + Me.lblM8_Title.AutoSize = true + Me.lblM8_Title.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + Me.lblM8_Title.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM8_Title.Location = New System.Drawing.Point(838, 8) + Me.lblM8_Title.Name = "lblM8_Title" + Me.lblM8_Title.Size = New System.Drawing.Size(194, 13) + Me.lblM8_Title.TabIndex = 48 + Me.lblM8_Title.Text = "M8-Full Assignment of Aux Loads" + ' + 'pnlM8 + ' + Me.pnlM8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.pnlM8.Controls.Add(Me.lblM8CompressorFlag) + Me.pnlM8.Controls.Add(Me.txtM8_out_CompressorFlag) + Me.pnlM8.Controls.Add(Me.lblM8SmartElectricalAltPwrGenAtCrank) + Me.pnlM8.Controls.Add(Me.lblM8AuxPowerAtCrankFromAllAncillaries) + Me.pnlM8.Controls.Add(Me.txtM8_out_SmartElectricalAltPwrGenAtCrank) + Me.pnlM8.Controls.Add(Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries) + Me.pnlM8.Location = New System.Drawing.Point(834, 36) + Me.pnlM8.Name = "pnlM8" + Me.pnlM8.Size = New System.Drawing.Size(308, 147) + Me.pnlM8.TabIndex = 47 + ' + 'lblM8CompressorFlag + ' + Me.lblM8CompressorFlag.AutoSize = true + Me.lblM8CompressorFlag.Location = New System.Drawing.Point(6, 91) + Me.lblM8CompressorFlag.Name = "lblM8CompressorFlag" + Me.lblM8CompressorFlag.Size = New System.Drawing.Size(85, 13) + Me.lblM8CompressorFlag.TabIndex = 6 + Me.lblM8CompressorFlag.Text = "Compressor Flag" + ' + 'txtM8_out_CompressorFlag + ' + Me.txtM8_out_CompressorFlag.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) + Me.txtM8_out_CompressorFlag.Location = New System.Drawing.Point(6, 107) + Me.txtM8_out_CompressorFlag.Name = "txtM8_out_CompressorFlag" + Me.txtM8_out_CompressorFlag.Size = New System.Drawing.Size(100, 20) + Me.txtM8_out_CompressorFlag.TabIndex = 4 + ' + 'lblM8SmartElectricalAltPwrGenAtCrank + ' + Me.lblM8SmartElectricalAltPwrGenAtCrank.AutoSize = true + Me.lblM8SmartElectricalAltPwrGenAtCrank.Location = New System.Drawing.Point(6, 48) + Me.lblM8SmartElectricalAltPwrGenAtCrank.Name = "lblM8SmartElectricalAltPwrGenAtCrank" + Me.lblM8SmartElectricalAltPwrGenAtCrank.Size = New System.Drawing.Size(165, 13) + Me.lblM8SmartElectricalAltPwrGenAtCrank.TabIndex = 3 + Me.lblM8SmartElectricalAltPwrGenAtCrank.Text = "Smart Elec Alt PowerGen@Crank" + ' + 'lblM8AuxPowerAtCrankFromAllAncillaries + ' + Me.lblM8AuxPowerAtCrankFromAllAncillaries.AutoSize = true + Me.lblM8AuxPowerAtCrankFromAllAncillaries.Location = New System.Drawing.Point(6, 9) + Me.lblM8AuxPowerAtCrankFromAllAncillaries.Name = "lblM8AuxPowerAtCrankFromAllAncillaries" + Me.lblM8AuxPowerAtCrankFromAllAncillaries.Size = New System.Drawing.Size(292, 13) + Me.lblM8AuxPowerAtCrankFromAllAncillaries.TabIndex = 2 + Me.lblM8AuxPowerAtCrankFromAllAncillaries.Text = "Aux pwr@CrankFrom Elec,HVAC and Pneumatics Ancillaries" + ' + 'txtM8_out_SmartElectricalAltPwrGenAtCrank + ' + Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) + Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.Location = New System.Drawing.Point(6, 64) + Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.Name = "txtM8_out_SmartElectricalAltPwrGenAtCrank" + Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.Size = New System.Drawing.Size(100, 20) + Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.TabIndex = 1 + ' + 'txtM8_out_AuxPowerAtCrankFromAllAncillaries + ' + Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) + Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.Location = New System.Drawing.Point(6, 25) + Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.Name = "txtM8_out_AuxPowerAtCrankFromAllAncillaries" + Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.Size = New System.Drawing.Size(100, 20) + Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.TabIndex = 0 + ' 'lblM7_Title ' Me.lblM7_Title.AutoSize = true Me.lblM7_Title.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.lblM7_Title.Location = New System.Drawing.Point(529, 451) + Me.lblM7_Title.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM7_Title.Location = New System.Drawing.Point(529, 453) Me.lblM7_Title.MaximumSize = New System.Drawing.Size(300, 0) Me.lblM7_Title.Name = "lblM7_Title" Me.lblM7_Title.Size = New System.Drawing.Size(272, 26) @@ -1289,7 +1410,7 @@ Partial Class Dashboard Me.Panel4.Controls.Add(Me.lblM7_SmarElectricalAndPneumaticsAux_AltPowerGenAtCrank) Me.Panel4.Controls.Add(Me.txtM7_out_SmartElectricalAndPneumaticAux_AirCompPowerGenAtCrank) Me.Panel4.Controls.Add(Me.txtM7_out_SmartElectricalAndPneumaticsAux_AltPowerGenAtCrank) - Me.Panel4.Location = New System.Drawing.Point(532, 482) + Me.Panel4.Location = New System.Drawing.Point(532, 484) Me.Panel4.Name = "Panel4" Me.Panel4.Size = New System.Drawing.Size(296, 179) Me.Panel4.TabIndex = 45 @@ -1366,7 +1487,8 @@ Partial Class Dashboard ' Me.lblM6Title.AutoSize = true Me.lblM6Title.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.lblM6Title.Location = New System.Drawing.Point(529, 4) + Me.lblM6Title.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM6Title.Location = New System.Drawing.Point(529, 8) Me.lblM6Title.MaximumSize = New System.Drawing.Size(250, 0) Me.lblM6Title.Name = "lblM6Title" Me.lblM6Title.Size = New System.Drawing.Size(235, 26) @@ -1394,7 +1516,7 @@ Partial Class Dashboard Me.Panel2.Controls.Add(Me.lblM6_OverrunFlag) Me.Panel2.Controls.Add(Me.txtM6_out_SmartElectricalAndPneumaticsCompressorFlag) Me.Panel2.Controls.Add(Me.txtM6_out_OverrunFlag) - Me.Panel2.Location = New System.Drawing.Point(531, 33) + Me.Panel2.Location = New System.Drawing.Point(531, 35) Me.Panel2.Name = "Panel2" Me.Panel2.Size = New System.Drawing.Size(297, 402) Me.Panel2.TabIndex = 43 @@ -1592,7 +1714,8 @@ Partial Class Dashboard ' Me.lblM5_SmartAltSetGeneration.AutoSize = true Me.lblM5_SmartAltSetGeneration.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.lblM5_SmartAltSetGeneration.Location = New System.Drawing.Point(327, 470) + Me.lblM5_SmartAltSetGeneration.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM5_SmartAltSetGeneration.Location = New System.Drawing.Point(327, 472) Me.lblM5_SmartAltSetGeneration.Name = "lblM5_SmartAltSetGeneration" Me.lblM5_SmartAltSetGeneration.Size = New System.Drawing.Size(168, 13) Me.lblM5_SmartAltSetGeneration.TabIndex = 37 @@ -1607,7 +1730,7 @@ Partial Class Dashboard Me.Panel3.Controls.Add(Me.lblM5_AltRegenPowerAtCrankIdleW) Me.Panel3.Controls.Add(Me.txtM5_out_AltRegenPowerAtCrankTractionWatts) Me.Panel3.Controls.Add(Me.txtM5_out_AltRegenPowerAtCrankIdleWatts) - Me.Panel3.Location = New System.Drawing.Point(328, 486) + Me.Panel3.Location = New System.Drawing.Point(328, 488) Me.Panel3.Name = "Panel3" Me.Panel3.Size = New System.Drawing.Size(191, 175) Me.Panel3.TabIndex = 36 @@ -1675,7 +1798,8 @@ Partial Class Dashboard ' Me.lblM4_AirCompressor.AutoSize = true Me.lblM4_AirCompressor.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.lblM4_AirCompressor.Location = New System.Drawing.Point(327, 265) + Me.lblM4_AirCompressor.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM4_AirCompressor.Location = New System.Drawing.Point(327, 267) Me.lblM4_AirCompressor.Name = "lblM4_AirCompressor" Me.lblM4_AirCompressor.Size = New System.Drawing.Size(112, 13) Me.lblM4_AirCompressor.TabIndex = 33 @@ -1701,7 +1825,7 @@ Partial Class Dashboard Me.Panel1.Controls.Add(Me.txtM4_out_PowerAtCrankFromPneumaticsCompressorOFF) Me.Panel1.Controls.Add(Me.txtM4_out_CompresssorPwrOnMinusPwrOff) Me.Panel1.Controls.Add(Me.txtM4_out_CompressorFlowRate) - Me.Panel1.Location = New System.Drawing.Point(327, 281) + Me.Panel1.Location = New System.Drawing.Point(327, 283) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(192, 183) Me.Panel1.TabIndex = 32 @@ -1778,7 +1902,8 @@ Partial Class Dashboard ' Me.lblM3_AveragePneumaticLoad.AutoSize = true Me.lblM3_AveragePneumaticLoad.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.lblM3_AveragePneumaticLoad.Location = New System.Drawing.Point(324, 141) + Me.lblM3_AveragePneumaticLoad.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM3_AveragePneumaticLoad.Location = New System.Drawing.Point(324, 143) Me.lblM3_AveragePneumaticLoad.Name = "lblM3_AveragePneumaticLoad" Me.lblM3_AveragePneumaticLoad.Size = New System.Drawing.Size(195, 13) Me.lblM3_AveragePneumaticLoad.TabIndex = 31 @@ -1791,7 +1916,7 @@ Partial Class Dashboard Me.pnl_M3_Displays.Controls.Add(Me.lbl_M3_AvgPowerAtCrankFromPneumatics) Me.pnl_M3_Displays.Controls.Add(Me.txtM3_out_TotalAirConsumedPerCycleInLitres) Me.pnl_M3_Displays.Controls.Add(Me.txtM3_out_AveragePowerAtCrankFromPneumatics) - Me.pnl_M3_Displays.Location = New System.Drawing.Point(327, 159) + Me.pnl_M3_Displays.Location = New System.Drawing.Point(327, 161) Me.pnl_M3_Displays.Name = "pnl_M3_Displays" Me.pnl_M3_Displays.Size = New System.Drawing.Size(192, 100) Me.pnl_M3_Displays.TabIndex = 30 @@ -1843,7 +1968,8 @@ Partial Class Dashboard ' Me.lblM2AverageElectricalLoadTitle.AutoSize = true Me.lblM2AverageElectricalLoadTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.lblM2AverageElectricalLoadTitle.Location = New System.Drawing.Point(327, 9) + Me.lblM2AverageElectricalLoadTitle.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM2AverageElectricalLoadTitle.Location = New System.Drawing.Point(327, 8) Me.lblM2AverageElectricalLoadTitle.Name = "lblM2AverageElectricalLoadTitle" Me.lblM2AverageElectricalLoadTitle.Size = New System.Drawing.Size(189, 13) Me.lblM2AverageElectricalLoadTitle.TabIndex = 29 @@ -1856,7 +1982,7 @@ Partial Class Dashboard Me.pnl_M2_Displays.Controls.Add(Me.lblM2_AveragePowerDemandAtAlternatorFromElectrics) Me.pnl_M2_Displays.Controls.Add(Me.txtM2_out_AvgPowerAtCrankFromElectrics) Me.pnl_M2_Displays.Controls.Add(Me.txtM2_out_AvgPowerAtAltFromElectrics) - Me.pnl_M2_Displays.Location = New System.Drawing.Point(329, 33) + Me.pnl_M2_Displays.Location = New System.Drawing.Point(329, 35) Me.pnl_M2_Displays.Name = "pnl_M2_Displays" Me.pnl_M2_Displays.Size = New System.Drawing.Size(190, 100) Me.pnl_M2_Displays.TabIndex = 28 @@ -1899,7 +2025,8 @@ Partial Class Dashboard ' Me.lblM1_HVACAverageLoad.AutoSize = true Me.lblM1_HVACAverageLoad.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.lblM1_HVACAverageLoad.Location = New System.Drawing.Point(142, 423) + Me.lblM1_HVACAverageLoad.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM1_HVACAverageLoad.Location = New System.Drawing.Point(142, 425) Me.lblM1_HVACAverageLoad.Name = "lblM1_HVACAverageLoad" Me.lblM1_HVACAverageLoad.Size = New System.Drawing.Size(143, 13) Me.lblM1_HVACAverageLoad.TabIndex = 27 @@ -1916,7 +2043,7 @@ Partial Class Dashboard Me.pnl_M1_Displays.Controls.Add(Me.txtM1_out_AvgPwrAtCrankFromHVACElec) Me.pnl_M1_Displays.Controls.Add(Me.txtM1_out_AvgPowerDemandAtAlternatorHvacElectrics) Me.pnl_M1_Displays.Controls.Add(Me.txtM1_out_AvgPowerDemandAtCrankMech) - Me.pnl_M1_Displays.Location = New System.Drawing.Point(144, 442) + Me.pnl_M1_Displays.Location = New System.Drawing.Point(144, 444) Me.pnl_M1_Displays.Name = "pnl_M1_Displays" Me.pnl_M1_Displays.Size = New System.Drawing.Size(172, 219) Me.pnl_M1_Displays.TabIndex = 26 @@ -1994,7 +2121,8 @@ Partial Class Dashboard ' Me.lblM05SmartalternatorSetEfficiency.AutoSize = true Me.lblM05SmartalternatorSetEfficiency.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.lblM05SmartalternatorSetEfficiency.Location = New System.Drawing.Point(141, 141) + Me.lblM05SmartalternatorSetEfficiency.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM05SmartalternatorSetEfficiency.Location = New System.Drawing.Point(141, 143) Me.lblM05SmartalternatorSetEfficiency.Name = "lblM05SmartalternatorSetEfficiency" Me.lblM05SmartalternatorSetEfficiency.Size = New System.Drawing.Size(169, 13) Me.lblM05SmartalternatorSetEfficiency.TabIndex = 25 @@ -2015,7 +2143,7 @@ Partial Class Dashboard Me.pnl_M05_Displays.Controls.Add(Me.txtM05_out_SmartTractionCurrent) Me.pnl_M05_Displays.Controls.Add(Me.txtM05_Out_AlternatorsEfficiencyIdle) Me.pnl_M05_Displays.Controls.Add(Me.txtM05_OutSmartIdleCurrent) - Me.pnl_M05_Displays.Location = New System.Drawing.Point(142, 158) + Me.pnl_M05_Displays.Location = New System.Drawing.Point(142, 160) Me.pnl_M05_Displays.Name = "pnl_M05_Displays" Me.pnl_M05_Displays.Size = New System.Drawing.Size(174, 259) Me.pnl_M05_Displays.TabIndex = 24 @@ -2126,11 +2254,13 @@ Partial Class Dashboard ' Me.lblM0Outputs.AutoSize = true Me.lblM0Outputs.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + Me.lblM0Outputs.ForeColor = System.Drawing.SystemColors.Highlight Me.lblM0Outputs.Location = New System.Drawing.Point(142, 8) + Me.lblM0Outputs.MaximumSize = New System.Drawing.Size(150, 0) Me.lblM0Outputs.Name = "lblM0Outputs" - Me.lblM0Outputs.Size = New System.Drawing.Size(159, 13) + Me.lblM0Outputs.Size = New System.Drawing.Size(133, 26) Me.lblM0Outputs.TabIndex = 23 - Me.lblM0Outputs.Text = "M0-Non-Smart Alt Set Effic" + Me.lblM0Outputs.Text = "M0-Non-Smart Alt Set Efficiency" ' 'pnl_M0_Displays ' @@ -2140,7 +2270,7 @@ Partial Class Dashboard Me.pnl_M0_Displays.Controls.Add(Me.txtM0_Out_AlternatorsEfficiency) Me.pnl_M0_Displays.Controls.Add(Me.txtM0_Out_HVacElectricalCurrentDemand) Me.pnl_M0_Displays.ForeColor = System.Drawing.Color.Black - Me.pnl_M0_Displays.Location = New System.Drawing.Point(142, 33) + Me.pnl_M0_Displays.Location = New System.Drawing.Point(142, 35) Me.pnl_M0_Displays.Name = "pnl_M0_Displays" Me.pnl_M0_Displays.Size = New System.Drawing.Size(174, 100) Me.pnl_M0_Displays.TabIndex = 22 @@ -2287,81 +2417,103 @@ Partial Class Dashboard ' 'Timer1 ' - ' - 'Panel5 - ' - Me.Panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.Panel5.Controls.Add(Me.lblM8CompressorFlag) - Me.Panel5.Controls.Add(Me.txtM8_out_CompressorFlag) - Me.Panel5.Controls.Add(Me.lblM8SmartElectricalAltPwrGenAtCrank) - Me.Panel5.Controls.Add(Me.lblM8AuxPowerAtCrankFromAllAncillaries) - Me.Panel5.Controls.Add(Me.txtM8_out_SmartElectricalAltPwrGenAtCrank) - Me.Panel5.Controls.Add(Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries) - Me.Panel5.Location = New System.Drawing.Point(834, 34) - Me.Panel5.Name = "Panel5" - Me.Panel5.Size = New System.Drawing.Size(308, 147) - Me.Panel5.TabIndex = 47 - ' - 'lblM8CompressorFlag - ' - Me.lblM8CompressorFlag.AutoSize = true - Me.lblM8CompressorFlag.Location = New System.Drawing.Point(6, 91) - Me.lblM8CompressorFlag.Name = "lblM8CompressorFlag" - Me.lblM8CompressorFlag.Size = New System.Drawing.Size(85, 13) - Me.lblM8CompressorFlag.TabIndex = 6 - Me.lblM8CompressorFlag.Text = "Compressor Flag" - ' - 'txtM8_out_CompressorFlag - ' - Me.txtM8_out_CompressorFlag.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) - Me.txtM8_out_CompressorFlag.Location = New System.Drawing.Point(6, 107) - Me.txtM8_out_CompressorFlag.Name = "txtM8_out_CompressorFlag" - Me.txtM8_out_CompressorFlag.Size = New System.Drawing.Size(100, 20) - Me.txtM8_out_CompressorFlag.TabIndex = 4 - ' - 'lblM8SmartElectricalAltPwrGenAtCrank - ' - Me.lblM8SmartElectricalAltPwrGenAtCrank.AutoSize = true - Me.lblM8SmartElectricalAltPwrGenAtCrank.Location = New System.Drawing.Point(6, 48) - Me.lblM8SmartElectricalAltPwrGenAtCrank.Name = "lblM8SmartElectricalAltPwrGenAtCrank" - Me.lblM8SmartElectricalAltPwrGenAtCrank.Size = New System.Drawing.Size(165, 13) - Me.lblM8SmartElectricalAltPwrGenAtCrank.TabIndex = 3 - Me.lblM8SmartElectricalAltPwrGenAtCrank.Text = "Smart Elec Alt PowerGen@Crank" - ' - 'lblM8AuxPowerAtCrankFromAllAncillaries - ' - Me.lblM8AuxPowerAtCrankFromAllAncillaries.AutoSize = true - Me.lblM8AuxPowerAtCrankFromAllAncillaries.Location = New System.Drawing.Point(6, 9) - Me.lblM8AuxPowerAtCrankFromAllAncillaries.Name = "lblM8AuxPowerAtCrankFromAllAncillaries" - Me.lblM8AuxPowerAtCrankFromAllAncillaries.Size = New System.Drawing.Size(292, 13) - Me.lblM8AuxPowerAtCrankFromAllAncillaries.TabIndex = 2 - Me.lblM8AuxPowerAtCrankFromAllAncillaries.Text = "Aux pwr@CrankFrom Elec,HVAC and Pneumatics Ancillaries" - ' - 'txtM8_out_SmartElectricalAltPwrGenAtCrank - ' - Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) - Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.Location = New System.Drawing.Point(6, 64) - Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.Name = "txtM8_out_SmartElectricalAltPwrGenAtCrank" - Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.Size = New System.Drawing.Size(100, 20) - Me.txtM8_out_SmartElectricalAltPwrGenAtCrank.TabIndex = 1 - ' - 'txtM8_out_AuxPowerAtCrankFromAllAncillaries - ' - Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) - Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.Location = New System.Drawing.Point(6, 25) - Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.Name = "txtM8_out_AuxPowerAtCrankFromAllAncillaries" - Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.Size = New System.Drawing.Size(100, 20) - Me.txtM8_out_AuxPowerAtCrankFromAllAncillaries.TabIndex = 0 - ' - 'lblM8_Title - ' - Me.lblM8_Title.AutoSize = true - Me.lblM8_Title.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) - Me.lblM8_Title.Location = New System.Drawing.Point(838, 8) - Me.lblM8_Title.Name = "lblM8_Title" - Me.lblM8_Title.Size = New System.Drawing.Size(194, 13) - Me.lblM8_Title.TabIndex = 48 - Me.lblM8_Title.Text = "M8-Full Assignment of Aux Loads" + Me.Timer1.Interval = 1000 + ' + 'pnlM9 + ' + Me.pnlM9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.pnlM9.Controls.Add(Me.lblM9TotalCycleFuelConsumptionCompressorOFFContinuously) + Me.pnlM9.Controls.Add(Me.txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously) + Me.pnlM9.Controls.Add(Me.lblM9TotalCycleFuelConsumptionCompressorOnContinuously) + Me.pnlM9.Controls.Add(Me.txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously) + Me.pnlM9.Controls.Add(Me.lblM9LitresOfAirCompressoryOnlyOnInOverrun) + Me.pnlM9.Controls.Add(Me.lblM9LitresOfAirCompressorOnContinuously) + Me.pnlM9.Controls.Add(Me.txtM9_out_LitresOfAirCompressorOnlyOnInOverrun) + Me.pnlM9.Controls.Add(Me.txtM9_out_LitresOfAirConsumptionCompressorONContinuously) + Me.pnlM9.Location = New System.Drawing.Point(837, 224) + Me.pnlM9.Name = "pnlM9" + Me.pnlM9.Size = New System.Drawing.Size(308, 176) + Me.pnlM9.TabIndex = 49 + ' + 'lblM9TotalCycleFuelConsumptionCompressorOnContinuously + ' + Me.lblM9TotalCycleFuelConsumptionCompressorOnContinuously.AutoSize = true + Me.lblM9TotalCycleFuelConsumptionCompressorOnContinuously.Location = New System.Drawing.Point(6, 91) + Me.lblM9TotalCycleFuelConsumptionCompressorOnContinuously.Name = "lblM9TotalCycleFuelConsumptionCompressorOnContinuously" + Me.lblM9TotalCycleFuelConsumptionCompressorOnContinuously.Size = New System.Drawing.Size(291, 13) + Me.lblM9TotalCycleFuelConsumptionCompressorOnContinuously.TabIndex = 6 + Me.lblM9TotalCycleFuelConsumptionCompressorOnContinuously.Text = "Total Cycle Fuel Consumption : Compressor On Continuously" + ' + 'txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously + ' + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously.Location = New System.Drawing.Point(6, 107) + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously.Name = "txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously" + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously.Size = New System.Drawing.Size(100, 20) + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously.TabIndex = 4 + ' + 'lblM9LitresOfAirCompressoryOnlyOnInOverrun + ' + Me.lblM9LitresOfAirCompressoryOnlyOnInOverrun.AutoSize = true + Me.lblM9LitresOfAirCompressoryOnlyOnInOverrun.Location = New System.Drawing.Point(6, 48) + Me.lblM9LitresOfAirCompressoryOnlyOnInOverrun.Name = "lblM9LitresOfAirCompressoryOnlyOnInOverrun" + Me.lblM9LitresOfAirCompressoryOnlyOnInOverrun.Size = New System.Drawing.Size(219, 13) + Me.lblM9LitresOfAirCompressoryOnlyOnInOverrun.TabIndex = 3 + Me.lblM9LitresOfAirCompressoryOnlyOnInOverrun.Text = "Litres Of Air : Compressor Only On In Overrun" + ' + 'lblM9LitresOfAirCompressorOnContinuously + ' + Me.lblM9LitresOfAirCompressorOnContinuously.AutoSize = true + Me.lblM9LitresOfAirCompressorOnContinuously.Location = New System.Drawing.Point(6, 9) + Me.lblM9LitresOfAirCompressorOnContinuously.Name = "lblM9LitresOfAirCompressorOnContinuously" + Me.lblM9LitresOfAirCompressorOnContinuously.Size = New System.Drawing.Size(205, 13) + Me.lblM9LitresOfAirCompressorOnContinuously.TabIndex = 2 + Me.lblM9LitresOfAirCompressorOnContinuously.Text = "Litres Of Air : Compressor On Continuously" + ' + 'txtM9_out_LitresOfAirCompressorOnlyOnInOverrun + ' + Me.txtM9_out_LitresOfAirCompressorOnlyOnInOverrun.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) + Me.txtM9_out_LitresOfAirCompressorOnlyOnInOverrun.Location = New System.Drawing.Point(6, 64) + Me.txtM9_out_LitresOfAirCompressorOnlyOnInOverrun.Name = "txtM9_out_LitresOfAirCompressorOnlyOnInOverrun" + Me.txtM9_out_LitresOfAirCompressorOnlyOnInOverrun.Size = New System.Drawing.Size(100, 20) + Me.txtM9_out_LitresOfAirCompressorOnlyOnInOverrun.TabIndex = 1 + ' + 'txtM9_out_LitresOfAirConsumptionCompressorONContinuously + ' + Me.txtM9_out_LitresOfAirConsumptionCompressorONContinuously.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) + Me.txtM9_out_LitresOfAirConsumptionCompressorONContinuously.Location = New System.Drawing.Point(6, 25) + Me.txtM9_out_LitresOfAirConsumptionCompressorONContinuously.Name = "txtM9_out_LitresOfAirConsumptionCompressorONContinuously" + Me.txtM9_out_LitresOfAirConsumptionCompressorONContinuously.Size = New System.Drawing.Size(100, 20) + Me.txtM9_out_LitresOfAirConsumptionCompressorONContinuously.TabIndex = 0 + ' + 'lblM9Title + ' + Me.lblM9Title.AutoSize = true + Me.lblM9Title.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + Me.lblM9Title.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM9Title.Location = New System.Drawing.Point(831, 190) + Me.lblM9Title.MaximumSize = New System.Drawing.Size(250, 0) + Me.lblM9Title.Name = "lblM9Title" + Me.lblM9Title.Size = New System.Drawing.Size(248, 26) + Me.lblM9Title.TabIndex = 50 + Me.lblM9Title.Text = "M9-Air Delivery & Fuel Calculation Smart And Non Smart Pneumatics Over the cycle" + ' + 'lblM9TotalCycleFuelConsumptionCompressorOFFContinuously + ' + Me.lblM9TotalCycleFuelConsumptionCompressorOFFContinuously.AutoSize = true + Me.lblM9TotalCycleFuelConsumptionCompressorOFFContinuously.Location = New System.Drawing.Point(6, 134) + Me.lblM9TotalCycleFuelConsumptionCompressorOFFContinuously.Name = "lblM9TotalCycleFuelConsumptionCompressorOFFContinuously" + Me.lblM9TotalCycleFuelConsumptionCompressorOFFContinuously.Size = New System.Drawing.Size(297, 13) + Me.lblM9TotalCycleFuelConsumptionCompressorOFFContinuously.TabIndex = 8 + Me.lblM9TotalCycleFuelConsumptionCompressorOFFContinuously.Text = "Total Cycle Fuel Consumption : Compressor OFF Continuously" + ' + 'txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously + ' + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously.Location = New System.Drawing.Point(6, 150) + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously.Name = "txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously" + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously.Size = New System.Drawing.Size(100, 20) + Me.txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously.TabIndex = 7 ' 'Dashboard ' @@ -2391,6 +2543,8 @@ Partial Class Dashboard Me.tabHVACConfig.PerformLayout Me.tabPlayground.ResumeLayout(false) Me.tabPlayground.PerformLayout + Me.pnlM8.ResumeLayout(false) + Me.pnlM8.PerformLayout Me.Panel4.ResumeLayout(false) Me.Panel4.PerformLayout Me.Panel2.ResumeLayout(false) @@ -2412,8 +2566,8 @@ Partial Class Dashboard Me.pnl_M0_Displays.PerformLayout Me.resultCardContextMenu.ResumeLayout(false) CType(Me.ErrorProvider,System.ComponentModel.ISupportInitialize).EndInit - Me.Panel5.ResumeLayout(false) - Me.Panel5.PerformLayout + Me.pnlM9.ResumeLayout(false) + Me.pnlM9.PerformLayout Me.ResumeLayout(false) End Sub @@ -2619,12 +2773,25 @@ End Sub Friend WithEvents txtM7_out_SmartElectricalAndPneumaticAux_AirCompPowerGenAtCrank As System.Windows.Forms.TextBox Friend WithEvents txtM7_out_SmartElectricalAndPneumaticsAux_AltPowerGenAtCrank As System.Windows.Forms.TextBox Friend WithEvents lblM8_Title As System.Windows.Forms.Label - Friend WithEvents Panel5 As System.Windows.Forms.Panel + Friend WithEvents pnlM8 As System.Windows.Forms.Panel Friend WithEvents lblM8CompressorFlag As System.Windows.Forms.Label Friend WithEvents txtM8_out_CompressorFlag As System.Windows.Forms.TextBox Friend WithEvents lblM8SmartElectricalAltPwrGenAtCrank As System.Windows.Forms.Label Friend WithEvents lblM8AuxPowerAtCrankFromAllAncillaries As System.Windows.Forms.Label Friend WithEvents txtM8_out_SmartElectricalAltPwrGenAtCrank As System.Windows.Forms.TextBox Friend WithEvents txtM8_out_AuxPowerAtCrankFromAllAncillaries As System.Windows.Forms.TextBox + Friend WithEvents btnFuelMap As System.Windows.Forms.Button + Friend WithEvents lblFuelMap As System.Windows.Forms.Label + Friend WithEvents txtFuelMap As System.Windows.Forms.TextBox + Friend WithEvents pnlM9 As System.Windows.Forms.Panel + Friend WithEvents lblM9TotalCycleFuelConsumptionCompressorOnContinuously As System.Windows.Forms.Label + Friend WithEvents txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously As System.Windows.Forms.TextBox + Friend WithEvents lblM9LitresOfAirCompressoryOnlyOnInOverrun As System.Windows.Forms.Label + Friend WithEvents lblM9LitresOfAirCompressorOnContinuously As System.Windows.Forms.Label + Friend WithEvents txtM9_out_LitresOfAirCompressorOnlyOnInOverrun As System.Windows.Forms.TextBox + Friend WithEvents txtM9_out_LitresOfAirConsumptionCompressorONContinuously As System.Windows.Forms.TextBox + Friend WithEvents lblM9Title As System.Windows.Forms.Label + Friend WithEvents lblM9TotalCycleFuelConsumptionCompressorOFFContinuously As System.Windows.Forms.Label + Friend WithEvents txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously As System.Windows.Forms.TextBox End Class diff --git a/AuxillaryTestHarness/Dashboard.resx b/AuxillaryTestHarness/Dashboard.resx index 9591f90d7f..8fe69dd870 100644 --- a/AuxillaryTestHarness/Dashboard.resx +++ b/AuxillaryTestHarness/Dashboard.resx @@ -124,7 +124,7 @@ <value>168, 17</value> </metadata> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>25</value> + <value>109</value> </metadata> <metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>543, 19</value> diff --git a/AuxillaryTestHarness/Dashboard.vb b/AuxillaryTestHarness/Dashboard.vb index 556a1377dc..6dc1527cfe 100644 --- a/AuxillaryTestHarness/Dashboard.vb +++ b/AuxillaryTestHarness/Dashboard.vb @@ -114,6 +114,7 @@ Private Sub CreateBindings() txtPowernetVoltage.DataBindings.Add("Text", auxEnvironment.ElectricalUserInputsConfig, "PowerNetVoltage") txtVehicleWeightKG.DataBindings.Add("Text", auxEnvironment.VectoInputs, "VehicleWeightKG") cboCycle.DataBindings.Add("Text", auxEnvironment.VectoInputs, "Cycle") + txtFuelMap.DataBindings.Add("Text",auxEnvironment.VectoInputs,"FuelMap") 'Electricals General txtAlternatorMapPath.DataBindings.Add("Text", auxEnvironment.ElectricalUserInputsConfig, "AlternatorMap") @@ -920,6 +921,13 @@ Private sub RefreshDisplays() txtM8_out_AuxPowerAtCrankFromAllAncillaries.Text = auxEnvironment.M8.AuxPowerAtCrankFromElectricalHVACAndPneumaticsAncillaries txtM8_out_SmartElectricalAltPwrGenAtCrank.Text = auxEnvironment.M8.SmartElectricalAlternatorPowerGenAtCrank txtM8_out_CompressorFlag.Text= auxEnvironment.M8.CompressorFlag + + 'M9 + txtM9_out_LitresOfAirConsumptionCompressorONContinuously.Text= auxEnvironment.M9.LitresOfAirCompressorOnContinually + txtM9_out_LitresOfAirCompressorOnlyOnInOverrun.Text=auxEnvironment.M9.LitresOfAirCompressorOnOnlyInOverrun + txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously.Text=auxEnvironment.M9.TotalCycleFuelConsumptionCompressorOnContinuously + txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously.Text=auxEnvironment.M9.TotalCycleFuelConsumptionCompressorOffContinuously + End Sub @@ -947,12 +955,15 @@ End Sub Private Sub RefreshDisplayValues_Timed( sender As Object, e As EventArgs) Handles Timer1.Tick - + auxEnvironment.M9.CycleStep(1) + SetProcessingStatus() RefreshDisplays() + + End Sub 'Form Overrides diff --git a/AuxillaryTestHarness/testFuelGoodMap.vmap b/AuxillaryTestHarness/testFuelGoodMap.vmap new file mode 100644 index 0000000000..f7ad107b96 --- /dev/null +++ b/AuxillaryTestHarness/testFuelGoodMap.vmap @@ -0,0 +1,186 @@ +engine speed [1/min],torque [Nm],fuel consumption [g/h] +600,-45,0 +600,0,767 +600,100,1759 +600,200,2890 +600,300,4185 +600,400,5404 +600,500,6535 +600,587,7442 +800,-55,0 +800,0,951 +800,100,2346 +800,200,3653 +800,300,5328 +800,400,6903 +800,500,8503 +800,600,10003 +800,700,11641 +800,756,12557 +1000,-63,0 +1000,0,1006 +1000,100,2932 +1000,200,4503 +1000,300,6472 +1000,400,8503 +1000,500,10472 +1000,600,12504 +1000,700,14514 +1000,800,16546 +1000,884,18243 +1200,-75,0 +1200,0,1467 +1200,100,3063 +1200,200,5359 +1200,300,7701 +1200,400,10082 +1200,500,12504 +1200,600,14902 +1200,700,17182 +1200,800,19569 +1200,900,21989 +1300,-81,0 +1300,0,1684 +1300,100,3302 +1300,200,5828 +1300,300,8367 +1300,400,10926 +1300,500,13533 +1300,600,16046 +1300,700,18591 +1300,800,21172 +1300,900,23733 +1400,-88,0 +1400,0,1943 +1400,100,3660 +1400,200,6304 +1400,300,9031 +1400,400,11783 +1400,500,14466 +1400,600,17180 +1400,700,20015 +1400,800,22828 +1400,900,25498 +1500,-93,0 +1500,0,2167 +1500,100,3963 +1500,200,6793 +1500,300,9721 +1500,400,12670 +1500,500,15534 +1500,600,18413 +1500,700,21467 +1500,800,24495 +1500,900,27363 +1600,-98,0 +1600,0,2391 +1600,100,4272 +1600,200,7257 +1600,300,10398 +1600,400,13535 +1600,500,16711 +1600,600,19835 +1600,700,22965 +1600,800,26115 +1600,900,29164 +1700,-101,0 +1700,0,2641 +1700,100,4578 +1700,200,7768 +1700,300,11114 +1700,400,14439 +1700,500,17759 +1700,600,21069 +1700,700,24380 +1700,800,27739 +1700,891,30707 +1800,-104,0 +1800,0,2890 +1800,100,4965 +1800,200,8233 +1800,300,11783 +1800,400,15307 +1800,500,18849 +1800,600,22267 +1800,700,25749 +1800,800,29389 +1800,882,32310 +1900,-108,0 +1900,0,3192 +1900,100,5416 +1900,200,8777 +1900,300,12531 +1900,400,16204 +1900,500,19993 +1900,600,23620 +1900,700,27255 +1900,800,31168 +1900,868,33790 +2000,-112,0 +2000,0,3496 +2000,100,5853 +2000,200,9345 +2000,300,13315 +2000,400,17188 +2000,500,21137 +2000,600,25058 +2000,700,28927 +2000,800,33026 +2000,854,35268 +2150,-119,117 +2150,0,4067 +2150,100,6490 +2150,200,10226 +2150,300,14474 +2150,400,18647 +2150,500,22797 +2150,600,27142 +2150,700,31624 +2150,800,36035 +2150,812,36568 +2200,-126,0 +2200,0,4247 +2200,100,6689 +2200,200,10535 +2200,300,14855 +2200,400,19151 +2200,500,23395 +2200,600,27834 +2200,700,32507 +2200,803,37265 +2300,-131,0 +2300,0,4523 +2300,100,7178 +2300,200,11221 +2300,300,15658 +2300,400,20237 +2300,500,24761 +2300,600,29476 +2300,700,34611 +2300,756,37404 +2400,-136,0 +2400,0,4945 +2400,100,7525 +2400,200,11830 +2400,300,16443 +2400,400,21307 +2400,500,26324 +2400,600,31334 +2400,706,37034 +2500,-141,0 +2500,0,5338 +2500,100,7731 +2500,200,12385 +2500,300,17231 +2500,400,22333 +2500,500,27940 +2500,645,35727 +2600,-146,0 +2600,0,5500 +2600,100,7796 +2600,200,12887 +2600,300,18021 +2600,400,23315 +2600,480,28351 +2700,-150,0 +2700,0,5900 \ No newline at end of file diff --git a/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb b/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb index 5b5d4adbac..e5dbc5ae73 100644 --- a/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb +++ b/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb @@ -4,6 +4,7 @@ Imports VectoAuxiliaries.Pneumatics Imports VectoAuxiliaries.Hvac Imports System.IO Imports VectoAuxiliaries.DownstreamModules +Imports System.Windows.Forms Public Class AuxillaryEnvironment @@ -42,6 +43,7 @@ public Property PneumaticAuxillariesConfig As IPneumaticsAuxilliariesConfig Public M6 As IM6 Public M7 As IM7 Public M8 As IM8 + Public M9 As IM9 @@ -60,6 +62,15 @@ Dim actuationsMap As IPneumaticActuationsMAP = New PneumaticActuationsMAP( Pneu Dim compressorMap As ICompressorMap = New CompressorMap( PneumaticUserInputsConfig.CompressorMap) compressorMap.Initialise() +Dim fuelMap As IFUELMAP = New cMAP() +fuelMap.FilePath= VectoInputs.FuelMap +If Not fuelMap.ReadFile() then +MessageBox.Show("Unable to read fuel map, aborting.") +return +End If +fuelMap.Triangulate() + + ElectricalUserInputsConfig.ElectricalConsumers.DoorDutyCycleFraction = GetDoorActuationTimeFraction() @@ -118,6 +129,8 @@ M7 = New M7(M5,M6,Signals) M8 = New M8(M1,M6,M7,Signals) +M9 = New M9(M1,M4,M6,M8,fuelMap,PneumaticAuxillariesConfig,Signals) + End Sub @@ -136,7 +149,7 @@ Private Sub setDefaults() 'Here's where the magic happens. - VectoInputs = New VectoInputs With {.Cycle="Urban", .VehicleWeightKG=16500, .PowerNetVoltage=26.3, .CycleDurationMinutes=51.9} + VectoInputs = New VectoInputs With {.Cycle="Urban", .VehicleWeightKG=16500, .PowerNetVoltage=26.3, .CycleDurationMinutes=51.9,.FuelMap="testFuelGoodMap.vmap"} 'Pneumatics PneumaticUserInputsConfig = New PneumaticUserInputsConfig(true) @@ -145,8 +158,6 @@ Private Sub setDefaults() - - ElectricalUserInputsConfig = New ElectricsUserInputsConfig() With {.DoorActuationTimeSecond=4, .AlternatorGearEfficiency=0.8, .PowerNetVoltage= VectoInputs.PowerNetVoltage, diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/IFUEL.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/IFUEL.vb deleted file mode 100644 index 27225911e9..0000000000 --- a/VECTOAux/VectoAuxiliaries/DownstreamModules/IFUEL.vb +++ /dev/null @@ -1,19 +0,0 @@ -Public Interface IFUELMAP - - Function ReadFile(Optional ByVal ShowMsg As Boolean = True) As Boolean - Function Pdrag(ByVal nU As Single) As Single - Function Pfull(ByVal nU As Single, ByVal LastPe As Single) As Single - Function Pfull(ByVal nU As Single) As Single - Function Tq(ByVal nU As Single) As Single - Function fNpref(ByVal Nidle As Single) As Single - Function fnUrated() As Single - Function fnUofPfull(ByVal PeTarget As Single, ByVal FromLeft As Boolean) As Single - Function Tmax() As Single - - Sub Init(ByVal Nidle As Single) - Sub DeclInit() - - Property FilePath() As String - - -End Interface diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/IFUELMAP.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/IFUELMAP.vb new file mode 100644 index 0000000000..090945acf0 --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/IFUELMAP.vb @@ -0,0 +1,19 @@ +Public Interface IFUELMAP + + + Function ReadFile(Optional ByVal ShowMsg As Boolean = True) As Boolean + + + Function fFCdelaunay_Intp(ByVal nU As Single, ByVal Tq As Single) As Single + + Function Triangulate() As Boolean + + Property FilePath As String + ReadOnly Property MapDim As Integer + ReadOnly Property Tq As List(Of Single) + ReadOnly Property FC As List(Of Single) + ReadOnly Property nU As List(Of Single) + + + +End Interface diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/IM9.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/IM9.vb index dccdff34bf..b2a52cc9a0 100644 --- a/VECTOAux/VectoAuxiliaries/DownstreamModules/IM9.vb +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/IM9.vb @@ -17,9 +17,6 @@ Public Interface IM9 readonly property TotalCycleFuelConsumptionCompressorOffContinuously as single - - - End Interface diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/M9.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/M9.vb index 1d23b1921d..58eb2c7855 100644 --- a/VECTOAux/VectoAuxiliaries/DownstreamModules/M9.vb +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/M9.vb @@ -9,7 +9,7 @@ Implements IM9 - #Region "Aggregates" +#Region "Aggregates" 'AG1 Private _LitresOfAirCompressorOnContinuallyAggregate As Single @@ -22,14 +22,16 @@ Private _TotalCycleFuelConsumptionCompressorOnContinuouslyAggregate As Single #End Region - #Region "Constructor Requirements" +#Region "Constructor Requirements" + Private M1 As IM1_AverageHVACLoadDemand Private M4 As IM4_AirCompressor Private M6 As IM6 Private M8 As IM8 -Private Signals As ISignals Private FMAP As IFUELMAP Private PSAC As IPneumaticsAuxilliariesConfig +Private Signals As ISignals + #end region #Region "Public Readonly Properties" @@ -114,19 +116,17 @@ End Property Return S9 * PSAC.OverrunUtilisationForCompressionFraction End Get End Property - private ReadOnly Property S11 As Single Get - + Return FMAP.fFCdelaunay_Intp(Signals.EngineSpeed,s7) End Get End Property - private ReadOnly Property S12 As Single + private ReadOnly Property S12 As Single Get - + return FMAP.fFCdelaunay_Intp(Signals.EngineSpeed,s8) End Get End Property - 'Public Utility Methods. Public Sub ClearAggregates() Implements IM9.ClearAggregates _LitresOfAirCompressorOnContinuallyAggregate =0 @@ -136,12 +136,12 @@ End Property End Sub 'Clear down at the beginning of a cycle. - Public Sub CycleStep(Optional stepTimeInSeconds As Single = 0.0) Implements IM9.CycleStep + Public Sub CycleStep(Optional stepTimeInSeconds As Single = 0.0) Implements IM9.CycleStep _LitresOfAirCompressorOnContinuallyAggregate +=stepTimeInSeconds* M4.GetAveragePowerDemandPerCompressorUnitFlowRate _LitresOfAirCompressorOnOnlyInOverrunAggregate +=stepTimeInSeconds * s10 - _TotalCycleFuelConsumptionCompressorOffContinuouslyAggregate +=stepTimeInSeconds * 1 - _TotalCycleFuelConsumptionCompressorOnContinuouslyAggregate+= stepTimeInSeconds * 1 + _TotalCycleFuelConsumptionCompressorOnContinuouslyAggregate+= stepTimeInSeconds * s11 + _TotalCycleFuelConsumptionCompressorOffContinuouslyAggregate +=stepTimeInSeconds * s12 End Sub diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/cDelaunayMap.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/cDelaunayMap.vb new file mode 100644 index 0000000000..d25f29edf6 --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/cDelaunayMap.vb @@ -0,0 +1,493 @@ +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. +Imports System.Collections.Generic + +Public Class cDelaunayMap + + Public ptDim As Integer + + Public ptList As List(Of dPoint) + Private lDT As List(Of dTriangle) + Private planes As List(Of Double()) + + Public DualMode As Boolean + Private ptListXZ As List(Of dPoint) + Private planesXZ As List(Of Double()) + Private lDTXZ As List(Of dTriangle) + + Public ExtrapolError As Boolean + + + Public Sub New() + ptList = New List(Of dPoint) + ptListXZ = New List(Of dPoint) + DualMode = False + End Sub + + Public Sub AddPoints(ByVal X As Double, ByVal Y As Double, ByVal Z As Double) + ptList.Add(New dPoint(X, Y, Z)) + If DualMode Then ptListXZ.Add(New dPoint(X, Z, Y)) + End Sub + + Public Function Triangulate() As Boolean + Dim tr As dTriangle + Dim DT As dTriangulation + + ptDim = ptList.Count - 1 + + 'XY-triangulation + Try + DT = New dTriangulation + lDT = DT.Triangulate(ptList) + Catch ex As Exception + Return False + End Try + + planes = New List(Of Double()) + + For Each tr In lDT + planes.Add(GetPlane(tr)) + Next + + + + '#If DEBUG Then + ' Dim i As Int16 + ' Debug.Print("#,x1,y1,z1,x2,y2,z2") + ' i = -1 + ' For Each tr In lDT + ' i += 1 + ' Debug.Print(i & "," & tr.P1.X & "," & tr.P1.Y & "," & tr.P1.Z & "," & tr.P2.X & "," & tr.P2.Y & "," & tr.P2.Z) + ' Debug.Print(i & "," & tr.P3.X & "," & tr.P3.Y & "," & tr.P3.Z & "," & tr.P2.X & "," & tr.P2.Y & "," & tr.P2.Z) + ' Debug.Print(i & "," & tr.P1.X & "," & tr.P1.Y & "," & tr.P1.Z & "," & tr.P3.X & "," & tr.P3.Y & "," & tr.P3.Z) + ' Next + '#End If + + + + 'XZ-triangulation + If DualMode Then + + If ptDim <> ptListXZ.Count - 1 Then Return False + + Try + DT = New dTriangulation + lDTXZ = DT.Triangulate(ptListXZ) + Catch ex As Exception + Return False + End Try + + planesXZ = New List(Of Double()) + + For Each tr In lDTXZ + planesXZ.Add(GetPlane(tr)) + Next + + End If + + Return True + + End Function + + 'XY => Z Interpolation + Public Function Intpol(ByVal x As Double, ByVal y As Double) As Double + Dim j As Integer + Dim l0 As Double() + Dim tr As dTriangle + + ExtrapolError = False + + 'Try exact solution for IsInside() + j = -1 + For Each tr In lDT + j += 1 + If IsInside(tr, x, y, True) Then + l0 = planes(j) + Return (l0(3) - x * l0(0) - y * l0(1)) / l0(2) + End If + Next + + 'Try approx. solution (fixes rounding errors when points lies exactly on an edge of a triangle) + j = -1 + For Each tr In lDT + j += 1 + If IsInside(tr, x, y, False) Then + l0 = planes(j) + Return (l0(3) - x * l0(0) - y * l0(1)) / l0(2) + End If + Next + + + + 'ERROR: Extrapolation + ExtrapolError = True + + Return Nothing + + End Function + + 'XZ => Y Interpolation + Public Function IntpolXZ(ByVal x As Double, ByVal z As Double) As Double + Dim j As Integer + Dim l0 As Double() + Dim tr As dTriangle + + ExtrapolError = False + + If DualMode Then + + j = -1 + + 'Try exact solution for IsInside() + For Each tr In lDTXZ + j += 1 + If IsInside(tr, x, z, True) Then + l0 = planesXZ(j) + Return (l0(3) - x * l0(0) - z * l0(1)) / l0(2) + End If + Next + + 'Try approx. solution (fixes rounding errors when points lies exactly on an edge of a triangle) + For Each tr In lDTXZ + j += 1 + If IsInside(tr, x, z, False) Then + l0 = planesXZ(j) + Return (l0(3) - x * l0(0) - z * l0(1)) / l0(2) + End If + Next + + 'ERROR: Extrapolation + ExtrapolError = True + Return Nothing + + Else + + 'ERROR: Extrapolation + ExtrapolError = True + Return Nothing + + End If + End Function + + Private Function GetPlane(ByRef tr As dTriangle) As Double() + Dim AB As dPoint + Dim AC As dPoint + Dim cross As dPoint + Dim l(3) As Double + Dim pt1 As dPoint + Dim pt2 As dPoint + Dim pt3 As dPoint + + pt1 = tr.P1 + pt2 = tr.P2 + pt3 = tr.P3 + + AB = New dPoint(pt2.X - pt1.X, pt2.Y - pt1.Y, pt2.Z - pt1.Z) + AC = New dPoint(pt3.X - pt1.X, pt3.Y - pt1.Y, pt3.Z - pt1.Z) + + cross = New dPoint(AB.Y * AC.Z - AB.Z * AC.Y, AB.Z * AC.X - AB.X * AC.Z, AB.X * AC.Y - AB.Y * AC.X) + + l(0) = cross.X + l(1) = cross.Y + l(2) = cross.Z + + l(3) = pt1.X * cross.X + pt1.Y * cross.Y + pt1.Z * cross.Z + + Return l + + End Function + + Private Function IsInside(ByRef tr As dTriangle, ByVal xges As Double, ByVal yges As Double, ByVal Exact As Boolean) As Boolean + Dim v0(1) As Double + Dim v1(1) As Double + Dim v2(1) As Double + Dim dot00 As Double + Dim dot01 As Double + Dim dot02 As Double + Dim dot11 As Double + Dim dot12 As Double + Dim invDenom As Double + Dim u As Double + Dim v As Double + Dim pt1 As dPoint + Dim pt2 As dPoint + Dim pt3 As dPoint + + pt1 = tr.P1 + pt2 = tr.P2 + pt3 = tr.P3 + + 'Quelle: http://www.blackpawn.com/texts/pointinpoly/default.html (Barycentric Technique) + + ' Compute vectors + v0(0) = pt3.X - pt1.X + v0(1) = pt3.Y - pt1.Y + + v1(0) = pt2.X - pt1.X + v1(1) = pt2.Y - pt1.Y + + v2(0) = xges - pt1.X + v2(1) = yges - pt1.Y + + ' Compute dot products + dot00 = v0(0) * v0(0) + v0(1) * v0(1) + dot01 = v0(0) * v1(0) + v0(1) * v1(1) + dot02 = v0(0) * v2(0) + v0(1) * v2(1) + dot11 = v1(0) * v1(0) + v1(1) * v1(1) + dot12 = v1(0) * v2(0) + v1(1) * v2(1) + + ' Compute barycentric coordinates + invDenom = 1 / (dot00 * dot11 - dot01 * dot01) + u = (dot11 * dot02 - dot01 * dot12) * invDenom + v = (dot00 * dot12 - dot01 * dot02) * invDenom + + 'Debug.Print(u & ", " & v & ", " & u + v) + + ' Check if point is in triangle + If Exact Then + Return (u >= 0) And (v >= 0) And (u + v <= 1) + Else + Return (u >= -0.001) And (v >= -0.001) And (u + v <= 1.001) + End If + + End Function + + Public Class dPoint + Public X As Double + Public Y As Double + Public Z As Double + + Public Sub New(ByVal xd As Double, ByVal yd As Double, ByVal zd As Double) + X = xd + Y = yd + Z = zd + End Sub + + Public Shared Operator =(left As dPoint, right As dPoint) As Boolean + + 'If DirectCast(left, Object) = DirectCast(right, Object) Then + ' Return True + 'End If + + 'If (DirectCast(left, Object) Is Nothing) OrElse (DirectCast(right, Object) Is Nothing) Then + ' Return False + 'End If + + ' Just compare x and y here... + If left.X <> right.X Then + Return False + End If + + If left.Y <> right.Y Then + Return False + End If + + Return True + + End Operator + + Public Shared Operator <>(left As dPoint, right As dPoint) As Boolean + Return Not (left = right) + End Operator + + + End Class + + Public Class dTriangle + Public P1 As dPoint + Public P2 As dPoint + Public P3 As dPoint + + Public Sub New(ByRef pp1 As dPoint, ByRef pp2 As dPoint, ByRef pp3 As dPoint) + P1 = pp1 + P2 = pp2 + P3 = pp3 + End Sub + + Public Function ContainsInCircumcircle(pt As dPoint) As Double + Dim ax As Double = Me.P1.X - pt.X + Dim ay As Double = Me.P1.Y - pt.Y + Dim bx As Double = Me.P2.X - pt.X + Dim by As Double = Me.P2.Y - pt.Y + Dim cx As Double = Me.P3.X - pt.X + Dim cy As Double = Me.P3.Y - pt.Y + Dim det_ab As Double = ax * by - bx * ay + Dim det_bc As Double = bx * cy - cx * by + Dim det_ca As Double = cx * ay - ax * cy + Dim a_squared As Double = ax * ax + ay * ay + Dim b_squared As Double = bx * bx + by * by + Dim c_squared As Double = cx * cx + cy * cy + + Return a_squared * det_bc + b_squared * det_ca + c_squared * det_ab + + End Function + + Public Function SharesVertexWith(triangle As dTriangle) As Boolean + If Me.P1.X = triangle.P1.X AndAlso Me.P1.Y = triangle.P1.Y Then + Return True + End If + If Me.P1.X = triangle.P2.X AndAlso Me.P1.Y = triangle.P2.Y Then + Return True + End If + If Me.P1.X = triangle.P3.X AndAlso Me.P1.Y = triangle.P3.Y Then + Return True + End If + + If Me.P2.X = triangle.P1.X AndAlso Me.P2.Y = triangle.P1.Y Then + Return True + End If + If Me.P2.X = triangle.P2.X AndAlso Me.P2.Y = triangle.P2.Y Then + Return True + End If + If Me.P2.X = triangle.P3.X AndAlso Me.P2.Y = triangle.P3.Y Then + Return True + End If + + If Me.P3.X = triangle.P1.X AndAlso Me.P3.Y = triangle.P1.Y Then + Return True + End If + If Me.P3.X = triangle.P2.X AndAlso Me.P3.Y = triangle.P2.Y Then + Return True + End If + If Me.P3.X = triangle.P3.X AndAlso Me.P3.Y = triangle.P3.Y Then + Return True + End If + + Return False + End Function + + End Class + + Public Class dEdge + Public StartPoint As dPoint + Public EndPoint As dPoint + + Public Sub New(ByRef p1 As dPoint, ByRef p2 As dPoint) + StartPoint = p1 + EndPoint = p2 + End Sub + + Public Shared Operator =(left As dEdge, right As dEdge) As Boolean + 'If DirectCast(left, Object) = DirectCast(right, Object) Then + ' Return True + 'End If + + 'If (DirectCast(left, Object) Is Nothing) Or (DirectCast(right, Object) Is Nothing) Then + ' Return False + 'End If + + Return ((left.StartPoint = right.StartPoint AndAlso left.EndPoint = right.EndPoint) OrElse (left.StartPoint = right.EndPoint AndAlso left.EndPoint = right.StartPoint)) + End Operator + + Public Shared Operator <>(left As dEdge, right As dEdge) As Boolean + Return Not (left = right) + End Operator + + + End Class + + Public Class dTriangulation + + Public Function Triangulate(triangulationPoints As List(Of dPoint)) As List(Of dTriangle) + If triangulationPoints.Count < 3 Then + Throw New ArgumentException("Can not triangulate less than three vertices!") + End If + + ' The triangle list + Dim triangles As New List(Of dTriangle)() + + + + ' The "supertriangle" which encompasses all triangulation points. + ' This triangle initializes the algorithm and will be removed later. + Dim superTriangle As dTriangle = Me.SuperTriangle(triangulationPoints) + triangles.Add(superTriangle) + + ' Include each point one at a time into the existing triangulation + For i As Integer = 0 To triangulationPoints.Count - 1 + ' Initialize the edge buffer. + Dim EdgeBuffer As New List(Of dEdge)() + + ' If the actual vertex lies inside the circumcircle, then the three edges of the + ' triangle are added to the edge buffer and the triangle is removed from list. + For j As Integer = triangles.Count - 1 To 0 Step -1 + Dim t As dTriangle = triangles(j) + If t.ContainsInCircumcircle(triangulationPoints(i)) > 0 Then + EdgeBuffer.Add(New dEdge(t.P1, t.P2)) + EdgeBuffer.Add(New dEdge(t.P2, t.P3)) + EdgeBuffer.Add(New dEdge(t.P3, t.P1)) + triangles.RemoveAt(j) + End If + Next + + ' Remove duplicate edges. This leaves the convex hull of the edges. + ' The edges in this convex hull are oriented counterclockwise! + For j As Integer = EdgeBuffer.Count - 2 To 0 Step -1 + For k As Integer = EdgeBuffer.Count - 1 To j + 1 Step -1 + If EdgeBuffer(j) = EdgeBuffer(k) Then + EdgeBuffer.RemoveAt(k) + EdgeBuffer.RemoveAt(j) + k -= 1 + Continue For + End If + Next + Next + + ' Generate new counterclockwise oriented triangles filling the "hole" in + ' the existing triangulation. These triangles all share the actual vertex. + For j As Integer = 0 To EdgeBuffer.Count - 1 + triangles.Add(New dTriangle(EdgeBuffer(j).StartPoint, EdgeBuffer(j).EndPoint, triangulationPoints(i))) + Next + Next + + ' We don't want the supertriangle in the triangulation, so + ' remove all triangles sharing a vertex with the supertriangle. + For i As Integer = triangles.Count - 1 To 0 Step -1 + If triangles(i).SharesVertexWith(superTriangle) Then + triangles.RemoveAt(i) + End If + Next + + ' Return the triangles + Return triangles + End Function + + + + + Private Function SuperTriangle(triangulationPoints As List(Of dPoint)) As dTriangle + Dim M As Double = triangulationPoints(0).X + + ' get the extremal x and y coordinates + For i As Integer = 1 To triangulationPoints.Count - 1 + Dim xAbs As Double = Math.Abs(triangulationPoints(i).X) + Dim yAbs As Double = Math.Abs(triangulationPoints(i).Y) + If xAbs > M Then + M = xAbs + End If + If yAbs > M Then + M = yAbs + End If + Next + + ' make a triangle + Dim sp1 As New dPoint(10 * M, 0, 0) + Dim sp2 As New dPoint(0, 10 * M, 0) + Dim sp3 As New dPoint(-10 * M, -10 * M, 0) + + Return New dTriangle(sp1, sp2, sp3) + End Function + + End Class + + +End Class + diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/cFile V3.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/cFile V3.vb new file mode 100644 index 0000000000..f8520f5324 --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/cFile V3.vb @@ -0,0 +1,150 @@ +' Copyright 2014 European Union. +' Licensed under the EUPL (the 'Licence'); +' +' * You may not use this work except in compliance with the Licence. +' * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl +' * Unless required by applicable law or agreed to in writing, +' software distributed under the Licence is distributed on an "AS IS" basis, +' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +' +' See the LICENSE.txt for the specific language governing permissions and limitations. +Public Class cFile_V3 + + Private TxtFldParser As Microsoft.VisualBasic.FileIO.TextFieldParser + Private StrWrter As System.IO.StreamWriter + Private Mode As FileMode + Private Path As String + Private Sepp As String + Private SkipCom As Boolean + Private StopE As Boolean + Private FileOpen As Boolean + Private PreLine As String() + Private FileEnd As Boolean + + 'File format + private FileFormat As System.Text.Encoding = System.Text.Encoding.UTF8 + + Public Sub New() + Me.Reset() + End Sub + + Private Sub Reset() + FileOpen = False + Mode = FileMode.Undefined + PreLine = Nothing + FileEnd = False + End Sub + + Public Function OpenRead(ByVal FileName As String, Optional ByVal Separator As String = ",", Optional ByVal SkipComment As Boolean = True, Optional ByVal StopAtE As Boolean = False) As Boolean + Me.Reset() + StopE = StopAtE + Path = FileName + Sepp = Separator + SkipCom = SkipComment + If Not (Mode = FileMode.Undefined) Then Return False + If Not IO.File.Exists(Path) Then Return False + Mode = FileMode.Read + Try + TxtFldParser = New Microsoft.VisualBasic.FileIO.TextFieldParser(Path, System.Text.Encoding.Default) + FileOpen = True + Catch ex As Exception + Return False + End Try + TxtFldParser.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited + TxtFldParser.Delimiters = New String() {Sepp} + + 'If TxtFldParser.EndOfData Then Return False + + Me.ReadLine() + Return True + End Function + + Public Function ReadLine() As String() + Dim line As String() + Dim line0 As String + + line = PreLine + +lb10: + If TxtFldParser.EndOfData Then + + FileEnd = True + + Else + + PreLine = TxtFldParser.ReadFields + line0 = UCase(Trim(PreLine(0))) + + If SkipCom Then + If Left(line0, 1) = "#" Then GoTo lb10 + End If + + If StopE Then FileEnd = (line0 = "E") + + End If + + Return line + + End Function + + Public Sub Close() + Select Case Mode + Case FileMode.Read + If FileOpen Then TxtFldParser.Close() + TxtFldParser = Nothing + Case FileMode.Write + If FileOpen Then StrWrter.Close() + StrWrter = Nothing + End Select + Me.Reset() + End Sub + + Public ReadOnly Property EndOfFile() As Boolean + Get + Return FileEnd + End Get + End Property + + Public Function OpenWrite(ByVal FileName As String, Optional ByVal Separator As String = ",", Optional ByVal AutoFlush As Boolean = False, Optional ByVal Append As Boolean = False) As Boolean + Me.Reset() + Path = FileName + Sepp = Separator + If Not (Mode = FileMode.Undefined) Then Return False + Mode = FileMode.Write + Try + StrWrter = My.Computer.FileSystem.OpenTextFileWriter(Path, Append, FileFormat) + FileOpen = True + Catch ex As Exception + Return False + End Try + StrWrter.AutoFlush = AutoFlush + Return True + End Function + + Public Sub WriteLine(ByVal ParamArray x() As Object) + Dim St As String + Dim StB As New System.Text.StringBuilder + Dim Skip As Boolean + Skip = True + For Each St In x + If Skip Then + StB.Append(St) + Skip = False + Else + StB.Append(Sepp & St) + End If + Next + StrWrter.WriteLine(StB.ToString) + StB = Nothing + End Sub + Public Sub WriteLine(ByVal x As String) + StrWrter.WriteLine(x) + End Sub + + Private Enum FileMode + Undefined + Read + Write + End Enum + +End Class diff --git a/VECTOAux/VectoAuxiliaries/IVectoInputs.vb b/VECTOAux/VectoAuxiliaries/IVectoInputs.vb index 91d72a413b..6d6634dfd7 100644 --- a/VECTOAux/VectoAuxiliaries/IVectoInputs.vb +++ b/VECTOAux/VectoAuxiliaries/IVectoInputs.vb @@ -4,6 +4,7 @@ Property VehicleWeightKG As Single Property Cycle As String Property PowerNetVoltage As Single Property CycleDurationMinutes As single +Property FuelMap As string End Interface diff --git a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj index a0e78c86f5..4ae6521c6d 100644 --- a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj +++ b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj @@ -73,8 +73,10 @@ </ItemGroup> <ItemGroup> <Compile Include="AuxillaryEnvironment.vb" /> + <Compile Include="DownstreamModules\cDelaunayMap.vb" /> + <Compile Include="DownstreamModules\cFile V3.vb" /> <Compile Include="DownstreamModules\cMAP.vb" /> - <Compile Include="DownstreamModules\IFUEL.vb" /> + <Compile Include="DownstreamModules\IFUELMAP.vb" /> <Compile Include="DownstreamModules\IM6.vb" /> <Compile Include="DownstreamModules\IM7.vb" /> <Compile Include="DownstreamModules\IM8.vb" /> diff --git a/VECTOAux/VectoAuxiliaries/VectoInputs.vb b/VECTOAux/VectoAuxiliaries/VectoInputs.vb index 5c6a9df837..198cd7ba8f 100644 --- a/VECTOAux/VectoAuxiliaries/VectoInputs.vb +++ b/VECTOAux/VectoAuxiliaries/VectoInputs.vb @@ -4,9 +4,6 @@ Public Class VectoInputs Implements IVectoInputs - - - Public Property Cycle As String Implements IVectoInputs.Cycle Public Property VehicleWeightKG As Single Implements IVectoInputs.VehicleWeightKG @@ -15,5 +12,7 @@ Implements IVectoInputs Public Property CycleDurationMinutes As Single Implements IVectoInputs.CycleDurationMinutes + Public Property FuelMap As String Implements IVectoInputs.FuelMap + End Class diff --git a/VECTOAux/VectoAuxiliariesTests/TestFiles/testFuelGoodMap.vmap b/VECTOAux/VectoAuxiliariesTests/TestFiles/testFuelGoodMap.vmap new file mode 100644 index 0000000000..f7ad107b96 --- /dev/null +++ b/VECTOAux/VectoAuxiliariesTests/TestFiles/testFuelGoodMap.vmap @@ -0,0 +1,186 @@ +engine speed [1/min],torque [Nm],fuel consumption [g/h] +600,-45,0 +600,0,767 +600,100,1759 +600,200,2890 +600,300,4185 +600,400,5404 +600,500,6535 +600,587,7442 +800,-55,0 +800,0,951 +800,100,2346 +800,200,3653 +800,300,5328 +800,400,6903 +800,500,8503 +800,600,10003 +800,700,11641 +800,756,12557 +1000,-63,0 +1000,0,1006 +1000,100,2932 +1000,200,4503 +1000,300,6472 +1000,400,8503 +1000,500,10472 +1000,600,12504 +1000,700,14514 +1000,800,16546 +1000,884,18243 +1200,-75,0 +1200,0,1467 +1200,100,3063 +1200,200,5359 +1200,300,7701 +1200,400,10082 +1200,500,12504 +1200,600,14902 +1200,700,17182 +1200,800,19569 +1200,900,21989 +1300,-81,0 +1300,0,1684 +1300,100,3302 +1300,200,5828 +1300,300,8367 +1300,400,10926 +1300,500,13533 +1300,600,16046 +1300,700,18591 +1300,800,21172 +1300,900,23733 +1400,-88,0 +1400,0,1943 +1400,100,3660 +1400,200,6304 +1400,300,9031 +1400,400,11783 +1400,500,14466 +1400,600,17180 +1400,700,20015 +1400,800,22828 +1400,900,25498 +1500,-93,0 +1500,0,2167 +1500,100,3963 +1500,200,6793 +1500,300,9721 +1500,400,12670 +1500,500,15534 +1500,600,18413 +1500,700,21467 +1500,800,24495 +1500,900,27363 +1600,-98,0 +1600,0,2391 +1600,100,4272 +1600,200,7257 +1600,300,10398 +1600,400,13535 +1600,500,16711 +1600,600,19835 +1600,700,22965 +1600,800,26115 +1600,900,29164 +1700,-101,0 +1700,0,2641 +1700,100,4578 +1700,200,7768 +1700,300,11114 +1700,400,14439 +1700,500,17759 +1700,600,21069 +1700,700,24380 +1700,800,27739 +1700,891,30707 +1800,-104,0 +1800,0,2890 +1800,100,4965 +1800,200,8233 +1800,300,11783 +1800,400,15307 +1800,500,18849 +1800,600,22267 +1800,700,25749 +1800,800,29389 +1800,882,32310 +1900,-108,0 +1900,0,3192 +1900,100,5416 +1900,200,8777 +1900,300,12531 +1900,400,16204 +1900,500,19993 +1900,600,23620 +1900,700,27255 +1900,800,31168 +1900,868,33790 +2000,-112,0 +2000,0,3496 +2000,100,5853 +2000,200,9345 +2000,300,13315 +2000,400,17188 +2000,500,21137 +2000,600,25058 +2000,700,28927 +2000,800,33026 +2000,854,35268 +2150,-119,117 +2150,0,4067 +2150,100,6490 +2150,200,10226 +2150,300,14474 +2150,400,18647 +2150,500,22797 +2150,600,27142 +2150,700,31624 +2150,800,36035 +2150,812,36568 +2200,-126,0 +2200,0,4247 +2200,100,6689 +2200,200,10535 +2200,300,14855 +2200,400,19151 +2200,500,23395 +2200,600,27834 +2200,700,32507 +2200,803,37265 +2300,-131,0 +2300,0,4523 +2300,100,7178 +2300,200,11221 +2300,300,15658 +2300,400,20237 +2300,500,24761 +2300,600,29476 +2300,700,34611 +2300,756,37404 +2400,-136,0 +2400,0,4945 +2400,100,7525 +2400,200,11830 +2400,300,16443 +2400,400,21307 +2400,500,26324 +2400,600,31334 +2400,706,37034 +2500,-141,0 +2500,0,5338 +2500,100,7731 +2500,200,12385 +2500,300,17231 +2500,400,22333 +2500,500,27940 +2500,645,35727 +2600,-146,0 +2600,0,5500 +2600,100,7796 +2600,200,12887 +2600,300,18021 +2600,400,23315 +2600,480,28351 +2700,-150,0 +2700,0,5900 \ No newline at end of file diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/FuelMapTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/FuelMapTests.vb new file mode 100644 index 0000000000..62345a92a0 --- /dev/null +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/FuelMapTests.vb @@ -0,0 +1,40 @@ +Imports VectoAuxiliaries.Electrics +Imports VectoAuxiliaries.Pneumatics +Imports VectoAuxiliaries.Hvac +Imports VectoAuxiliaries.DownstreamModules +Imports NUnit.Framework +Imports VectoAuxiliaries +Imports Moq + +Namespace UnitTests + +<TestFixture()> _ +Public Class FuelMapTests + +Public Const GOODMAP As String = "TestFiles\TestFuelGoodMap.vmap" + +<Test()> _ +Public Sub createNewInstance() + +Dim target = New cMAP() +Assert.IsNotNull(target) + +End Sub + +<Test()> _ +Public Sub ReadMapTest() + +Dim target = New cMAP() +target.FilePath=GOODMAP +Dim actual As Boolean = target.ReadFile() + +Assert.AreEqual(True,actual) + +End Sub + +End Class + +End Namespace + + + diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M9Tests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M9Tests.vb index c987b173aa..d72127dd74 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M9Tests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M9Tests.vb @@ -10,23 +10,84 @@ Namespace UnitTests <TestFixture()> Public Class M9Tests + +public class MockFuel50PC +Implements IFUELMAP + + Public Function fFCdelaunay_Intp(nU As Single, Tq As Single) As Single Implements IFUELMAP.fFCdelaunay_Intp + + Return (nU + Tq ) * 0.5 + + End Function + + Public Property FilePath As String Implements IFUELMAP.FilePath + + Public Function ReadFile(Optional ShowMsg As Boolean = True) As Boolean Implements IFUELMAP.ReadFile + Return true + End Function + +End Class + + Private M1 As IM1_AverageHVACLoadDemand Private M4 As IM4_AirCompressor Private M6 As IM6 Private M8 As IM8 -<Test()> -Public sub CreateNewInstanceTest() +<Test()> _ +<TestCase(50,50,400,200,100,1200,50,0,0,0.5f,50f,0,650.2083333f,650.125f)> _ +<TestCase(50,50,400,200,100,1200,50,1,0,0.5f,50f,0,650.2083333f,650.125f)> _ +<TestCase(50,50,400,200,100,1200,50,0,1,0.5f,50f,0,650.2083333f,650.125f)> _ +<TestCase(50,50,400,200,100,1200,50,1,1,0.5f,50f,25,650.2083333f,650.125f)> _ +Public Sub ValuesInOutTests(IP1 As Single, + IP2 As Single, + IP3 As Single, + IP4 As Single, + IP5 As Single, + IP6 As Single, + IP7 As Single, + IP8 As Single, + IP9 As Single, + IP10 As Single, + AG1 As Single, + AG2 As Single, + AG3 As Single, + AG4 As Single) + + Dim m1Mock As New Mock(Of IM1_AverageHVACLoadDemand) + Dim m4Mock As New Mock(Of IM4_AirCompressor) + Dim m6Mock As New Mock(Of IM6) + Dim m8Mock As New Mock(Of IM8) + Dim fMapMock As New MockFuel50PC() + Dim sgnlsMock As New Mock(Of ISignals) + Dim psac As New Mock(Of IPneumaticsAuxilliariesConfig ) + + m6Mock.Setup ( Function(x) x.AvgPowerDemandAtCrankFromElectricsIncHVAC ) .Returns(IP1) + m1Mock.Setup ( Function(x) x.AveragePowerDemandAtCrankFromHVACMechanicalsWatts ).Returns(IP2) + m4Mock.Setup ( Function(x) x.GetPowerCompressorOn) .Returns(IP3) + m4Mock.Setup ( Function(x) x.GetPowerCompressorOff) .Returns(IP4) + sgnlsMock.Setup( Function(x) x.EngineDrivelineTorque) .Returns(IP5) + sgnlsMock.Setup( Function(x) x.EngineSpeed) .Returns(IP6) + m4Mock.Setup ( Function(x) x.GetAveragePowerDemandPerCompressorUnitFlowRate) .Returns(IP7) + m6Mock.Setup ( Function(x) x.OverrunFlag) .Returns(IP8) + m8Mock.Setup ( Function(x) x.CompressorFlag) .Returns(IP9) + psac.Setup ( Function(x) x.OverrunUtilisationForCompressionFraction) .Returns(IP10) -Dim m1Mock As New Mock(Of IM1_AverageHVACLoadDemand) -Dim m4Mock As New Mock(Of IM4_AirCompressor) -Dim m6Mock As New Mock(Of IM6) -Dim m8Mock As New Mock(Of IM8) + Dim target As New M9( m1Mock.Object, m4Mock.Object, m6Mock.Object,m8Mock.Object,fMapMock,psac.Object,sgnlsMock.Object) + + target.CycleStep(1) + + Assert.AreEqual(target.LitresOfAirCompressorOnContinually , AG1 ) + Assert.AreEqual(target.LitresOfAirCompressorOnOnlyInOverrun , AG2 ) + Assert.AreEqual(target.TotalCycleFuelConsumptionCompressorOnContinuously , AG3 ) + Assert.AreEqual(target.TotalCycleFuelConsumptionCompressorOffContinuously, AG4 ) End Sub + + End Class End Namespace diff --git a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj index dd11003841..cb85d7b10c 100644 --- a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj +++ b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj @@ -98,6 +98,7 @@ <Compile Include="Mocks\M5_Mock.vb" /> <Compile Include="Mocks\M6_Mock.vb" /> <Compile Include="Mocks\M7_Mock.vb" /> + <Compile Include="UnitTests\FuelMapTests.vb" /> <Compile Include="UnitTests\M0_5_SmartAlternatorSetEfficiencyTests.vb" /> <Compile Include="UnitTests\M0_NonSmart_AlternatorsSetEfficiencyTests.vb" /> <Compile Include="UnitTests\AveragePneumaticLoadDemandTests.vb" /> @@ -209,6 +210,9 @@ <Content Include="TestFiles\CombinedAlternatorPowerMap.csv"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> + <Content Include="TestFiles\testFuelGoodMap.vmap"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> <None Include="TestFiles\HVACMap.vaux" /> <Content Include="TestFiles\TestHvacMap - ExtraBlankLines.csv"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> -- GitLab