diff --git a/AuxillaryTestHarness/AuxillaryTestHarness.vbproj b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj index 5876413d9d69dd1103f389015d0b39d0f354a5a8..5f0a247b96036af9f2271b063ddb7fe3a5068c6f 100644 --- a/AuxillaryTestHarness/AuxillaryTestHarness.vbproj +++ b/AuxillaryTestHarness/AuxillaryTestHarness.vbproj @@ -28,7 +28,7 @@ <UpdatePeriodically>false</UpdatePeriodically> <UpdateRequired>false</UpdateRequired> <MapFileExtensions>true</MapFileExtensions> - <ApplicationRevision>11</ApplicationRevision> + <ApplicationRevision>12</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> <UseApplicationTrust>false</UseApplicationTrust> <PublishWizardCompleted>true</PublishWizardCompleted> diff --git a/AuxillaryTestHarness/Dashboard.Designer.vb b/AuxillaryTestHarness/Dashboard.Designer.vb index ce1db6487cb13d33c230babb44264daad0c7f72d..ee157d8cb1fdc5b35d77952afe9c209e76059e29 100644 --- a/AuxillaryTestHarness/Dashboard.Designer.vb +++ b/AuxillaryTestHarness/Dashboard.Designer.vb @@ -257,6 +257,12 @@ 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.lblM10_Title = New System.Windows.Forms.Label() + Me.pnlM10 = New System.Windows.Forms.Panel() + Me.lblM10_BaseFuelConsumptionAithAverageAuxLoads = New System.Windows.Forms.Label() + Me.txtM10_out_BaseFCWithAvgAuxLoads = New System.Windows.Forms.TextBox() + Me.lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand = New System.Windows.Forms.Label() + Me.txtM10_out_FCWithSmartPSAndAvgElecPowerDemand = New System.Windows.Forms.TextBox() Me.pnlMain.SuspendLayout Me.tabMain.SuspendLayout Me.tabGeneralConfig.SuspendLayout @@ -284,6 +290,7 @@ Partial Class Dashboard Me.pnl_M0_Displays.SuspendLayout Me.resultCardContextMenu.SuspendLayout CType(Me.ErrorProvider,System.ComponentModel.ISupportInitialize).BeginInit + Me.pnlM10.SuspendLayout Me.SuspendLayout ' 'pnlMain @@ -293,7 +300,7 @@ Partial Class Dashboard Me.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill Me.pnlMain.Location = New System.Drawing.Point(0, 0) Me.pnlMain.Name = "pnlMain" - Me.pnlMain.Size = New System.Drawing.Size(1190, 794) + Me.pnlMain.Size = New System.Drawing.Size(1279, 794) Me.pnlMain.TabIndex = 1 ' 'btnCancel @@ -1264,6 +1271,8 @@ Partial Class Dashboard 'tabPlayground ' Me.tabPlayground.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.tabPlayground.Controls.Add(Me.pnlM10) + Me.tabPlayground.Controls.Add(Me.lblM10_Title) Me.tabPlayground.Controls.Add(Me.lblM9Title) Me.tabPlayground.Controls.Add(Me.pnlM9) Me.tabPlayground.Controls.Add(Me.lblM8_Title) @@ -1958,9 +1967,9 @@ Partial Class Dashboard Me.lblM4_CompressorFlowRate.AutoSize = true Me.lblM4_CompressorFlowRate.Location = New System.Drawing.Point(13, 7) Me.lblM4_CompressorFlowRate.Name = "lblM4_CompressorFlowRate" - Me.lblM4_CompressorFlowRate.Size = New System.Drawing.Size(143, 13) + Me.lblM4_CompressorFlowRate.Size = New System.Drawing.Size(134, 13) Me.lblM4_CompressorFlowRate.TabIndex = 4 - Me.lblM4_CompressorFlowRate.Text = "Compressor Flow Rate L/min" + Me.lblM4_CompressorFlowRate.Text = "Compressor Flow Rate L/S" ' 'txtM4_out_PowerAtCrankFromPneumaticsCompressorON ' @@ -2515,12 +2524,72 @@ Partial Class Dashboard ' Me.Timer1.Interval = 1000 ' + 'lblM10_Title + ' + Me.lblM10_Title.AutoSize = true + Me.lblM10_Title.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte)) + Me.lblM10_Title.ForeColor = System.Drawing.SystemColors.Highlight + Me.lblM10_Title.Location = New System.Drawing.Point(838, 405) + Me.lblM10_Title.MaximumSize = New System.Drawing.Size(250, 0) + Me.lblM10_Title.Name = "lblM10_Title" + Me.lblM10_Title.Size = New System.Drawing.Size(247, 39) + Me.lblM10_Title.TabIndex = 51 + Me.lblM10_Title.Text = "M10 - Actual FC Calc 4 True Air Delivery for smart and non Smart Pneunmatics over"& _ + " the cycle" + ' + 'pnlM10 + ' + Me.pnlM10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.pnlM10.Controls.Add(Me.lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand) + Me.pnlM10.Controls.Add(Me.lblM10_BaseFuelConsumptionAithAverageAuxLoads) + Me.pnlM10.Controls.Add(Me.txtM10_out_FCWithSmartPSAndAvgElecPowerDemand) + Me.pnlM10.Controls.Add(Me.txtM10_out_BaseFCWithAvgAuxLoads) + Me.pnlM10.Location = New System.Drawing.Point(837, 447) + Me.pnlM10.Name = "pnlM10" + Me.pnlM10.Size = New System.Drawing.Size(308, 108) + Me.pnlM10.TabIndex = 50 + ' + 'lblM10_BaseFuelConsumptionAithAverageAuxLoads + ' + Me.lblM10_BaseFuelConsumptionAithAverageAuxLoads.AutoSize = true + Me.lblM10_BaseFuelConsumptionAithAverageAuxLoads.Location = New System.Drawing.Point(6, 9) + Me.lblM10_BaseFuelConsumptionAithAverageAuxLoads.Name = "lblM10_BaseFuelConsumptionAithAverageAuxLoads" + Me.lblM10_BaseFuelConsumptionAithAverageAuxLoads.Size = New System.Drawing.Size(231, 13) + Me.lblM10_BaseFuelConsumptionAithAverageAuxLoads.TabIndex = 2 + Me.lblM10_BaseFuelConsumptionAithAverageAuxLoads.Text = "Base Fuel Consumption with average Aux loads" + ' + 'txtM10_out_BaseFCWithAvgAuxLoads + ' + Me.txtM10_out_BaseFCWithAvgAuxLoads.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) + Me.txtM10_out_BaseFCWithAvgAuxLoads.Location = New System.Drawing.Point(6, 25) + Me.txtM10_out_BaseFCWithAvgAuxLoads.Name = "txtM10_out_BaseFCWithAvgAuxLoads" + Me.txtM10_out_BaseFCWithAvgAuxLoads.Size = New System.Drawing.Size(100, 20) + Me.txtM10_out_BaseFCWithAvgAuxLoads.TabIndex = 0 + ' + 'lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand + ' + Me.lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand.AutoSize = true + Me.lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand.Location = New System.Drawing.Point(6, 48) + Me.lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand.MaximumSize = New System.Drawing.Size(300, 0) + Me.lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand.Name = "lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand" + Me.lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand.Size = New System.Drawing.Size(267, 26) + Me.lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand.TabIndex = 3 + Me.lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand.Text = "Fuel Consumption with Smart Pneumatics and average Electrical Power Demand" + ' + 'txtM10_out_FCWithSmartPSAndAvgElecPowerDemand + ' + Me.txtM10_out_FCWithSmartPSAndAvgElecPowerDemand.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer)) + Me.txtM10_out_FCWithSmartPSAndAvgElecPowerDemand.Location = New System.Drawing.Point(6, 77) + Me.txtM10_out_FCWithSmartPSAndAvgElecPowerDemand.Name = "txtM10_out_FCWithSmartPSAndAvgElecPowerDemand" + Me.txtM10_out_FCWithSmartPSAndAvgElecPowerDemand.Size = New System.Drawing.Size(100, 20) + Me.txtM10_out_FCWithSmartPSAndAvgElecPowerDemand.TabIndex = 1 + ' 'Dashboard ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange - Me.ClientSize = New System.Drawing.Size(1190, 794) + Me.ClientSize = New System.Drawing.Size(1279, 794) Me.Controls.Add(Me.pnlMain) Me.Name = "Dashboard" Me.Text = "Dashboard" @@ -2568,6 +2637,8 @@ Partial Class Dashboard Me.pnl_M0_Displays.PerformLayout Me.resultCardContextMenu.ResumeLayout(false) CType(Me.ErrorProvider,System.ComponentModel.ISupportInitialize).EndInit + Me.pnlM10.ResumeLayout(false) + Me.pnlM10.PerformLayout Me.ResumeLayout(false) End Sub @@ -2793,5 +2864,11 @@ End Sub 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 + Friend WithEvents pnlM10 As System.Windows.Forms.Panel + Friend WithEvents lblM10_FuelConsumptionWithSmartPneumaticsAndAverageElectricalPowerDemand As System.Windows.Forms.Label + Friend WithEvents lblM10_BaseFuelConsumptionAithAverageAuxLoads As System.Windows.Forms.Label + Friend WithEvents txtM10_out_FCWithSmartPSAndAvgElecPowerDemand As System.Windows.Forms.TextBox + Friend WithEvents txtM10_out_BaseFCWithAvgAuxLoads As System.Windows.Forms.TextBox + Friend WithEvents lblM10_Title As System.Windows.Forms.Label End Class diff --git a/AuxillaryTestHarness/Dashboard.vb b/AuxillaryTestHarness/Dashboard.vb index 6dc1527cfe9250279c56d3a5733707edbdcfdbcd..bbc9f656beade358e694f3dbdfbe955a01c12f9c 100644 --- a/AuxillaryTestHarness/Dashboard.vb +++ b/AuxillaryTestHarness/Dashboard.vb @@ -10,6 +10,7 @@ Public Class Dashboard Public auxEnvironment As New AuxillaryEnvironment("") private TabColors As Dictionary( Of TabPage, Color) = new Dictionary( Of TabPage, Color) () Private processing As Boolean = False +Private SecondsIntoCycle As Integer=0 #End Region @@ -842,6 +843,8 @@ End Sub #Region "Button Handlers" Private Sub btnStart_Click( sender As Object, e As EventArgs) Handles btnStart.Click + +SecondsIntoCycle=0 auxEnvironment.Initialise() processing=true SetProcessingStatus @@ -928,6 +931,10 @@ Private sub RefreshDisplays() txtM9_out_TotalCycleFuelConsumptionCompressorOnContinuously.Text=auxEnvironment.M9.TotalCycleFuelConsumptionCompressorOnContinuously txtM9_out_TotalCycleFuelConsumptionCompressorOFFContinuously.Text=auxEnvironment.M9.TotalCycleFuelConsumptionCompressorOffContinuously + + 'M10 + txtM10_out_BaseFCWithAvgAuxLoads.Text = auxEnvironment.M10.BaseFuelConsumptionWithAverageAuxiliaryLoads + txtM10_out_FCWithSmartPSAndAvgElecPowerDemand.Text = auxEnvironment.M10.FuelConsumptionSmartPneumaticsAndAverageElectricalPowerDemand End Sub @@ -955,7 +962,14 @@ End Sub Private Sub RefreshDisplayValues_Timed( sender As Object, e As EventArgs) Handles Timer1.Tick - auxEnvironment.M9.CycleStep(1) + + If SecondsIntoCycle=0 then auxEnvironment.M9.CycleStep( auxEnvironment.Signals.TotalCycleTimeSeconds) + + + SecondsIntoCycle+=1 + + + SetProcessingStatus() diff --git a/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb b/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb index e5dbc5ae731983af85f92e670311d75838fd3b7c..61b08971e19ad1502c82b02ac640874746d7adf3 100644 --- a/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb +++ b/VECTOAux/VectoAuxiliaries/AuxillaryEnvironment.vb @@ -44,6 +44,9 @@ public Property PneumaticAuxillariesConfig As IPneumaticsAuxilliariesConfig Public M7 As IM7 Public M8 As IM8 Public M9 As IM9 + Public M10 As IM10 + + @@ -131,6 +134,8 @@ M8 = New M8(M1,M6,M7,Signals) M9 = New M9(M1,M4,M6,M8,fuelMap,PneumaticAuxillariesConfig,Signals) +M10 = New M10(M3,M9,Signals) + End Sub diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/IM11.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/IM11.vb new file mode 100644 index 0000000000000000000000000000000000000000..adb46ec016897d976eb3b928fe5339fa1ece033f --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/IM11.vb @@ -0,0 +1,32 @@ +Imports VectoAuxiliaries.Electrics +Imports VectoAuxiliaries.Pneumatics +Imports VectoAuxiliaries.Hvac +Imports VectoAuxiliaries.DownstreamModules + +Namespace DownstreamModules + + +Public Interface IM11 + +ReadOnly Property SmartElectricalTotalCycleElectricalEnergyGeneratedDuringOverrunOnly As Single +ReadOnly Property SmartElectricalTotalCycleEletricalEnergyGenerated As single +ReadOnly Property TotalCycleElectricalDemand As single +ReadOnly Property TotalCycleFuelConsumptionSmartElectricalLoad As single +ReadOnly Property TotalCycleFuelConsumptionZeroElectricalLoad As single + + + Sub ClearAggregates() + + + Sub CycleStep(Optional stepTimeInSeconds As Single = 0.0) + + +End Interface + + + +End Namespace + + + + diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/M10.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/M10.vb index 6609c1cfd357064ed139dc1b0eaa2c6f2db0965e..132201c8a79549eb882e08ae0e96db7e0e96709e 100644 --- a/VECTOAux/VectoAuxiliaries/DownstreamModules/M10.vb +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/M10.vb @@ -5,13 +5,11 @@ Imports VectoAuxiliaries.DownstreamModules Namespace DownstreamModules - -Public Class M10 -Implements IM10 - - -'Privates -#Region "Private Fields = > Constructor Requirements" + Public Class M10 + Implements IM10 + + 'Private + #Region "Private Fields = > Constructor Requirements" Private m3 As IM3_AveragePneumaticLoadDemand Private m9 As IM9 @@ -19,14 +17,14 @@ Private m9 As IM9 Private signals As ISignals #End Region -Private Enum InterpolationType + Private Enum InterpolationType NonSmartPneumtaics SmartPneumtaics End Enum -Private Function Interpolate( interpType As InterpolationType) As Single + Private Function Interpolate( interpType As InterpolationType) As Single Dim returnValue As Single - Dim x1,y1,x2,y2,x3,y3 As Single + Dim x1,y1,x2,y2,x3,y3, xTA As Single x1=m9.LitresOfAirCompressorOnContinually y1=m9.TotalCycleFuelConsumptionCompressorOnContinuously @@ -34,15 +32,23 @@ Private Function Interpolate( interpType As InterpolationType) As Single y2=m9.TotalCycleFuelConsumptionCompressorOffContinuously x3=m9.LitresOfAirCompressorOnOnlyInOverrun y3=m9.TotalCycleFuelConsumptionCompressorOffContinuously + + xTA = m3.TotalAirConsumedPerCycle + + Select Case interpType 'Non-Smart Pneumatics Case InterpolationType.NonSmartPneumtaics + returnValue = y2 + ( ((y1-y2) * xTA) / x1) 'Smart Pneumatics Case InterpolationType.SmartPneumtaics + ReturnValue = y3 + (((y1-y3) /( x1-x3)) * ( xTA - x3)) + + End Select @@ -50,7 +56,6 @@ Private Function Interpolate( interpType As InterpolationType) As Single Return returnValue End Function - 'Public #Region "Public Properties" @@ -68,20 +73,18 @@ End Function #End Region #Region "Contructors" - - Public sub new( m3 As IM3_AveragePneumaticLoadDemand, m9 As IM9, signals As ISignals) + + Public sub new( m3 As IM3_AveragePneumaticLoadDemand, m9 As IM9, signals As ISignals) - Me.m3=Me + Me.m3=m3 Me.m9=m9 Me.signals= signals End Sub - -#end region - - -End Class - + + #end region + + End Class End Namespace diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/M11.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/M11.vb new file mode 100644 index 0000000000000000000000000000000000000000..daad5e3a5f27b9263e08a9f507fd239a2b641994 --- /dev/null +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/M11.vb @@ -0,0 +1,142 @@ +Imports VectoAuxiliaries.Electrics +Imports VectoAuxiliaries.Pneumatics +Imports VectoAuxiliaries.Hvac +Imports VectoAuxiliaries.DownstreamModules + +Namespace DownstreamModules + +Public Class M11 + Implements IM11 + + 'Private Fields Assigned by Constructor. + Private m1 As M1_AverageHVACLoadDemand + Private m3 As IM3_AveragePneumaticLoadDemand + Private m6 As IM6 + Private m8 As IM8 + Private fmap As IFUELMAP + Private signals As ISignals + + 'Private Aggregations + Private AG1 As Single + Private AG2 As Single + Private AG3 As Single + Private AG4 As single + Private AG5 As single + + 'Staging Calculations + Private ReadOnly Property Sum1 As single + Get + + End Get + End Property + Private ReadOnly Property Sum2 As Single + Get + + End Get + End Property + Private ReadOnly Property Sum3 As Single + Get + + End Get + End Property + Private ReadOnly Property Sum4 As Single + Get + + End Get + End Property + Private ReadOnly Property Sum5 As Single + Get + + End Get +End Property + Private ReadOnly Property Sum6 As Single + Get + + End Get +End Property + Private readonly Property Sum7 As Single + Get + + End Get +End Property + Private ReadOnly Property Sum8 As Single + Get + + End Get + End Property + + 'OUT1 + Public ReadOnly Property SmartElectricalTotalCycleElectricalEnergyGeneratedDuringOverrunOnly As Single Implements IM11.SmartElectricalTotalCycleElectricalEnergyGeneratedDuringOverrunOnly + Get + Return AG1 + End Get + End Property + 'OUT2 + Public ReadOnly Property SmartElectricalTotalCycleEletricalEnergyGenerated As Single Implements IM11.SmartElectricalTotalCycleEletricalEnergyGenerated + Get + Return AG2 + End Get + End Property + 'OUT3 + Public ReadOnly Property TotalCycleElectricalDemand As Single Implements IM11.TotalCycleElectricalDemand + Get + Return AG3 + End Get + End Property + 'OUT4 + Public ReadOnly Property TotalCycleFuelConsumptionSmartElectricalLoad As Single Implements IM11.TotalCycleFuelConsumptionSmartElectricalLoad + Get + Return AG4 + End Get + End Property + 'OUT5 + Public ReadOnly Property TotalCycleFuelConsumptionZeroElectricalLoad As Single Implements IM11.TotalCycleFuelConsumptionZeroElectricalLoad + Get + Return AG5 + End Get + End Property + + 'Clear at the beginning of cycle + Sub ClearAggregates() Implements IM11.ClearAggregates + + AG1=0 + AG2=0 + AG3=0 + AG4=0 + AG5=0 + + + End Sub + + 'Add to Aggregates dependent on cycle step time. + Sub CycleStep(Optional stepTimeInSeconds As Single = 0.0) Implements IM11.CycleStep + + 'TODO : Finish this calculations and subtitute the 1's for the staging sums or direct outputs from modules within this module. + + AG1 = AG1 + ( stepTimeInSeconds * sum1 ) + AG2 = AG2 + ( stepTimeInSeconds * m8.SmartElectricalAlternatorPowerGenAtCrank ) + AG3 = AG3 + ( stepTimeInSeconds * m6.AvgPowerDemandAtCrankFromElectricsIncHVAC ) + AG4 = AG4 + ( stepTimeInSeconds * sum7 ) + AG5 = AG5 + ( stepTimeInSeconds * sum8 ) + + End Sub + + 'Constructor + Public Sub new ( m1 As IM1_AverageHVACLoadDemand, m3 As IM3_AveragePneumaticLoadDemand, m6 As IM6, m8 As IM8, fmap As IFUELMAP, signals As ISignals) + + me.m1 = m1 + me.m3 = m3 + me.m6 = m6 + me.m8 = m8 + Me.fmap = fmap + Me.signals = signals + + End Sub + +End Class + +End Namespace + + + + diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/M9.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/M9.vb index 594a2452d42e040f07ef6af2965d486ff31558bb..2748ab35ff16d1b77c5a236739f19e2794cf395d 100644 --- a/VECTOAux/VectoAuxiliaries/DownstreamModules/M9.vb +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/M9.vb @@ -130,10 +130,12 @@ End Property 'Public Utility Methods. Public Sub ClearAggregates() Implements IM9.ClearAggregates + _LitresOfAirCompressorOnContinuallyAggregate =0 _LitresOfAirCompressorOnOnlyInOverrunAggregate =0 _TotalCycleFuelConsumptionCompressorOffContinuouslyAggregate =0 _TotalCycleFuelConsumptionCompressorOnContinuouslyAggregate=0 + End Sub 'Clear down at the beginning of a cycle. diff --git a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj index 840073d3e58037122810b3c8840ee07c7eb704a3..5845329735121af6bc33f6268846916e63d9ab56 100644 --- a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj +++ b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj @@ -78,11 +78,13 @@ <Compile Include="DownstreamModules\cMAP.vb" /> <Compile Include="DownstreamModules\IFUELMAP.vb" /> <Compile Include="DownstreamModules\IM10.vb" /> + <Compile Include="DownstreamModules\IM11.vb" /> <Compile Include="DownstreamModules\IM6.vb" /> <Compile Include="DownstreamModules\IM7.vb" /> <Compile Include="DownstreamModules\IM8.vb" /> <Compile Include="DownstreamModules\IM9.vb" /> <Compile Include="DownstreamModules\M10.vb" /> + <Compile Include="DownstreamModules\M11.vb" /> <Compile Include="DownstreamModules\M7.vb" /> <Compile Include="DownstreamModules\M8.vb" /> <Compile Include="DownstreamModules\M9.vb" /> diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M10Test.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M10Test.vb new file mode 100644 index 0000000000000000000000000000000000000000..cf4a2b2d723f1ef6dbd61c813d11778928277435 --- /dev/null +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M10Test.vb @@ -0,0 +1,50 @@ +Imports VectoAuxiliaries.Electrics +Imports VectoAuxiliaries.Pneumatics +Imports VectoAuxiliaries.Hvac +Imports VectoAuxiliaries.DownstreamModules +Imports NUnit.Framework +Imports VectoAuxiliaries +Imports Moq + +Namespace UnitTests + +<TestFixture()> +Public Class M10Test + + + +<Test()> _ +<TestCase(8,8,0,2,4,2,5,5.75f,3.5f)> _ +Public Sub InterpolationTests( x1 As Single ,y1 As Single ,x2 As single,y2 As single,x3 As single,y3 As single,xTAir As single, out1 As single, out2 as single) + +Dim m3 As new Mock( Of IM3_AveragePneumaticLoadDemand) +Dim m9 As new Mock( Of IM9) +Dim signals As New Signals() ' Not required , here for expansion only. + +m3.Setup( Function(x) x.TotalAirConsumedPerCycle).Returns( xTAir ) +m9.Setup( Function(x) x.LitresOfAirCompressorOnContinually).Returns(x1) +m9.Setup( Function(x) x.TotalCycleFuelConsumptionCompressorOnContinuously).Returns(y1) +'x2 is not an output of m9, an is allways zero, but to keep in line with schematic, is represented anyway although it is a constant. +m9.Setup( Function(x) x.TotalCycleFuelConsumptionCompressorOffContinuously).Returns( y2) +m9.Setup( Function(x) x.LitresOfAirCompressorOnOnlyInOverrun).Returns( x3) +m9.Setup( Function(x) x.TotalCycleFuelConsumptionCompressorOffContinuously).Returns(y3) + + +Dim target As IM10 = New M10(m3.Object,m9.Object,Signals) + + +Assert.AreEqual(out1, target.BaseFuelConsumptionWithAverageAuxiliaryLoads ) +Assert.AreEqual(out2, target.FuelConsumptionSmartPneumaticsAndAverageElectricalPowerDemand ) + + + + +End Sub + + +End Class + +End Namespace + + + diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M6Tests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M6Tests.vb index 0ca71bed3e44fee627db96f666eac7e8056e1d10..b42f75e965bed02584c4cdfc1321b142d7613e70 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M6Tests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M6Tests.vb @@ -97,15 +97,15 @@ Public Sub SmartElectricalOffTest() Dim AveragePowerDemandatCrankFromElectricsInHVAC As Single = target.AvgPowerDemandAtCrankFromElectricsIncHVAC Dim SmartPneumaticsOnlySmartCompressorFlag As Integer = target.SmartPneumaticsOnlyCompressorFlag - Assert.AreEqual(0,OverRunFlag ) - Assert.AreEqual(0,SmartElecAndPneumaticsCompressorFlag ) - Assert.AreEqual(0,SmartElectricalAndPneumaticAlternatorPowerGenAtCrank) - Assert.AreEqual(200,SmartElectricalAndPneumaticAirCompPowerGenAtCrank ) - Assert.AreEqual(0,SmartElectricalOnlyAlternatorPowerGenAtCrank ) - Assert.AreEqual(200,AveragePowerDemandAtCrankFromPneumatics ) - Assert.AreEqual(200,SmartPneumaticsOnlyAirCompPowerGenAtCrank ) - Assert.AreEqual(320,AveragePowerDemandatCrankFromElectricsInHVAC ) - Assert.AreEqual(0,SmartPneumaticsOnlySmartCompressorFlag ) + Assert.AreEqual(0,OverRunFlag ) + Assert.AreEqual(0,SmartElecAndPneumaticsCompressorFlag ) + Assert.AreEqual(0,SmartElectricalAndPneumaticAlternatorPowerGenAtCrank ) + Assert.AreEqual(200,SmartElectricalAndPneumaticAirCompPowerGenAtCrank ) + Assert.AreEqual(0,SmartElectricalOnlyAlternatorPowerGenAtCrank ) + Assert.AreEqual(200,AveragePowerDemandAtCrankFromPneumatics ) + Assert.AreEqual(200,SmartPneumaticsOnlyAirCompPowerGenAtCrank ) + Assert.AreEqual(320,AveragePowerDemandatCrankFromElectricsInHVAC ) + Assert.AreEqual(0,SmartPneumaticsOnlySmartCompressorFlag ) End Sub diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M9Tests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M9Tests.vb index cd826439a9de02a3050b3dc782c806059c27d476..bf56db4d70d38217742eb95655f9c1624ac64bb7 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M9Tests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M9Tests.vb @@ -64,10 +64,10 @@ Private M8 As IM8 <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)> _ +<TestCase(50,50,400,200,100,1200,50,0,0,0.5f,50f,0, 0.180613413f,0.180590272f)> _ +<TestCase(50,50,400,200,100,1200,50,1,0,0.5f,50f,0, 0.180613413f,0.180590272f)> _ +<TestCase(50,50,400,200,100,1200,50,0,1,0.5f,50f,0, 0.180613413f,0.180590272f)> _ +<TestCase(50,50,400,200,100,1200,50,1,1,0.5f,50f,25, 0.180613413f,0.180590272f)> _ Public Sub ValuesInOutTests(IP1 As Single, IP2 As Single, IP3 As Single, diff --git a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj index cb85d7b10c2621b60d3468e847f98e67b4af8c65..672a8a29703cd6fae2843fb3f72aea1ae5e77caf 100644 --- a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj +++ b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj @@ -104,6 +104,7 @@ <Compile Include="UnitTests\AveragePneumaticLoadDemandTests.vb" /> <Compile Include="UnitTests\ElectricalConsumerListTests.vb" /> <Compile Include="UnitTests\HVACMapTests.vb" /> + <Compile Include="UnitTests\M10Test.vb" /> <Compile Include="UnitTests\M1_AverageHVACLoadDemandTests.vb" /> <Compile Include="UnitTests\M1_HVACAverageLoadDemandTests.vb" /> <Compile Include="UnitTests\M5_SmartAlternatorSetGenerationTests.vb" />