From 440b442e788151e1751da140c3d558e064c69d15 Mon Sep 17 00:00:00 2001
From: "Burns, Terry" <Terry.Burns@ricardo.com>
Date: Tue, 23 Sep 2014 12:03:08 +0000
Subject: [PATCH] Added IAirFlowRateMechanicalDemandMap and Added 
 AirFlowRateMechanicalDemandMap and Added  AveragePneumaticLoadDemandMAPTests
 Added  TestFiles for the above Ran Tests and validated this is all working as
 far as I can tell.

git-tfs-id: [http://tfs00.element.root.com:8080/tfs/TFSCollection]$/VECTO;C1615
---
 .../Electrics/AverageElectricalDemand.vb      |  6 +-
 .../Hvac/AverageHVACLoadDemand.vb             |  1 +
 .../AirFlowRateMechanicalDemandMap.vb         | 80 ++++++++++++++++++
 .../Pneumatics/AveragePneumaticLoadDemand.vb  | 68 +++++++++++++++
 .../Pneumatics/CompressorMap.vb               |  3 +
 .../IAirFlowRateMechanicalDemandMap.vb        | 28 +++++++
 .../VectoAuxiliaries/VectoAuxiliaries.vbproj  |  3 +
 ...lowRateToMechanicalDemandMap - GoodMap.csv |  5 ++
 ...oMechanicalDemandMap - InvalidElements.csv |  5 ++
 ...RateToMechanicalDemandMap - InvalidKey.csv |  5 ++
 ...echanicalDemandMap - NotEnoughElements.csv |  5 ++
 ...eToMechanicalDemandMap - NotEnoughRows.csv |  3 +
 .../UnitTests/AirCompressorTests.vb           |  1 -
 .../UnitTests/AverageElectricalDemandTests.vb |  5 +-
 ...ts.vb => AverageHVACLoadDemandMAPTests.vb} |  0
 .../UnitTests/AveragePneumaticLoadTests.vb    | 84 +++++++++++++++++++
 .../UnitTests/CompressorMapTests.vb           |  3 +-
 .../VectoAuxiliariesTests.vbproj              | 18 +++-
 18 files changed, 315 insertions(+), 8 deletions(-)
 create mode 100644 VECTOAux/VectoAuxiliaries/Pneumatics/AirFlowRateMechanicalDemandMap.vb
 create mode 100644 VECTOAux/VectoAuxiliaries/Pneumatics/AveragePneumaticLoadDemand.vb
 create mode 100644 VECTOAux/VectoAuxiliaries/Pneumatics/IAirFlowRateMechanicalDemandMap.vb
 create mode 100644 VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - GoodMap.csv
 create mode 100644 VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - InvalidElements.csv
 create mode 100644 VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - InvalidKey.csv
 create mode 100644 VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughElements.csv
 create mode 100644 VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughRows.csv
 rename VECTOAux/VectoAuxiliariesTests/UnitTests/{AverageHVACLoadDemandTests.vb => AverageHVACLoadDemandMAPTests.vb} (100%)
 create mode 100644 VECTOAux/VectoAuxiliariesTests/UnitTests/AveragePneumaticLoadTests.vb

diff --git a/VECTOAux/VectoAuxiliaries/Electrics/AverageElectricalDemand.vb b/VECTOAux/VectoAuxiliaries/Electrics/AverageElectricalDemand.vb
index 6cf5c5cd19..9acb645f5a 100644
--- a/VECTOAux/VectoAuxiliaries/Electrics/AverageElectricalDemand.vb
+++ b/VECTOAux/VectoAuxiliaries/Electrics/AverageElectricalDemand.vb
@@ -44,7 +44,7 @@
         ''' <returns></returns>
         ''' <remarks></remarks>
         Public Function Initialise() As Boolean
-            Return True ''TODO: Initialisation of the alternator model
+            Return _alternator.Initialise()
         End Function
 
         ''' <summary>
@@ -52,7 +52,7 @@
         ''' </summary>
         ''' <returns></returns>
         ''' <remarks></remarks>
-        Public Function GetAveragePowerAtAlternator() As Single
+        Public Function GetAveragePowerDemandAtAlternator() As Single
             Dim total As Single = (From ctx In ElectricalConsumers
                     Select ctx.Power).Sum()
             Return total
@@ -65,7 +65,7 @@
         ''' <returns></returns>
         ''' <remarks></remarks>
         Public Function GetAveragePowerAtCrank(ByVal engineRpm As Integer) As Single
-            Dim elecPower As Single = GetAveragePowerAtAlternator()
+            Dim elecPower As Single = GetAveragePowerDemandAtAlternator()
             Dim alternatorEfficiency As Single = _alternator.GetEfficiency(engineRpm)
             Dim demandFromAlternator As Single = elecPower / alternatorEfficiency
             Dim powerAtCrank As Single = demandFromAlternator / _alternator.PulleyGearEfficiency
diff --git a/VECTOAux/VectoAuxiliaries/Hvac/AverageHVACLoadDemand.vb b/VECTOAux/VectoAuxiliaries/Hvac/AverageHVACLoadDemand.vb
index 80e18987c4..bc349f24ca 100644
--- a/VECTOAux/VectoAuxiliaries/Hvac/AverageHVACLoadDemand.vb
+++ b/VECTOAux/VectoAuxiliaries/Hvac/AverageHVACLoadDemand.vb
@@ -9,6 +9,7 @@ Namespace Hvac
         Public Property Region As Integer
         Public Property Season As Integer
 
+
         Public Sub New(ByVal map As IHVACMap, ByVal alternator As IAlternator, inputs As IHVACInputs)
             Me.map = map
             Me.alternator = alternator
diff --git a/VECTOAux/VectoAuxiliaries/Pneumatics/AirFlowRateMechanicalDemandMap.vb b/VECTOAux/VectoAuxiliaries/Pneumatics/AirFlowRateMechanicalDemandMap.vb
new file mode 100644
index 0000000000..913243455f
--- /dev/null
+++ b/VECTOAux/VectoAuxiliaries/Pneumatics/AirFlowRateMechanicalDemandMap.vb
@@ -0,0 +1,80 @@
+Imports System.IO
+
+Namespace Pneumatics
+
+    Public Class AirFlowRateMechanicalDemandMap
+        Implements IAirFlowRateMechanicalDemandMap
+
+        Private _filePath As String
+
+        Private _map As New Dictionary(Of Integer, Single)
+
+
+        Public Sub New(iFilePath As String)
+
+            _filePath = iFilePath
+
+        End Sub
+
+
+        Public Function Initialise() As Boolean Implements IAirFlowRateMechanicalDemandMap.Initialise
+
+            If File.Exists(_filePath) Then
+                Using sr As StreamReader = New StreamReader(_filePath)
+                    'get array of lines from csv
+                    Dim lines() As String = sr.ReadToEnd().Split(CType(Environment.NewLine, Char()), StringSplitOptions.RemoveEmptyEntries)
+
+                    'Must have at least 2 entries in map to make it usable [dont forget the header row]
+                    If lines.Length < 3 Then Throw New ArgumentException("Insufficient rows in csv to build a usable map")
+
+                    _map = New Dictionary(Of Integer, Single)
+                    Dim firstline As Boolean = True
+
+                    For Each line As String In lines
+                        If Not firstline Then
+                            'split the line
+                            Dim elements() As String = line.Split(New Char() {","}, StringSplitOptions.RemoveEmptyEntries)
+                            '2 entries per line required
+                            If (elements.Length <> 2) Then Throw New ArgumentException("Incorrect number of values in csv file")
+                            'add values to map
+                            _map.Add(elements(0), elements(1))
+
+
+                            'Test For Non Numeric Data,
+                            If (Not firstline AndAlso (Not IsNumeric(elements(0)) OrElse Not IsNumeric(elements(1)))) Then
+                                Throw (New ArgumentException("SomeValues were not numeric"))
+                            End If
+
+                        Else
+                            firstline = False
+                        End If
+                    Next
+                End Using
+            Else
+                Throw New ArgumentException("supplied input file does not exist")
+            End If
+
+            Return True
+        End Function
+
+        Public Function GetPower(flowRate As Integer) As Integer Implements IAirFlowRateMechanicalDemandMap.GetPower
+
+            If _map.ContainsKey(flowRate) = False Then
+
+                Throw New ArgumentException("Flow rate was not a key in the FlowRate Mechanical power map")
+
+
+            End If
+
+            Return _map(flowRate)
+
+        End Function
+
+
+
+    End Class
+
+End Namespace
+
+
+
diff --git a/VECTOAux/VectoAuxiliaries/Pneumatics/AveragePneumaticLoadDemand.vb b/VECTOAux/VectoAuxiliaries/Pneumatics/AveragePneumaticLoadDemand.vb
new file mode 100644
index 0000000000..f94494886d
--- /dev/null
+++ b/VECTOAux/VectoAuxiliaries/Pneumatics/AveragePneumaticLoadDemand.vb
@@ -0,0 +1,68 @@
+Imports VectoAuxiliaries.Pneumatics
+
+Namespace Pneumatics
+
+    Public Class AveragePneumaticLoadDemand
+
+
+        Private _map As ICompressorMap
+        Private _pneumaticConsumers As List(Of IPneumaticConsumer)
+        Private _pulleyGearEfficiency As Single
+
+        Public Property PulleyGearEfficiancy As Single
+
+            Private Set(value As Single)
+                _pulleyGearEfficiency = value
+            End Set
+            Get
+                Return _pulleyGearEfficiency
+            End Get
+
+        End Property
+
+        Public Property TotalCycleTimeSeconds As Single
+
+
+        Public ReadOnly Property PneumaticConsumers As List(Of IPneumaticConsumer)
+            Get
+                Return _pneumaticConsumers
+            End Get
+        End Property
+
+        'Constructors
+        Public Sub New(iMap As ICompressorMap, iTotalCycleTimeSeconds As Integer, iPulleyGearEfficiency As Single)
+
+            _map = iMap
+            _pulleyGearEfficiency = iPulleyGearEfficiency
+            _TotalCycleTimeSeconds = iTotalCycleTimeSeconds
+
+        End Sub
+
+
+        'Get Average Power Demand @ Crank From Pneumatics
+        Public Function GetAveragePowerDemandAtCrankFromPneumatics() As Single
+
+
+
+            'TODO
+            Return -1
+
+        End Function
+
+
+        'Get Total Required Air Delivery Rate
+        Public Function GetTotalRequiredAirPerCompressorUnitDeliveryRate() As Single
+
+            Return PneumaticConsumers.Sum(Function(item) item.VolumePerCycle())
+
+        End Function
+
+
+
+
+
+    End Class
+
+End Namespace
+
+
diff --git a/VECTOAux/VectoAuxiliaries/Pneumatics/CompressorMap.vb b/VECTOAux/VectoAuxiliaries/Pneumatics/CompressorMap.vb
index 2f1da92436..22f40116ca 100644
--- a/VECTOAux/VectoAuxiliaries/Pneumatics/CompressorMap.vb
+++ b/VECTOAux/VectoAuxiliaries/Pneumatics/CompressorMap.vb
@@ -185,5 +185,8 @@ Namespace Pneumatics
 
         End Structure
 
+
+
+
     End Class
 End Namespace
\ No newline at end of file
diff --git a/VECTOAux/VectoAuxiliaries/Pneumatics/IAirFlowRateMechanicalDemandMap.vb b/VECTOAux/VectoAuxiliaries/Pneumatics/IAirFlowRateMechanicalDemandMap.vb
new file mode 100644
index 0000000000..9c5af12888
--- /dev/null
+++ b/VECTOAux/VectoAuxiliaries/Pneumatics/IAirFlowRateMechanicalDemandMap.vb
@@ -0,0 +1,28 @@
+
+Namespace Pneumatics
+
+    Public Interface IAirFlowRateMechanicalDemandMap
+
+
+        ''' <summary>
+        ''' Initialises the map with a privately stored field referring to filename and path.
+        ''' </summary>
+        ''' <returns></returns>
+        ''' <remarks></remarks>
+        Function Initialise() As Boolean
+
+        ''' <summary>
+        ''' Gets Power From Map for a given flow rate
+        ''' </summary>
+        ''' <param name="flowRate"></param>
+        ''' <returns></returns>
+        ''' <remarks></remarks>
+        Function GetPower(flowRate As Integer) As Integer
+
+
+    End Interface
+
+End Namespace
+
+
+
diff --git a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj
index 36dd220114..b8ffe23ad7 100644
--- a/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj
+++ b/VECTOAux/VectoAuxiliaries/VectoAuxiliaries.vbproj
@@ -78,12 +78,15 @@
     <Compile Include="Electrics\AlternatorMap.vb" />
     <Compile Include="Electrics\AverageElectricalDemand.vb" />
     <Compile Include="Hvac\AverageHVACLoadDemand.vb" />
+    <Compile Include="Pneumatics\AirFlowRateMechanicalDemandMap.vb" />
+    <Compile Include="Pneumatics\AveragePneumaticLoadDemand.vb" />
     <Compile Include="Pneumatics\CompressorMap.vb" />
     <Compile Include="Electrics\ElectricalConsumer.vb" />
     <Compile Include="Hvac\HVACMap.vb" />
     <Compile Include="Electrics\IAlternator.vb" />
     <Compile Include="Electrics\IAlternatorMap.vb" />
     <Compile Include="Pneumatics\IAirCompressor.vb" />
+    <Compile Include="Pneumatics\IAirFlowRateMechanicalDemandMap.vb" />
     <Compile Include="Pneumatics\ICompressorMap.vb" />
     <Compile Include="Electrics\IElectricalConsumer.vb" />
     <Compile Include="My Project\AssemblyInfo.vb" />
diff --git a/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - GoodMap.csv b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - GoodMap.csv
new file mode 100644
index 0000000000..9fae6b85f7
--- /dev/null
+++ b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - GoodMap.csv	
@@ -0,0 +1,5 @@
+FlowRate [L/S], Power [KW]
+100,2.0
+200,3.0
+300,4.0
+500,5.0
\ No newline at end of file
diff --git a/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - InvalidElements.csv b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - InvalidElements.csv
new file mode 100644
index 0000000000..50ed797c61
--- /dev/null
+++ b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - InvalidElements.csv	
@@ -0,0 +1,5 @@
+FlowRate [L/S], Power [KW]
+100,2.0
+200,a
+300,4.0
+500,5.0
\ No newline at end of file
diff --git a/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - InvalidKey.csv b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - InvalidKey.csv
new file mode 100644
index 0000000000..9fae6b85f7
--- /dev/null
+++ b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - InvalidKey.csv	
@@ -0,0 +1,5 @@
+FlowRate [L/S], Power [KW]
+100,2.0
+200,3.0
+300,4.0
+500,5.0
\ No newline at end of file
diff --git a/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughElements.csv b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughElements.csv
new file mode 100644
index 0000000000..fc0c020d14
--- /dev/null
+++ b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughElements.csv	
@@ -0,0 +1,5 @@
+FlowRate [L/S], Power [KW]
+100,2.0
+200
+300,4.0
+500,5.0
\ No newline at end of file
diff --git a/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughRows.csv b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughRows.csv
new file mode 100644
index 0000000000..abf714f7c4
--- /dev/null
+++ b/VECTOAux/VectoAuxiliariesTests/TestFiles/testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughRows.csv	
@@ -0,0 +1,3 @@
+FlowRate [L/S], Power [KW]
+100,2.0
+200,3.0
\ No newline at end of file
diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/AirCompressorTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/AirCompressorTests.vb
index 94b9b277ec..fac5c39c66 100644
--- a/VECTOAux/VectoAuxiliariesTests/UnitTests/AirCompressorTests.vb
+++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/AirCompressorTests.vb
@@ -5,7 +5,6 @@ Imports VectoAuxiliariesTests.Mocks
 Namespace UnitTests
 
     <TestFixture()>
-    <Category("Pnuematic - Compressor")>
     Public Class AirCompressorTests
 #Region "Test Constants"
         Private Const GoodEfficiency As Single = 1
diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/AverageElectricalDemandTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/AverageElectricalDemandTests.vb
index e845469ef0..aca085354e 100644
--- a/VECTOAux/VectoAuxiliariesTests/UnitTests/AverageElectricalDemandTests.vb
+++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/AverageElectricalDemandTests.vb
@@ -61,10 +61,11 @@ Namespace UnitTests
 
         <Test()>
         Public Sub GetAveragePowerAtAlternatorTest()
+
             Dim target As AverageElectricalDemand = GetAverageElectricalDemandInstance()
+            Dim actual As Single = target.GetAveragePowerDemandAtAlternator()
+            Assert.AreEqual(actual, 200)
 
-            Dim actual As Single = target.GetAveragePowerAtAlternator()
-            Assert.Fail("test not complete")
         End Sub
 
         <Test()>
diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/AverageHVACLoadDemandTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/AverageHVACLoadDemandMAPTests.vb
similarity index 100%
rename from VECTOAux/VectoAuxiliariesTests/UnitTests/AverageHVACLoadDemandTests.vb
rename to VECTOAux/VectoAuxiliariesTests/UnitTests/AverageHVACLoadDemandMAPTests.vb
diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/AveragePneumaticLoadTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/AveragePneumaticLoadTests.vb
new file mode 100644
index 0000000000..6622a535ae
--- /dev/null
+++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/AveragePneumaticLoadTests.vb
@@ -0,0 +1,84 @@
+Imports NUnit.Framework
+Imports VectoAuxiliaries.Pneumatics
+
+Namespace UnitTests
+
+    <TestFixture()>
+    Public Class AveragePneumaticLoadDemandMAPTests
+
+        Private Const MAP_GOOD As String = "TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap - GoodMap.csv"
+        Private Const MAP_INVALIDELEMENTS As String = "TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap_Invalid Elements.csv"
+        Private Const MAP_INVALIDKEY As String = "TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap_InvalidKey.csv"
+        Private Const MAP_NOTENOUGHELEMENTS As String = "TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap_NotEnoughElements.csv"
+        Private Const MAP_NOTENOUGHROWS As String = "TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap_NotEnoughRows.csv"
+        Private Const MAP_FILENOTFOUND As String = "File_NotFound.csv"
+
+
+        <Test>
+        Public Sub CreateNewFlowMechPowerMap()
+
+            Dim target As New AirFlowRateMechanicalDemandMap(MAP_GOOD)
+            Assert.IsNotNull(target)
+
+        End Sub
+
+        <Test>
+        Public Sub InitialiseTest()
+
+            Dim target As New AirFlowRateMechanicalDemandMap(MAP_GOOD)
+            Assert.IsTrue(target.Initialise())
+
+        End Sub
+
+        <Test>
+        <ExpectedException("System.ArgumentException")>
+        Public Sub InvalidElementsFlowMechPowerMap()
+
+            Dim target As New AirFlowRateMechanicalDemandMap(MAP_INVALIDELEMENTS)
+            Assert.IsTrue(target.Initialise())
+
+        End Sub
+
+        <Test>
+        <ExpectedException("System.ArgumentException")>
+        Public Sub NotEnoughElementsFlowMechPowerMap()
+
+            Dim target As New AirFlowRateMechanicalDemandMap(MAP_NOTENOUGHELEMENTS)
+            Assert.IsTrue(target.Initialise())
+
+        End Sub
+
+        <Test>
+       <ExpectedException("System.ArgumentException")>
+        Public Sub NotEnoughRowsFlowMechPowerMap()
+
+            Dim target As New AirFlowRateMechanicalDemandMap(MAP_NOTENOUGHROWS)
+            Assert.IsTrue(target.Initialise())
+
+        End Sub
+
+        <Test>
+       <ExpectedException("System.ArgumentException")>
+        Public Sub FileNotFoundFlowMechPowerMap_ThrowArgumentException()
+
+            Dim target As New AirFlowRateMechanicalDemandMap(MAP_FILENOTFOUND)
+            Assert.IsTrue(target.Initialise())
+
+        End Sub
+
+        <Test>
+        <ExpectedException("System.ArgumentException")>
+        Public Sub InvalidKeyFlowRatePowerMap_ThrowArgumentOutOfRangeException()
+
+            Dim target As New AirFlowRateMechanicalDemandMap(MAP_GOOD)
+            Assert.IsTrue(target.Initialise())
+
+            target.GetPower(-100)
+
+        End Sub
+
+
+    End Class
+
+
+End Namespace
\ No newline at end of file
diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/CompressorMapTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/CompressorMapTests.vb
index d0f7beb0f6..0ec679de5e 100644
--- a/VECTOAux/VectoAuxiliariesTests/UnitTests/CompressorMapTests.vb
+++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/CompressorMapTests.vb
@@ -12,6 +12,7 @@ Namespace UnitTests
         Private Const INVALIDFLOWRATEMAP As String = "TestFiles\testCompressorMapInvalidFlow.csv"
         Private Const INSSUFICIENTROWSMAP As String = "TestFiles\testCompressorMapNotEnoughRows.csv"
         Private Const INVALIDRPMMAP As String = "TestFiles\testCompressorMapInvalidRpm.csv"
+        Private Const INVALIDNUMBEROFCOLUMNS As String = "TestFiles\testCompressorMapWrongNumberOfColumns.csv"
 
 
 #Region "Helpers"
@@ -52,7 +53,7 @@ Namespace UnitTests
 
         <Test(), ExpectedException("System.ArgumentException")>
         Public Sub InitialisationWrongNumberOfColumnsThrowsExceptionTest()
-            Dim path As String = "C:\DEV\VECTO\VectoAuxiliaries\VectoAuxiliariesTests\TestFiles\testCompressorMapWrongNumberOfColumns.csv"
+            Dim path As String = INVALIDNUMBEROFCOLUMNS
             Dim target As CompressorMap = New CompressorMap(path)
             target.Initialise()
         End Sub
diff --git a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj
index 99df40ff9a..80837c536f 100644
--- a/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj
+++ b/VECTOAux/VectoAuxiliariesTests/VectoAuxiliariesTests.vbproj
@@ -88,7 +88,8 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Mocks\HVACMapMock.vb" />
-    <Compile Include="UnitTests\AverageHVACLoadDemandTests.vb" />
+    <Compile Include="UnitTests\AverageHVACLoadDemandMAPTests.vb" />
+    <Compile Include="UnitTests\AveragePneumaticLoadTests.vb" />
     <Compile Include="UnitTests\HVACMapTests.vb" />
     <Compile Include="UnitTests\PneumaticConsumerTests.vb" />
     <Compile Include="UnitTests\AirCompressorTests.vb" />
@@ -188,6 +189,21 @@
     <Content Include="TestFiles\testHvacMapWrongColumns.csv">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <Content Include="TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap - InvalidKey.csv">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <Content Include="TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughElements.csv">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <Content Include="TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap - InvalidElements.csv">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <Content Include="TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap - NotEnoughRows.csv">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <Content Include="TestFiles\testPneumaticAirFlowRateToMechanicalDemandMap - GoodMap.csv">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
     <None Include="TestFiles\HVACMap.vaux" />
     <Content Include="TestFiles\TestHvacMap - ExtraBlankLines.csv">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-- 
GitLab