diff --git a/AdvancedAuxiliaryInterfaces/IVectoInputs.vb b/AdvancedAuxiliaryInterfaces/IVectoInputs.vb index 4415fc177f6639d00ec4035b05a07dbe4fcc4f65..4a97bd457bcd79609bbd21599cecbf46d3989c48 100644 --- a/AdvancedAuxiliaryInterfaces/IVectoInputs.vb +++ b/AdvancedAuxiliaryInterfaces/IVectoInputs.vb @@ -38,6 +38,13 @@ Public Interface IVectoInputs ''' <value></value> ''' <returns></returns> ''' <remarks></remarks> - Property FuelMap As string + Property FuelMap As String + ''' <summary> + ''' Fuel density used in Vecto. + ''' </summary> + ''' <value></value> + ''' <returns></returns> + ''' <remarks></remarks> + Property FuelDensity As String End Interface diff --git a/AdvancedAuxiliaryInterfaces/VectoInputs.vb b/AdvancedAuxiliaryInterfaces/VectoInputs.vb index 0dc742465d6d8c3817e9c15ee2638cc0cf40cd88..2250251e9a880db7babd3b812123390022d9641e 100644 --- a/AdvancedAuxiliaryInterfaces/VectoInputs.vb +++ b/AdvancedAuxiliaryInterfaces/VectoInputs.vb @@ -42,6 +42,13 @@ Implements IVectoInputs ''' <returns></returns> ''' <remarks></remarks> Public Property FuelMap As String Implements IVectoInputs.FuelMap + ''' <summary> + ''' Fuel Density as used in Vecto. + ''' </summary> + ''' <value></value> + ''' <returns></returns> + ''' <remarks></remarks> + Public Property FuelDensity As String Implements IVectoInputs.FuelDensity End Class diff --git a/VECTO/cConfig.vb b/VECTO/cConfig.vb index f6e3cfaba32ffeb9cbfa93ad4ff091685bb69ca5..8705bf52cf752cd33df33995cd6b57ee4ac6c972 100644 --- a/VECTO/cConfig.vb +++ b/VECTO/cConfig.vb @@ -62,7 +62,7 @@ Public Class cConfig OpenCmd = "notepad" OpenCmdName = "Notepad" - FuelDens = 0.835 + FuelDens = 0.832 CO2perFC = 3.153 FirstRun = True diff --git a/VECTO/mAAUX_Global.vb b/VECTO/mAAUX_Global.vb index db33f98405b17a2318585d109c0cd8a3e8eb3a18..c54f4693f5482ac7fdaec955ddd1ce807735177e 100644 --- a/VECTO/mAAUX_Global.vb +++ b/VECTO/mAAUX_Global.vb @@ -5,137 +5,138 @@ Imports System.IO Module mAAUX_Global - public ClutchEngaged As Boolean - public EngineDrivelinePower As Single - public EngineDrivelineTorque As Single - public EngineMotoringPower As Single - public EngineSpeed As Integer - public PreExistingAuxPower As Single - public Idle As Boolean - public InNeutral As Boolean - Public WithEvents advancedAuxModel As IAdvancedAuxiliaries - - Public RunningCalc As Boolean=false - - 'This must be set in the main loop and will be used to determin - 'the name of the file which would be offered to the model which is used - 'by it internally. In Bus Auxiliaries, it is used for Actuations of the - 'Doors during particular cycle types. - Public CurrentCycleFile As string = String.Empty - - 'This is a default setting of 3114 this will be set when the cycle begins. - Public CycleTimeInSeconds As integer = 3114 - - Public Sub AAEventAuxiliaryEvent( ByRef sender As Object, byval message As String, ByVal messageType As AdvancedAuxiliaryMessageType ) Handles advancedAuxModel.AuxiliaryEvent - - - WorkerMsg(messageType,message, "Advanced Auxiliaries") - - - End Sub - - 'AA-TB - Public Function InitialiseAdvancedAuxModel( aauxFile As string) As Boolean - - Dim o As System.Runtime.Remoting.ObjectHandle - Dim result As Boolean = true - - If VECTO_Global.VEC.AuxiliaryAssembly<>"CLASSIC" then - - Try - - - 'Open Assembly and invoke the validation using the paths supplied. - Try - o = Activator.CreateInstance(VEC.AuxiliaryAssembly, "VectoAuxiliaries.AdvancedAuxiliaries") - advancedAuxModel = DirectCast(o.Unwrap, IAdvancedAuxiliaries) - - Dim message As String = String.Empty - - 'Set Statics - advancedAuxModel.VectoInputs.Cycle=DetermineCycleNameFromCurrentFile() - advancedAuxModel.VectoInputs.VehicleWeightKG= VEH.Mass - advancedAuxModel.VectoInputs.FuelMap= ENG.FuelMapFullPath - - 'Set Signals - advancedAuxModel.Signals.TotalCycleTimeSeconds=CycleTimeInSeconds - advancedAuxModel.Signals.EngineIdleSpeed = ENG.Nidle - advancedAuxModel.RunStart( aauxFile, VEC.FilePath, message) - - - - Catch Ex As Exception - - result = false - - End Try - - Return result - - - Catch ex As Exception - - - - End Try - - - End If - - Return False - - End Function + Public ClutchEngaged As Boolean + Public EngineDrivelinePower As Single + Public EngineDrivelineTorque As Single + Public EngineMotoringPower As Single + Public EngineSpeed As Integer + Public PreExistingAuxPower As Single + Public Idle As Boolean + Public InNeutral As Boolean + Public WithEvents advancedAuxModel As IAdvancedAuxiliaries + + Public RunningCalc As Boolean = False + + 'This must be set in the main loop and will be used to determin + 'the name of the file which would be offered to the model which is used + 'by it internally. In Bus Auxiliaries, it is used for Actuations of the + 'Doors during particular cycle types. + Public CurrentCycleFile As String = String.Empty + + 'This is a default setting of 3114 this will be set when the cycle begins. + Public CycleTimeInSeconds As Integer = 3114 + + Public Sub AAEventAuxiliaryEvent(ByRef sender As Object, ByVal message As String, ByVal messageType As AdvancedAuxiliaryMessageType) Handles advancedAuxModel.AuxiliaryEvent + + + WorkerMsg(messageType, message, "Advanced Auxiliaries") + + + End Sub + + 'AA-TB + Public Function InitialiseAdvancedAuxModel(aauxFile As String) As Boolean + + Dim o As System.Runtime.Remoting.ObjectHandle + Dim result As Boolean = True + + If VECTO_Global.VEC.AuxiliaryAssembly <> "CLASSIC" Then + + Try + + + 'Open Assembly and invoke the validation using the paths supplied. + Try + o = Activator.CreateInstance(VEC.AuxiliaryAssembly, "VectoAuxiliaries.AdvancedAuxiliaries") + advancedAuxModel = DirectCast(o.Unwrap, IAdvancedAuxiliaries) + + Dim message As String = String.Empty + + 'Set Statics + advancedAuxModel.VectoInputs.Cycle = DetermineCycleNameFromCurrentFile() + advancedAuxModel.VectoInputs.VehicleWeightKG = VEH.Mass + advancedAuxModel.VectoInputs.FuelMap = ENG.FuelMapFullPath + advancedAuxModel.VectoInputs.FuelDensity = Cfg.FuelDens + + 'Set Signals + advancedAuxModel.Signals.TotalCycleTimeSeconds = CycleTimeInSeconds + advancedAuxModel.Signals.EngineIdleSpeed = ENG.Nidle + advancedAuxModel.RunStart(aauxFile, VEC.FilePath, message) + + + + Catch Ex As Exception + + result = False + + End Try + + Return result + + + Catch ex As Exception + + + + End Try - 'AA-TB - ''' <summary> - ''' Discovers Advanced Auxiliaries Assemblies in 'targetDirectory' Directory - ''' </summary> - ''' <returns>List(Of cAdvancedAuxiliary)</returns> - ''' <remarks>Target Directory would normally be the executing directory, but can be in another location.</remarks> - Public Function DiscoverAdvancedAuxiliaries() As List(Of cAdvancedAuxiliary) - Dim returnList As List(Of cAdvancedAuxiliary) = New List(Of cAdvancedAuxiliary) - Dim fileNameWoPath As String - Dim fileNameWoExtentsion As String - Dim advancedAuxiliary As cAdvancedAuxiliary - Dim o As System.Runtime.Remoting.ObjectHandle - Dim iAdvancedAux As IAdvancedAuxiliaries + End If + Return False + + End Function + + 'AA-TB + ''' <summary> + ''' Discovers Advanced Auxiliaries Assemblies in 'targetDirectory' Directory + ''' </summary> + ''' <returns>List(Of cAdvancedAuxiliary)</returns> + ''' <remarks>Target Directory would normally be the executing directory, but can be in another location.</remarks> + Public Function DiscoverAdvancedAuxiliaries() As List(Of cAdvancedAuxiliary) + + Dim returnList As List(Of cAdvancedAuxiliary) = New List(Of cAdvancedAuxiliary) + Dim fileNameWoPath As String + Dim fileNameWoExtentsion As String + Dim advancedAuxiliary As cAdvancedAuxiliary + Dim o As System.Runtime.Remoting.ObjectHandle + Dim iAdvancedAux As IAdvancedAuxiliaries - 'Create Default - returnList.Add(New cAdvancedAuxiliary()) + 'Create Default + returnList.Add(New cAdvancedAuxiliary()) - Try - Dim fileEntries As String() = Directory.GetFiles(GetAAUXSourceDirectory) - ' Process the list of files found in the directory. - Dim fileName As String - For Each fileName In fileEntries + Try + Dim fileEntries As String() = Directory.GetFiles(GetAAUXSourceDirectory) + ' Process the list of files found in the directory. + Dim fileName As String + + For Each fileName In fileEntries - If fileName.Contains("Auxiliaries.dll") Then + If fileName.Contains("Auxiliaries.dll") Then - 'Get filenamewith - fileNameWoPath = fFILE(fileName, True) - fileNameWoExtentsion = fFILE(fileName, False) + 'Get filenamewith + fileNameWoPath = fFILE(fileName, True) + fileNameWoExtentsion = fFILE(fileName, False) - o = Activator.CreateInstance(fileNameWoExtentsion, "VectoAuxiliaries.AdvancedAuxiliaries") + o = Activator.CreateInstance(fileNameWoExtentsion, "VectoAuxiliaries.AdvancedAuxiliaries") - iAdvancedAux = DirectCast(o.Unwrap, IAdvancedAuxiliaries) + iAdvancedAux = DirectCast(o.Unwrap, IAdvancedAuxiliaries) - advancedAuxiliary = New cAdvancedAuxiliary(iAdvancedAux.AuxiliaryName, iAdvancedAux.AuxiliaryVersion, fileNameWoPath, fileNameWoExtentsion) + advancedAuxiliary = New cAdvancedAuxiliary(iAdvancedAux.AuxiliaryName, iAdvancedAux.AuxiliaryVersion, fileNameWoPath, fileNameWoExtentsion) - returnList.Add(advancedAuxiliary) + returnList.Add(advancedAuxiliary) - End If + End If - Next fileName + Next fileName Catch ex As Exception - MessageBox.Show("Unable to obtain Advanced Auxiliary Assemblies" ) + MessageBox.Show("Unable to obtain Advanced Auxiliary Assemblies") End Try @@ -144,124 +145,124 @@ Module mAAUX_Global End Function - 'AA-TB - ''' <summary> - ''' Invokes Advanced Auxiliaries Configuration Screen - ''' </summary> - ''' <param name="vectoFilePath">String : Contains the path of the vecto file.</param> - ''' <returns>Boolean. True if aauxFile is valid after operation , false of not.</returns> - ''' <remarks></remarks> - Public Function ConfigureAdvancedAuxiliaries( ByVal assemblyName As String, byval version As string, filePath As String, vectoFilePath As string) As Boolean + 'AA-TB + ''' <summary> + ''' Invokes Advanced Auxiliaries Configuration Screen + ''' </summary> + ''' <param name="vectoFilePath">String : Contains the path of the vecto file.</param> + ''' <returns>Boolean. True if aauxFile is valid after operation , false of not.</returns> + ''' <remarks></remarks> + Public Function ConfigureAdvancedAuxiliaries(ByVal assemblyName As String, ByVal version As String, filePath As String, vectoFilePath As String) As Boolean + + + Dim auxList As List(Of cAdvancedAuxiliary) = DiscoverAdvancedAuxiliaries() + Dim chosenAssembly As String + Dim o As System.Runtime.Remoting.ObjectHandle + Dim iAdvancedAux As IAdvancedAuxiliaries + Dim result As Boolean + + chosenAssembly = auxList.Find(Function(x) x.AssemblyName = assemblyName AndAlso x.AuxiliaryVersion = version).AssemblyName + If String.IsNullOrEmpty(chosenAssembly) Then Return False + + + 'Open Assembly and invoke the configuration using the paths supplied. + + Try + o = Activator.CreateInstance(chosenAssembly, "VectoAuxiliaries.AdvancedAuxiliaries") + iAdvancedAux = DirectCast(o.Unwrap, IAdvancedAuxiliaries) + + iAdvancedAux.Configure(filePath, vectoFilePath) + + Catch ex As Exception + + result = False + + End Try + + Return result - Dim auxList As List(of cAdvancedAuxiliary ) = DiscoverAdvancedAuxiliaries() - Dim chosenAssembly As String - Dim o As System.Runtime.Remoting.ObjectHandle - Dim iAdvancedAux As IAdvancedAuxiliaries - Dim result As Boolean - chosenAssembly = auxList.Find( Function(x) x.AssemblyName= assemblyName ANDalso x.AuxiliaryVersion= version).AssemblyName - If String.IsNullOrEmpty( chosenAssembly) then Return False + End Function - 'Open Assembly and invoke the configuration using the paths supplied. + ''' <summary> + ''' Gets location of Advanced Auxiliaries Directory which contains all the assemblies available. + ''' </summary> + ''' <returns>Path where Auxiliaries can be found : String</returns> + ''' <remarks></remarks> + Public Function GetAAUXSourceDirectory() As String - Try - o = Activator.CreateInstance(chosenAssembly, "VectoAuxiliaries.AdvancedAuxiliaries") - iAdvancedAux = DirectCast(o.Unwrap, IAdvancedAuxiliaries) - iAdvancedAux.Configure(filePath, vectoFilePath) + Return Path.GetDirectoryName(Application.ExecutablePath) - Catch ex As Exception - result = false + End Function - End Try - Return result + Public Function ResolveAAUXFilePath(vectoPath As String, filename As String) As String + 'No Vecto Path supplied + If vectoPath = "" Then Return filename + 'This is not relative + If filename.Contains(":\") Then - End Function + 'Filepath is already absolute + Return filename + Else + Return vectoPath & filename + End If - - ''' <summary> -''' Gets location of Advanced Auxiliaries Directory which contains all the assemblies available. -''' </summary> -''' <returns>Path where Auxiliaries can be found : String</returns> -''' <remarks></remarks> - Public Function GetAAUXSourceDirectory() As String + End Function - Return Path.GetDirectoryName(Application.ExecutablePath) + Public Function ValidateAAUXFile(ByVal absoluteAAuxPath As String, + ByVal assemblyName As String, + ByVal version As String, + ByRef message As String) As Boolean + Dim auxList As List(Of cAdvancedAuxiliary) = DiscoverAdvancedAuxiliaries() + Dim chosenAssembly As String + Dim o As System.Runtime.Remoting.ObjectHandle + Dim iAdvancedAux As IAdvancedAuxiliaries + Dim result As Boolean - End Function - - - Public function ResolveAAUXFilePath( vectoPath as String, filename As string) as string - 'No Vecto Path supplied - If vectoPath="" then Return filename + chosenAssembly = auxList.Find(Function(x) x.AssemblyName = assemblyName AndAlso x.AuxiliaryVersion = version).AssemblyName + If String.IsNullOrEmpty(chosenAssembly) Then Return False - 'This is not relative - If filename.Contains(":\") then - - 'Filepath is already absolute - Return filename - Else - return vectoPath & filename - End If - - End Function - - - Public Function ValidateAAUXFile( ByVal absoluteAAuxPath As String, - ByVal assemblyName As String, - byval version As string, - byref message As string) As Boolean - Dim auxList As List(of cAdvancedAuxiliary ) = DiscoverAdvancedAuxiliaries() - Dim chosenAssembly As String - Dim o As System.Runtime.Remoting.ObjectHandle - Dim iAdvancedAux As IAdvancedAuxiliaries - Dim result As Boolean - + 'Open Assembly and invoke the validation using the paths supplied. + Try + o = Activator.CreateInstance(chosenAssembly, "VectoAuxiliaries.AdvancedAuxiliaries") + iAdvancedAux = DirectCast(o.Unwrap, IAdvancedAuxiliaries) - chosenAssembly = auxList.Find( Function(x) x.AssemblyName= assemblyName ANDalso x.AuxiliaryVersion= version).AssemblyName - If String.IsNullOrEmpty( chosenAssembly) then Return False + result = iAdvancedAux.ValidateAAUXFile(absoluteAAuxPath, message) + Catch ex As Exception - 'Open Assembly and invoke the validation using the paths supplied. - Try - o = Activator.CreateInstance(chosenAssembly, "VectoAuxiliaries.AdvancedAuxiliaries") - iAdvancedAux = DirectCast(o.Unwrap, IAdvancedAuxiliaries) + result = False - result = iAdvancedAux.ValidateAAUXFile(absoluteAAuxPath, message) + End Try - Catch ex As Exception + Return result - result = false + End Function - End Try - Return result + ''' <summary> + ''' Will Apply an algorithm to the DRI cycle file being used and attempt to return a consitant name + ''' </summary> + ''' <returns>String : Cylename IE, Bus_Interurban, Bus_Urban,etc</returns> + ''' <remarks></remarks> + Public Function DetermineCycleNameFromCurrentFile() As String -End Function - - - ''' <summary> -''' Will Apply an algorithm to the DRI cycle file being used and attempt to return a consitant name -''' </summary> -''' <returns>String : Cylename IE, Bus_Interurban, Bus_Urban,etc</returns> -''' <remarks></remarks> - Public Function DetermineCycleNameFromCurrentFile() As String + 'Get DriveFile without path and without extension + Dim driveFile As String = fFILE(CurrentCycleFile, False) - 'Get DriveFile without path and without extension - Dim driveFile As String = fFILE(CurrentCycleFile,False) + Select Case (True) - Select Case(true) - 'DJN - update to make contains test case insensitive Case driveFile.ToLower().Contains("heavy_urban") AndAlso driveFile.ToLower().Contains("bus") Return "Heavy urban" @@ -278,18 +279,18 @@ End Function Case driveFile.ToLower().Contains("coach") Return "Coach" - case Else - WorkerMsg(tMsgID.Warn,String.Format("UnServiced Cycle Name '{0}' in Pneumatics Actuations Map 0 Actuations returned",driveFile),"Advanced Auxiliaries") - Return "UnknownCycleName" - - End Select + Case Else + WorkerMsg(tMsgID.Warn, String.Format("UnServiced Cycle Name '{0}' in Pneumatics Actuations Map 0 Actuations returned", driveFile), "Advanced Auxiliaries") + Return "UnknownCycleName" + End Select - return "Urban" -End Function + Return "Urban" + + End Function diff --git a/VECTOAux/VectoAuxiliaries/AdvancedAuxiliaries.vb b/VECTOAux/VectoAuxiliaries/AdvancedAuxiliaries.vb index 8bc54b3300adf6bd3582fc11dd4ce72b6ad85d82..2c6753bf1f2bc115e1e90ccb6f5474538b950880 100644 --- a/VECTOAux/VectoAuxiliaries/AdvancedAuxiliaries.vb +++ b/VECTOAux/VectoAuxiliaries/AdvancedAuxiliaries.vb @@ -51,6 +51,8 @@ Public Class AdvancedAuxiliaries Private vectoDirectory As String + Private hvacConstants As HVACConstants + 'Event Handler top level bubble. Public Sub VectoEventHandler(ByRef sender As Object, message As String, messageType As AdvancedAuxiliaryMessageType) Handles compressorMap.AuxiliaryEvent, alternatorMap.AuxiliaryEvent, ssmTool.Message, ssmToolModule14.Message @@ -78,6 +80,7 @@ Public Class AdvancedAuxiliaries auxPath = FilePathUtils.ResolveFilePath(vectoDirectory, IAuxPath) + hvacConstants = New HVACConstants(VectoInputs.FuelDensity) Signals.CurrentCycleTimeInSeconds = 0 auxConfig = New AuxiliaryConfig(auxPath) @@ -107,11 +110,11 @@ Public Class AdvancedAuxiliaries 'SSM HVAC Dim ssmPath As String = FilePathUtils.ResolveFilePath(vectoDirectory, auxConfig.HvacUserInputsConfig.SSMFilePath) Dim BusDatabase As String = FilePathUtils.ResolveFilePath(vectoDirectory, auxConfig.HvacUserInputsConfig.BusDatabasePath) - ssmTool = New SSMTOOL(ssmPath, auxConfig.HvacUserInputsConfig.SSMDisabled) + ssmTool = New SSMTOOL(ssmPath, hvacConstants, auxConfig.HvacUserInputsConfig.SSMDisabled) 'This duplicate SSM is being created for use in M14 as its properties will be dynamically changed at that point 'to honour EngineWaste Heat Usage in Fueling calculations. - ssmToolModule14 = New SSMTOOL(ssmPath, auxConfig.HvacUserInputsConfig.SSMDisabled) + ssmToolModule14 = New SSMTOOL(ssmPath, hvacConstants, auxConfig.HvacUserInputsConfig.SSMDisabled) If (ssmTool.Load(ssmPath) = False OrElse ssmToolModule14.Load(ssmPath) = False) Then @@ -170,7 +173,7 @@ Public Class AdvancedAuxiliaries M11 = New M11(M1, M3, M6, M8, fuelMap, Signals) M12 = New M12(M10, M11, Signals) M13 = New M13(M1, M10, M12, Signals) - M14 = New M14(M13, ssmToolModule14, New HVACConstants(), Signals) + M14 = New M14(M13, ssmToolModule14, hvacConstants, Signals) End Sub diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/M13.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/M13.vb index 8d83147eebb1fd6fd8a53ee2fcfbdec71df324a2..555218c1d29866bc8da4435f13094c2f8a6539e2 100644 --- a/VECTOAux/VectoAuxiliaries/DownstreamModules/M13.vb +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/M13.vb @@ -18,8 +18,6 @@ Namespace DownstreamModules Public Class M13 Implements IM13 - Private Const FUEL_DENSITY_L3 As Single = 835 - Private m1 As IM1_AverageHVACLoadDemand Private m10 As IM10 Private m12 As IM12 diff --git a/VECTOAux/VectoAuxiliaries/DownstreamModules/M14.vb b/VECTOAux/VectoAuxiliaries/DownstreamModules/M14.vb index 28d4f1dba2621ee73f186892933dd47da715534c..1d4a485c1e5b974503f17b456852f3f44f6bd174 100644 --- a/VECTOAux/VectoAuxiliaries/DownstreamModules/M14.vb +++ b/VECTOAux/VectoAuxiliaries/DownstreamModules/M14.vb @@ -5,86 +5,85 @@ Imports VectoAuxiliaries.Hvac Namespace DownstreamModules Public Class M14 - Implements IM14 - - - Private m13 As IM13 - Private signals As ISignals - Private constants As IHVACConstants - Private ssm As ISSMTOOL - - - Public Sub new ( m13 As IM13 , hvacSSM As ISSMTOOL, constants As IHVACConstants, signals As ISignals) - - If m13 is Nothing then Throw New ArgumentException("M14, No M13 Supplied in arguments") - If hvacSSM is Nothing then Throw New ArgumentException("M14, No SSMTOOL constants Supplied in arguments") - If constants is Nothing then Throw New ArgumentException("M14, No signals Supplied in arguments") - If signals is Nothing then Throw New ArgumentException("M14, No signals constants Supplied in arguments") - - - Me.m13 = m13 - Me.signals = signals - Me.constants = constants - Me.ssm= hvacSSM - - - End Sub - - 'Staging Calculations - Private ReadOnly Property S1 As Single - Get - Return m13.WHTCTotalCycleFuelConsumptionGrams * constants.DieselGCVJperGram - End Get - End Property - Private ReadOnly Property S2 As Single - Get - Return constants.FuelEnergyToHeatToCoolant * s1 - End Get - End Property - Private ReadOnly Property S3 As Single - Get - Return S2 * constants.CoolantHeatTransferredToAirCabinHeater - End Get - End Property - Private ReadOnly Property S4 As Single - Get - Return (S3 / signals.CurrentCycleTimeInSeconds )/1000 - End Get - End Property - - - Private ReadOnly Property S5 As Single - Get - Return signals.CurrentCycleTimeInSeconds/3600 - End Get - End Property - Private ReadOnly Property S6 As Single - Get - Return S5 * ssm.FuelPerHBaseAsjusted(S4) * constants.FuelDensity835GramsPerLitre - End Get - End Property - Private ReadOnly Property S7 As Single - Get - Return m13.WHTCTotalCycleFuelConsumptionGrams + s6 - End Get - End Property - - Private ReadOnly Property S8 As Single - Get - Return S7 / constants.FuelDensity835GramsPerLitre - End Get - End Property - Public ReadOnly Property TotalCycleFCGrams As Single Implements IM14.TotalCycleFCGrams - Get - Return S7 - End Get - End Property - - Public ReadOnly Property TotalCycleFCLitres As Single Implements IM14.TotalCycleFCLitres - Get - Return S8 - End Get - End Property + Implements IM14 + + + Private m13 As IM13 + Private signals As ISignals + Private constants As IHVACConstants + Private ssm As ISSMTOOL + + + Public Sub New(m13 As IM13, hvacSSM As ISSMTOOL, constants As IHVACConstants, signals As ISignals) + + If m13 Is Nothing Then Throw New ArgumentException("M14, No M13 Supplied in arguments") + If hvacSSM Is Nothing Then Throw New ArgumentException("M14, No SSMTOOL constants Supplied in arguments") + If constants Is Nothing Then Throw New ArgumentException("M14, No signals Supplied in arguments") + If signals Is Nothing Then Throw New ArgumentException("M14, No signals constants Supplied in arguments") + + + Me.m13 = m13 + Me.signals = signals + Me.constants = constants + Me.ssm = hvacSSM + + End Sub + + 'Staging Calculations + Private ReadOnly Property S1 As Single + Get + Return m13.WHTCTotalCycleFuelConsumptionGrams * constants.DieselGCVJperGram + End Get + End Property + Private ReadOnly Property S2 As Single + Get + Return constants.FuelEnergyToHeatToCoolant * s1 + End Get + End Property + Private ReadOnly Property S3 As Single + Get + Return S2 * constants.CoolantHeatTransferredToAirCabinHeater + End Get + End Property + Private ReadOnly Property S4 As Single + Get + Return (S3 / signals.CurrentCycleTimeInSeconds) / 1000 + End Get + End Property + + + Private ReadOnly Property S5 As Single + Get + Return signals.CurrentCycleTimeInSeconds / 3600 + End Get + End Property + Private ReadOnly Property S6 As Single + Get + Return S5 * ssm.FuelPerHBaseAsjusted(S4) * (constants.FuelDensity * 1000) + End Get + End Property + Private ReadOnly Property S7 As Single + Get + Return m13.WHTCTotalCycleFuelConsumptionGrams + s6 + End Get + End Property + + Private ReadOnly Property S8 As Single + Get + Return S7 / (constants.FuelDensity * 1000) + End Get + End Property + Public ReadOnly Property TotalCycleFCGrams As Single Implements IM14.TotalCycleFCGrams + Get + Return S7 + End Get + End Property + + Public ReadOnly Property TotalCycleFCLitres As Single Implements IM14.TotalCycleFCLitres + Get + Return S8 + End Get + End Property diff --git a/VECTOAux/VectoAuxiliaries/Electrics/M0_NonSmart_AlternatorsSetEfficiency.vb b/VECTOAux/VectoAuxiliaries/Electrics/M0_NonSmart_AlternatorsSetEfficiency.vb index ae57da9ea93c69ac9419cdcd6f7a30aea43b0e46..51551a49b60c11650c6facd3c277587b29856467 100644 --- a/VECTOAux/VectoAuxiliaries/Electrics/M0_NonSmart_AlternatorsSetEfficiency.vb +++ b/VECTOAux/VectoAuxiliaries/Electrics/M0_NonSmart_AlternatorsSetEfficiency.vb @@ -25,7 +25,7 @@ Namespace Electrics Private _ElectricalPowerW As Single Private _MechanicalPowerW As Single - Private _FuelingLPerH As Single + Private _FuelingLPerH As Single 'Constructor Public Sub New(electricalConsumers As IElectricalConsumerList, alternatorEfficiencyMap As IAlternatorMap, powernetVoltage As Single, signals As ISignals, ssmHvac As ISSMTOOL) @@ -43,7 +43,7 @@ Namespace Electrics _ElectricalPowerW= ssmHvac.ElectricalWAdjusted _MechanicalPowerW= ssmHvac.MechanicalWBaseAdjusted - _FuelingLPerH = ssmHvac.FuelPerHBaseAdjusted + _FuelingLPerH = ssmHvac.FuelPerHBaseAdjusted diff --git a/VECTOAux/VectoAuxiliaries/Hvac/HVACConstants.vb b/VECTOAux/VectoAuxiliaries/Hvac/HVACConstants.vb index fdeba396dd67221421830c95b7a6b8a714b17843..cd13f98593954adf499456aee103050d063310b3 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/HVACConstants.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/HVACConstants.vb @@ -14,31 +14,41 @@ Namespace Hvac Public Class HVACConstants Implements IHVACConstants + Private _fuelDensity As Single + + Public Sub New() + _fuelDensity = 0.832 + End Sub + + Public Sub New(fuelDensitySingle As Single) + _fuelDensity = fuelDensitySingle + End Sub Public ReadOnly Property CoolantHeatTransferredToAirCabinHeater As Single Implements IHVACConstants.CoolantHeatTransferredToAirCabinHeater Get - Return 0.75 + Return 0.75 End Get End Property Public ReadOnly Property DieselGCVJperGram As Single Implements IHVACConstants.DieselGCVJperGram Get - Return 44800 + Return 44800 End Get End Property - Public ReadOnly Property FuelDensity835GramsPerLitre As Single Implements IHVACConstants.FuelDensity835GramsPerLitre + Public ReadOnly Property FuelEnergyToHeatToCoolant As Single Implements IHVACConstants.FuelEnergyToHeatToCoolant Get - Return 835 + Return 0.2 End Get End Property - Public ReadOnly Property FuelEnergyToHeatToCoolant As Single Implements IHVACConstants.FuelEnergyToHeatToCoolant + Public ReadOnly Property FuelDensity As Single Implements IHVACConstants.FuelDensity Get - Return 0.2 + Return _fuelDensity End Get End Property -End Class + + End Class End Namespace diff --git a/VECTOAux/VectoAuxiliaries/Hvac/IHVACConstants.vb b/VECTOAux/VectoAuxiliaries/Hvac/IHVACConstants.vb index d8525d439d79ac46423f998528c1b31e4ed30d6c..a6aa83950329a162f4f8cbb17107898908f399e4 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/IHVACConstants.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/IHVACConstants.vb @@ -1,16 +1,13 @@ - -Namespace Hvac +Namespace Hvac -Public Interface IHVACConstants + Public Interface IHVACConstants - readonly property FuelEnergyToHeatToCoolant as single - readonly property CoolantHeatTransferredToAirCabinHeater as single - readonly property DieselGCVJperGram as single - readonly property FuelDensity835GramsPerLitre as single - - -End Interface + ReadOnly Property FuelEnergyToHeatToCoolant As Single + ReadOnly Property CoolantHeatTransferredToAirCabinHeater As Single + ReadOnly Property DieselGCVJperGram As Single + ReadOnly Property FuelDensity As Single + End Interface End Namespace diff --git a/VECTOAux/VectoAuxiliaries/Hvac/ISSMGenInputs.vb b/VECTOAux/VectoAuxiliaries/Hvac/ISSMGenInputs.vb index fb7aebbc94d8085df708c90f2193f783b60123e8..60835cfcc7b7724f741ca339b13f54319403ff23 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/ISSMGenInputs.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/ISSMGenInputs.vb @@ -22,13 +22,14 @@ Namespace Hvac ReadOnly Property BC_SolarClouding As Double ReadOnly Property BC_HeatPerPassengerIntoCabinW As Double Property BC_PassengerBoundaryTemperature As Double - Property BC_PassengerDensityLowFloor As Double - Property BC_PassengerDensitySemiLowFloor As Double - Property BC_PassengerDensityRaisedFloor As Double + ReadOnly Property BC_PassengerDensityLowFloor As Double + ReadOnly Property BC_PassengerDensitySemiLowFloor As Double + ReadOnly Property BC_PassengerDensityRaisedFloor As Double ReadOnly Property BC_CalculatedPassengerNumber As Double ReadOnly Property BC_UValues As Double Property BC_HeatingBoundaryTemperature As Double Property BC_CoolingBoundaryTemperature As Double + ReadOnly Property BC_TemperatureCoolingTurnsOff As Double Property BC_HighVentilation As Double Property BC_lowVentilation As Double ReadOnly Property BC_High As Double @@ -36,10 +37,8 @@ Namespace Hvac ReadOnly Property BC_HighVentPowerW As Double ReadOnly Property BC_LowVentPowerW As Double Property BC_SpecificVentilationPower As Double - Property BC_COP As Double Property BC_AuxHeaterEfficiency As Double Property BC_GCVDieselOrHeatingOil As Double - Property BC_VolumicMassDieselOrHeatingOil As Double ReadOnly Property BC_WindowAreaPerUnitBusLength As Double ReadOnly Property BC_FrontRearWindowArea As Double Property BC_MaxTemperatureDeltaForLowFloorBusses As Double @@ -52,10 +51,11 @@ Namespace Hvac Property EC_EnviromentalConditions_BatchFile As String Property EC_EnviromentalConditions_BatchEnabled As Boolean - 'AC-system - Property AC_InCabinRoomAC_System As Boolean + 'AC-system Property AC_CompressorType As String + ReadOnly Property AC_CompressorTypeDerived As String Property AC_CompressorCapacitykW As Double + ReadOnly Property AC_COP As Double 'Ventilation Property VEN_VentilationOnDuringHeating As Boolean diff --git a/VECTOAux/VectoAuxiliaries/Hvac/ISSMTOOL.vb b/VECTOAux/VectoAuxiliaries/Hvac/ISSMTOOL.vb index 3759f65d87a15561e632f68e3f6dfa2b8dff4ce9..03c0271f82f167750091f1d1d7968931a83db477 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/ISSMTOOL.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/ISSMTOOL.vb @@ -7,6 +7,7 @@ Public Interface ISSMTOOL Property TechList As ISSMTechList Property Calculate As ISSMCalculate Property SSMDisabled As Boolean + Property HVACConstants As IHVACConstants ReadOnly Property ElectricalWBase As Single ReadOnly Property MechanicalWBase As Single diff --git a/VECTOAux/VectoAuxiliaries/Hvac/SSMCalculate.vb b/VECTOAux/VectoAuxiliaries/Hvac/SSMCalculate.vb index 24bd22a0cab26f82728dfd5b0512eef802de7a54..2322f7a9ceb95692b6db1899191174aed42f64ec 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/SSMCalculate.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/SSMCalculate.vb @@ -193,9 +193,9 @@ Namespace Hvac Dim res As Double res = If(Run1.TotalW < 0 AndAlso Run2.TotalW < 0, _ - If(gen.VEN_VentilationOnDuringHeating AndAlso gen.VEN_VentilationDuringHeating = "high", _ + If(gen.VEN_VentilationOnDuringHeating AndAlso gen.VEN_VentilationDuringHeating.ToLower() = "high", _ gen.BC_HighVentPowerW, _ - If(gen.VEN_VentilationOnDuringHeating AndAlso gen.VEN_VentilationDuringHeating = "low", gen.BC_LowVentPowerW, 0)), 0) + If(gen.VEN_VentilationOnDuringHeating AndAlso gen.VEN_VentilationDuringHeating.ToLower() = "low", gen.BC_LowVentPowerW, 0)), 0) Return res @@ -227,55 +227,56 @@ Namespace Hvac End Get End Property - Public ReadOnly Property BaseCoolingW_Mechanical As Double Implements ISSMCalculate.BaseCoolingW_Mechanical Get - '=IF(C48="mechanical", IF(AND(M79>0,M80>0),MIN(M79:M80),0),0) + '=IF(C46<C28,0,IF(C53="electrical", 0, IF(AND(M89>0,M90>0),MIN(M89:M90),0))) Dim gen As ISSMGenInputs = ssmTOOL.GenInputs - 'Dim C48 = gen.AC_CompressorType - 'Dim M79 = Me.Run1.TotalW - 'Dim M80 = Me.Run2.TotalW - + 'Dim C46 = gen.EC_EnviromentalTemperature + 'Dim C28 = gen.BC_TemperatureCoolingTurnsOff + 'Dim C53 = gen.AC_CompressorTypeDerived + 'Dim M89 = Run1.TotalW + 'Dim M90 = Run2.TotalW - Return If(gen.AC_CompressorType.ToLower = "mechanical", If((Run1.TotalW > 0 AndAlso Run2.TotalW > 0), Math.Min(Run1.TotalW, Run2.TotalW), 0), 0) + Return If(gen.EC_EnviromentalTemperature < gen.BC_TemperatureCoolingTurnsOff, 0, If(gen.AC_CompressorTypeDerived = "electrical", 0, If(Run1.TotalW > 0 AndAlso Run2.TotalW > 0, Math.Min(Run1.TotalW, Run2.TotalW), 0))) - - - End Get + End Get End Property Public ReadOnly Property BaseCoolingW_ElectricalCoolingHeating As Double Implements ISSMCalculate.BaseCoolingW_ElectricalCoolingHeating Get - '=IF(C48="mechanical",0,IF(AND(M79>0,M80>0),MIN(M79:M80),0)) + '=IF(C46<C28,0,IF(C53="electrical",IF(AND(M89>0,M90>0),MIN(M89:M90),0),0)) Dim gen As ISSMGenInputs = ssmTOOL.GenInputs - 'Dim C48 = gen.AC_CompressorType - 'Dim M79 = Me.Run1.TotalW - 'Dim M80 = Me.Run2.TotalW + 'Dim C46 = gen.EC_EnviromentalTemperature + 'Dim C28 = gen.BC_TemperatureCoolingTurnsOff + 'Dim C53 = gen.AC_CompressorTypeDerived + 'Dim M89 = Run1.TotalW + 'Dim M90 = Run2.TotalW - Return If(gen.AC_CompressorType.ToLower = "mechanical", 0, If((Run1.TotalW > 0 AndAlso Run2.TotalW > 0), Math.Min(Run1.TotalW, Run2.TotalW), 0)) + Return If(gen.EC_EnviromentalTemperature < gen.BC_TemperatureCoolingTurnsOff, 0, If(gen.AC_CompressorTypeDerived = "electrical", If(Run1.TotalW > 0 AndAlso Run2.TotalW > 0, Math.Min(Run1.TotalW, Run2.TotalW), 0), 0)) End Get End Property Public ReadOnly Property BaseCoolingW_ElectricalVentilation As Double Implements ISSMCalculate.BaseCoolingW_ElectricalVentilation Get - '=IF(AND(M79>0,M80>0),IF(AND(C54="yes",C57="high"),C30,IF(AND(C54="yes",C57="low"),C31,0)),0) + '=IF(AND(C46>=C28,M89>0,M90>0),IF(AND(C64="yes",C67="high"),C33,IF(AND(C64="yes",C67="low"),C34,0)),0) Dim gen As ISSMGenInputs = ssmTOOL.GenInputs - 'Dim C30 = gen.BC_HighVentPowerW - 'Dim C31 = gen.BC_LowVentPowerW - 'Dim C54 = gen.VEN_VentilationDuringAC - 'Dim C57 = gen.VEN_VentilationDuringCooling - 'Dim M79 = Me.Run1.TotalW - 'Dim M80 = Me.Run2.TotalW - + 'Dim C46 = gen.EC_EnviromentalTemperature + 'Dim C28 = gen.BC_TemperatureCoolingTurnsOff + 'Dim M89 = Run1.TotalW + 'Dim M90 = Run2.TotalW + 'Dim C64 = gen.VEN_VentilationDuringAC + 'Dim C67 = gen.VEN_VentilationDuringCooling + 'Dim C33 = gen.BC_HighVentPowerW + 'Dim C34 = gen.BC_LowVentPowerW - Return If(Run1.TotalW > 0 AndAlso Run2.TotalW > 0, _ - If(gen.VEN_VentilationDuringAC AndAlso gen.VEN_VentilationDuringCooling.ToLower = "high", gen.BC_HighVentPowerW, _ - If(gen.VEN_VentilationDuringAC AndAlso gen.VEN_VentilationDuringCooling.ToLower = "low", gen.BC_LowVentPowerW, 0)), 0) + Return If(gen.EC_EnviromentalTemperature >= gen.BC_TemperatureCoolingTurnsOff AndAlso Run1.TotalW > 0 AndAlso Run2.TotalW > 0, _ + If(gen.VEN_VentilationDuringAC AndAlso gen.VEN_VentilationDuringCooling.ToLower() = "high", gen.BC_HighVentPowerW, If(gen.VEN_VentilationDuringAC AndAlso gen.VEN_VentilationDuringCooling.ToLower() = "low", gen.BC_LowVentPowerW, 0)) _ + , 0) End Get @@ -298,20 +299,21 @@ Namespace Hvac End Property Public ReadOnly Property BaseVentilationW_ElectricalVentilation As Double Implements ISSMCalculate.BaseVentilationW_ElectricalVentilation Get - '=IF(AND(M79>0,M80<0),IF(AND(C53="yes",C55="high"),C30,IF(AND(C53="yes",C55="low"),C31,0)),0) + '=IF(OR(AND(C46<C28,M89>0,M90>0),AND(M89>0,M90<0)),IF(AND(C63="yes",C65="high"),C33,IF(AND(C63="yes",C65="low"),C34,0)),0) Dim gen As ISSMGenInputs = ssmTOOL.GenInputs - 'Dim C30 = gen.BC_HighVentPowerW - 'Dim C31 = gen.BC_LowVentPowerW - 'Dim C53 = gen.VEN_VentilationWhenBothHeatingAndACInactive - 'Dim C55 = gen.VEN_VentilationFlowSettingWhenHeatingAndACInactive - 'Dim M79 = Me.Run1.TotalW - 'Dim M80 = Me.Run2.TotalW - + 'Dim C46 = gen.EC_EnviromentalTemperature + 'Dim C28 = gen.BC_TemperatureCoolingTurnsOff + 'Dim M89 = Run1.TotalW + 'Dim M90 = Run2.TotalW + 'Dim C63 = gen.VEN_VentilationWhenBothHeatingAndACInactive + 'Dim C65 = gen.VEN_VentilationFlowSettingWhenHeatingAndACInactive + 'Dim C33 = gen.BC_HighVentPowerW + 'Dim C34 = gen.BC_LowVentPowerW - Return If((Run1.TotalW > 0 AndAlso Run2.TotalW < 0), If(gen.VEN_VentilationWhenBothHeatingAndACInactive AndAlso gen.VEN_VentilationFlowSettingWhenHeatingAndACInactive.ToLower = "high", gen.BC_HighVentPowerW, _ - If(gen.VEN_VentilationWhenBothHeatingAndACInactive AndAlso gen.VEN_VentilationFlowSettingWhenHeatingAndACInactive.ToLower = "low", gen.BC_LowVentPowerW, 0)), 0) + Return If((gen.EC_EnviromentalTemperature < gen.BC_TemperatureCoolingTurnsOff AndAlso Run1.TotalW > 0 AndAlso Run2.TotalW > 0) OrElse (Run1.TotalW > 0 AndAlso Run2.TotalW < 0), _ + If(gen.VEN_VentilationWhenBothHeatingAndACInactive AndAlso gen.VEN_VentilationFlowSettingWhenHeatingAndACInactive.ToLower() = "high", gen.BC_HighVentPowerW, If(gen.VEN_VentilationWhenBothHeatingAndACInactive AndAlso gen.VEN_VentilationFlowSettingWhenHeatingAndACInactive.ToLower() = "low", gen.BC_LowVentPowerW, 0)), 0) End Get End Property @@ -549,15 +551,19 @@ Namespace Hvac Private Function CalculateElectricalWBase(genInputs As ISSMGenInputs, EnviromentalTemperature As Double, Solar As Double, Weight As Single) As Single - '=(SUM(H84)/C33)+SUM(I83:I85) + 'MIN(SUM(H94),C54*1000)/C59+SUM(I93:I95) genInputs.EC_EnviromentalTemperature = EnviromentalTemperature genInputs.EC_Solar = Solar - 'Dim H84 As Double = BaseCoolingW_ElectricalCoolingHeating - 'Dim C33 As Double = gen.BC_COP - Dim BaseVentilation As Double = BaseHeatingW_ElectricalVentilation + BaseCoolingW_ElectricalVentilation + BaseVentilationW_ElectricalVentilation ' SUM(I83:I85) - Dim ElectricalWBaseCurrentResult As Double = (BaseCoolingW_ElectricalCoolingHeating / genInputs.BC_COP) + BaseVentilation + 'Dim H94 = BaseCoolingW_ElectricalCoolingHeating + 'Dim C54 = genInputs.AC_CompressorCapacitykW + 'Dim C59 = genInputs.AC_COP + 'Dim I93 = BaseHeatingW_ElectricalVentilation + 'Dim I94 = BaseCoolingW_ElectricalVentilation + 'Dim I95 = BaseVentilationW_ElectricalVentilation + + Dim ElectricalWBaseCurrentResult As Double = Math.Min(BaseCoolingW_ElectricalCoolingHeating, genInputs.AC_CompressorCapacitykW * 1000) / genInputs.AC_COP + BaseHeatingW_ElectricalVentilation + BaseCoolingW_ElectricalVentilation + BaseVentilationW_ElectricalVentilation Return ElectricalWBaseCurrentResult * Weight @@ -565,58 +571,63 @@ Namespace Hvac Private Function CalculateMechanicalWBase(genInputs As ISSMGenInputs, EnviromentalTemperature As Double, Solar As Double, Weight As Single) As Single - '=F84/C33 + '=MIN(F94,C54*1000)/C59 genInputs.EC_EnviromentalTemperature = EnviromentalTemperature genInputs.EC_Solar = Solar - 'Dim F84 As Double = BaseCoolingW_Mechanical - 'Dim C33 As Double = gen.BC_COP + 'Dim F94 = BaseCoolingW_Mechanical + 'Dim C54 = genInputs.AC_CompressorCapacitykW + 'Dim C59 = genInputs.AC_COP - Return (BaseCoolingW_Mechanical / genInputs.BC_COP) * Weight + Dim MechanicalWBaseCurrentResult As Double = Math.Min(BaseCoolingW_Mechanical, genInputs.AC_CompressorCapacitykW * 1000) / genInputs.AC_COP + + Return MechanicalWBaseCurrentResult * Weight End Function Private Function CalculateFuelLPerHBase(genInputs As ISSMGenInputs, EnviromentalTemperature As Double, Solar As Double, Weight As Single) As Single - '=ABS((J83/1000)*(1/(C36*C35))/C34) + '=(MIN(ABS(J93/1000),C71)/C37)*(1/(C39*C38)) genInputs.EC_EnviromentalTemperature = EnviromentalTemperature genInputs.EC_Solar = Solar - 'Dim J83 As Double = BaseHeatingW_FuelFiredHeating - 'Dim C34 As Double = genInputs.BC_AuxHeaterEfficiency - 'Dim C35 As Double = genInputs.BC_GCVDieselOrHeatingOil - 'Dim C36 As Double = genInputs.BC_VolumicMassDieselOrHeatingOil + 'Dim J93 = BaseHeatingW_FuelFiredHeating + 'Dim C71 = genInputs.AH_FuelFiredHeaterkW + 'Dim C37 = genInputs.BC_AuxHeaterEfficiency + 'Dim C39 = ssmTOOL.HVACConstants.FuelDensity + 'Dim C38 = genInputs.BC_GCVDieselOrHeatingOil + + Dim FuelLPerHBaseCurrentResult As Double = (Math.Min(Math.Abs(BaseHeatingW_FuelFiredHeating / 1000), genInputs.AH_FuelFiredHeaterkW) / genInputs.BC_AuxHeaterEfficiency) * (1 / (genInputs.BC_GCVDieselOrHeatingOil * ssmTOOL.HVACConstants.FuelDensity)) - Return (Math.Abs((BaseHeatingW_FuelFiredHeating / 1000) * (1 / (genInputs.BC_VolumicMassDieselOrHeatingOil * genInputs.BC_GCVDieselOrHeatingOil)) / genInputs.BC_AuxHeaterEfficiency)) * Weight + Return FuelLPerHBaseCurrentResult * Weight End Function Private Function CalculateElectricalWAdjusted(genInputs As ISSMGenInputs, tecList As ISSMTechList, EnviromentalTemperature As Double, Solar As Double, Weight As Single) As Single - '=((H84*(1-H90))/C33)+(I83*(1-I89))+(I84*(1-I90))+(I85*(1-I91)) + IF('TECH LIST INPUT'!D36="electrical",-'TECH LIST INPUT'!R93*1000,0) - + '=(MIN((H94*(1-H100)),C54*1000)/C59)+(I93*(1-I99))+(I94*(1-I100))+(I95*(1-I101)) + IF('TECH LIST INPUT'!D36="electrical",-'TECH LIST INPUT'!R93*1000,0) + genInputs.EC_EnviromentalTemperature = EnviromentalTemperature genInputs.EC_Solar = Solar - Dim cnt As Integer = tecList.TechLines.Where(Function(f) f.LineType = TechLineType.DriverACElectrical).Count() Dim DACElectrical As Boolean = tecList.TechLines.Where(Function(f) f.LineType = TechLineType.DriverACElectrical AndAlso f.OnVehicle).Count() = 1 Dim AdjustedAddition As Double = If(Not DACElectrical, 0, -tecList.CValueVariationKW * 1000) - Dim H84 As Double = BaseCoolingW_ElectricalCoolingHeating - Dim H90 As Double = TechListAdjustedCoolingW_ElectricalCoolingHeating - Dim C33 As Double = genInputs.BC_COP + Dim H94 As Double = BaseCoolingW_ElectricalCoolingHeating + Dim H100 As Double = TechListAdjustedCoolingW_ElectricalCoolingHeating + Dim C54 As Double = genInputs.AC_CompressorCapacitykW + Dim C59 As Double = genInputs.AC_COP - Dim I83 As Double = BaseHeatingW_ElectricalVentilation - Dim I84 As Double = BaseCoolingW_ElectricalVentilation - Dim I85 As Double = BaseVentilationW_ElectricalVentilation - Dim I89 As Double = TechListAdjustedHeatingW_ElectricalVentilation - Dim I90 As Double = TechListAdjustedCoolingW_ElectricalVentilation - Dim I91 As Double = TechListAdjustedVentilationW_ElectricalVentilation + Dim I93 As Double = BaseHeatingW_ElectricalVentilation + Dim I94 As Double = BaseCoolingW_ElectricalVentilation + Dim I95 As Double = BaseVentilationW_ElectricalVentilation + Dim I99 As Double = TechListAdjustedHeatingW_ElectricalVentilation + Dim I100 As Double = TechListAdjustedCoolingW_ElectricalVentilation + Dim I101 As Double = TechListAdjustedVentilationW_ElectricalVentilation - - Dim ElectricalWAdjusted As Single = ((H84 * (1 - H90)) / C33) + (I83 * (1 - I89)) + (I84 * (1 - I90)) + (I85 * (1 - I91)) + AdjustedAddition + Dim ElectricalWAdjusted As Single = (Math.Min((H94 * (1 - H100)), C54 * 1000) / C59) + (I93 * (1 - I99)) + (I94 * (1 - I100)) + (I95 * (1 - I101)) + AdjustedAddition Return ElectricalWAdjusted * Weight @@ -624,19 +635,20 @@ Namespace Hvac Private Function CalculateMechanicalWBaseAdjusted(genInputs As ISSMGenInputs, tecList As ISSMTechList, EnviromentalTemperature As Double, Solar As Double, Weight As Single) As Single - '=(F84*(1-F90)/C33) + IF('TECH LIST INPUT'!D36="mechanical",-'TECH LIST INPUT'!R93*1000,0) - + '=(MIN((F94*(1-F100)),C54*1000)/C59) + IF('TECH LIST INPUT'!D36="mechanical",-'TECH LIST INPUT'!R93*1000,0) + genInputs.EC_EnviromentalTemperature = EnviromentalTemperature genInputs.EC_Solar = Solar Dim DACMechanical As Boolean = tecList.TechLines.Where(Function(f) f.LineType = TechLineType.DriverACMechanical AndAlso f.OnVehicle).Count() = 1 Dim AdjustedAddition As Double = If(Not DACMechanical, 0, tecList.CValueVariationKW * 1000) - 'Dim F84 As Double = BaseCoolingW_Mechanical - 'Dim F90 As Double = TechListAdjustedCoolingW_Mechanical - 'Dim C33 As Double = gen.BC_COP + Dim F94 As Double = BaseCoolingW_Mechanical + Dim F100 As Double = TechListAdjustedCoolingW_Mechanical + Dim C54 As Double = genInputs.AC_CompressorCapacitykW + Dim C59 As Double = genInputs.AC_COP - Dim MechanicalWBaseAdjusted As Single = (BaseCoolingW_Mechanical * (1 - TechListAdjustedCoolingW_Mechanical) / genInputs.BC_COP) + AdjustedAddition + Dim MechanicalWBaseAdjusted As Single = (Math.Min((F94 * (1 - F100)), C54 * 1000) / C59) + AdjustedAddition Return MechanicalWBaseAdjusted * Weight @@ -644,25 +656,27 @@ Namespace Hvac Private Function CalculateFuelLPerHBaseAdjusted(genInputs As ISSMGenInputs, tecList As ISSMTechList, EnviromentalTemperature As Double, Solar As Double, Weight As Single) As Single - '=ABS((IF(AND(M79<0,M80<0),VLOOKUP(MAX(M79:M80),M79:P80,4),0)/1000)*(1/(C36*C35))/C34) + '=MIN(ABS(IF(AND(M89<0,M90<0),VLOOKUP(MAX(M89:M90),M89:P90,4),0)/1000),C71)/C37*(1/(C39*C38)) genInputs.EC_EnviromentalTemperature = EnviromentalTemperature genInputs.EC_Solar = Solar - Dim C34 As Double = genInputs.BC_AuxHeaterEfficiency - Dim C35 As Double = genInputs.BC_GCVDieselOrHeatingOil - Dim C36 As Double = genInputs.BC_VolumicMassDieselOrHeatingOil - Dim result As Double + 'Dim M89 = Run1.TotalW + 'Dim M90 = genInputs.BC_GCVDieselOrHeatingOil + 'Dim C71 = genInputs.AH_FuelFiredHeaterkW + 'Dim C37 = genInputs.BC_AuxHeaterEfficiency + 'Dim C38 = genInputs.BC_GCVDieselOrHeatingOil + 'Dim C39 = ssmTOOL.HVACConstants.FuelDensity + + Dim result As Double = 0 - If Run1.TotalW < 0 AndAlso Run1.TotalW < 0 Then - result = If(Run1.TotalW > Run2.TotalW, Run1.TechListAmendedFuelW, Run2.TechListAmendedFuelW) / 1000 - Else - result = 0 + If Run1.TotalW < 0 AndAlso Run2.TotalW < 0 Then + result = Math.Abs(If(Run1.TotalW > Run2.TotalW, Run1.TechListAmendedFuelW, Run2.TechListAmendedFuelW) / 1000) End If - Dim FuelLPerHBaseAdjusted As Single = (Math.Abs(result * (1 / (genInputs.BC_VolumicMassDieselOrHeatingOil * genInputs.BC_GCVDieselOrHeatingOil)) / genInputs.BC_AuxHeaterEfficiency)) * Weight + Dim FuelLPerHBaseAdjusted As Single = Math.Min(result, genInputs.AH_FuelFiredHeaterkW) / genInputs.BC_AuxHeaterEfficiency * (1 / (genInputs.BC_GCVDieselOrHeatingOil * ssmTOOL.HVACConstants.FuelDensity)) - Return FuelLPerHBaseAdjusted + Return FuelLPerHBaseAdjusted * Weight End Function End Class diff --git a/VECTOAux/VectoAuxiliaries/Hvac/SSMGenInputs.vb b/VECTOAux/VectoAuxiliaries/Hvac/SSMGenInputs.vb index 498767aa5dab0d31df834451a60cf52bfa68ca4f..14b3b231dbd69b1ed54b27a8349365ab7df26eb9 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/SSMGenInputs.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/SSMGenInputs.vb @@ -9,22 +9,27 @@ Namespace Hvac Private _EC_EnviromentalConditions_BatchFile As String Private _EC_EnvironmentalConditionsMap As IEnvironmentalConditionsMap - 'BUS Parameterisation - '******************** +#Region "Constructors" + + Sub New(Optional initialiseDefaults As Boolean = False) + + If initialiseDefaults Then SetDefaults() + + End Sub + +#End Region + +#Region "Bus Parameterisation" + 'C4/D4 Public Property BP_BusModel As String Implements ISSMGenInputs.BP_BusModel + 'C5/D5 Public Property BP_NumberOfPassengers As Double Implements ISSMGenInputs.BP_NumberOfPassengers + 'C6/D6 Public Property BP_BusFloorType As String Implements ISSMGenInputs.BP_BusFloorType - 'C10/D10 - Public Property BP_DoubleDecker As Boolean Implements ISSMGenInputs.BP_DoubleDecker - 'D12/C12 - ( M ) - Public Property BP_BusLength As Double Implements ISSMGenInputs.BP_BusLength - 'D13/C13 - ( M ) - Public Property BP_BusWidth As Double Implements ISSMGenInputs.BP_BusWidth - 'D14/C14 - ( M ) - Public Property BP_BusHeight As Double Implements ISSMGenInputs.BP_BusHeight + 'D7/C7 - ( M/2 ) Public ReadOnly Property BP_BusFloorSurfaceArea As Double Implements ISSMGenInputs.BP_BusFloorSurfaceArea Get @@ -38,13 +43,15 @@ Namespace Hvac End Get End Property + 'D8/C8 - ( M/2 ) Public ReadOnly Property BP_BusSurfaceAreaM2 As Double Implements ISSMGenInputs.BP_BusSurfaceAreaM2 Get '2 * (C12*C13 + C12*C14 + C13*C14) - Return (BP_BusLength * BP_BusWidth) + (BP_BusLength * BP_BusHeight) + (BP_BusWidth * BP_BusHeight) + Return 2 * ((BP_BusLength * BP_BusWidth) + (BP_BusLength * BP_BusHeight) + (BP_BusWidth * BP_BusHeight)) End Get End Property + 'D9/C9 - ( M/2 ) Public ReadOnly Property BP_BusWindowSurface As Double Implements ISSMGenInputs.BP_BusWindowSurface Get @@ -52,7 +59,11 @@ Namespace Hvac Return (BC_WindowAreaPerUnitBusLength * BP_BusLength) + BC_FrontRearWindowArea End Get End Property - 'D11/C11 - ( M ) + + 'C10/D10 + Public Property BP_DoubleDecker As Boolean Implements ISSMGenInputs.BP_DoubleDecker + + 'D11/C11 - ( M/3 ) Public ReadOnly Property BP_BusVolume As Double Implements ISSMGenInputs.BP_BusVolume Get '=(C12*C13*C14) @@ -60,120 +71,174 @@ Namespace Hvac End Get End Property - 'BOUNDRY CONDITIONS - '****************** - 'C15 + 'D12/C12 - ( M ) + Public Property BP_BusLength As Double Implements ISSMGenInputs.BP_BusLength + + 'D13/C13 - ( M ) + Public Property BP_BusWidth As Double Implements ISSMGenInputs.BP_BusWidth + + 'D14/C14 - ( M ) + Public Property BP_BusHeight As Double Implements ISSMGenInputs.BP_BusHeight + +#End Region + +#Region "Boundary Conditions" + + 'C17 Public Property BC_GFactor As Double Implements ISSMGenInputs.BC_GFactor - 'C16 + + 'C18 Public ReadOnly Property BC_SolarClouding As Double Implements ISSMGenInputs.BC_SolarClouding Get - '=IF(D6="low floor",0.65,IF(D6="semi low floor",0.8,0.8)) - Return If(BP_BusFloorType = "low floor", 0.65, If(BP_BusFloorType = "semi low floor", 0.8, 0.8)) + '=IF(C46<17,0.65,0.8) + Return If(EC_EnviromentalTemperature < 17, 0.65, 0.8) End Get End Property - 'C17 - Watts + + 'C19 - ( W ) Public ReadOnly Property BC_HeatPerPassengerIntoCabinW As Double Implements ISSMGenInputs.BC_HeatPerPassengerIntoCabinW Get - '=IF(C43>C18,80,50) - Return If(EC_EnviromentalTemperature > BC_PassengerBoundaryTemperature, 80, 50) + '=IF(C46<17,50,80) + Return If(EC_EnviromentalTemperature < 17, 50, 80) End Get End Property - 'C18 - Degrees Centegrade + + 'C20 - ( oC ) Public Property BC_PassengerBoundaryTemperature As Double Implements ISSMGenInputs.BC_PassengerBoundaryTemperature - 'C19 - Passenger/Metre Squared - Public Property BC_PassengerDensityLowFloor As Double Implements ISSMGenInputs.BC_PassengerDensityLowFloor - 'C20 - Passenger/Metre Squared - Public Property BC_PassengerDensitySemiLowFloor As Double Implements ISSMGenInputs.BC_PassengerDensitySemiLowFloor - 'C21 - Passenger/Metre Squared - Public Property BC_PassengerDensityRaisedFloor As Double Implements ISSMGenInputs.BC_PassengerDensityRaisedFloor - 'C22 + + 'C21 - ( Passenger/Metre Squared ) + Public ReadOnly Property BC_PassengerDensityLowFloor As Double Implements ISSMGenInputs.BC_PassengerDensityLowFloor + Get + '=IF($C$10="No",3,3.7) + Return If(BP_DoubleDecker, 3.7, 3) + End Get + End Property + + 'C22 - ( Passenger/Metre Squared ) + Public ReadOnly Property BC_PassengerDensitySemiLowFloor As Double Implements ISSMGenInputs.BC_PassengerDensitySemiLowFloor + Get + '=IF($C$10="No",2.2,3) + Return If(BP_DoubleDecker, 3, 2.2) + End Get + End Property + + 'C23 - ( Passenger/Metre Squared ) + Public ReadOnly Property BC_PassengerDensityRaisedFloor As Double Implements ISSMGenInputs.BC_PassengerDensityRaisedFloor + Get + '=IF($C$10="No",1.4,2) + Return If(BP_DoubleDecker, 2, 1.4) + End Get + End Property + + 'C24 Public ReadOnly Property BC_CalculatedPassengerNumber As Double Implements ISSMGenInputs.BC_CalculatedPassengerNumber Get - '=IF(D6="low floor",C19,IF(D6="semi low floor",C20,C21))*D7 - Return If(BP_BusFloorType = "low floor", BC_PassengerDensityLowFloor, If(BP_BusFloorType = "semi low floor", BC_PassengerDensitySemiLowFloor, BC_PassengerDensityRaisedFloor)) * BP_BusFloorSurfaceArea + '=ROUND(IF($D$5<IF(D6="low floor",C21,IF(D6="semi low floor",C22,C23))*D7,$D$5,IF(D6="low floor",C21,IF(D6="semi low floor",C22,C23))*D7),0) + Dim tmp As Double = If(BP_BusFloorType = "low floor", BC_PassengerDensityLowFloor, If(BP_BusFloorType = "semi low floor", BC_PassengerDensitySemiLowFloor, BC_PassengerDensityRaisedFloor)) * BP_BusFloorSurfaceArea + Return Math.Round(If(BP_NumberOfPassengers < tmp, BP_NumberOfPassengers, tmp), 0) End Get End Property - 'C23 ( W/K/M3 ) + + 'C25 - ( W/K/M3 ) Public ReadOnly Property BC_UValues As Double Implements ISSMGenInputs.BC_UValues Get '=IF(D6="low floor",4,IF(D6="semi low floor",3.5,3)) Return If(BP_BusFloorType = "low floor", 4, If(BP_BusFloorType = "semi low floor", 3.5, 3)) - End Get End Property - 'C24 - Degrees Centegrade + + 'C26 - ( oC ) Public Property BC_HeatingBoundaryTemperature As Double Implements ISSMGenInputs.BC_HeatingBoundaryTemperature - 'C25 - Degrees Centegrde + + 'C27 - ( oC ) Public Property BC_CoolingBoundaryTemperature As Double Implements ISSMGenInputs.BC_CoolingBoundaryTemperature - 'C26 - ( L/H ) + + 'C28 - ( oC ) + Public ReadOnly Property BC_TemperatureCoolingTurnsOff As Double Implements ISSMGenInputs.BC_TemperatureCoolingTurnsOff + Get + Return 17 + End Get + End Property + + 'C29 - ( L/H ) Public Property BC_HighVentilation As Double Implements ISSMGenInputs.BC_HighVentilation - 'C27 - ( L/H ) + + 'C30 - ( L/H ) Public Property BC_lowVentilation As Double Implements ISSMGenInputs.BC_lowVentilation - 'C28 - ( M3/H ) + + 'C31 - ( M3/H ) Public ReadOnly Property BC_High As Double Implements ISSMGenInputs.BC_High Get - '=D10*C26 + '=D11*C29 Return BP_BusVolume * BC_HighVentilation End Get End Property - 'C29 - ( M3/H ) + + 'C32 - ( M3/H ) Public ReadOnly Property BC_Low As Double Implements ISSMGenInputs.BC_Low Get - '=C27*D10 + '=C30*D11 Return BP_BusVolume * BC_lowVentilation End Get End Property - 'C30 - Watts + + 'C33 - ( W ) Public ReadOnly Property BC_HighVentPowerW As Double Implements ISSMGenInputs.BC_HighVentPowerW Get - '=C28*C32 + '=C31*C35 Return BC_High * BC_SpecificVentilationPower End Get End Property - 'C31 - Watts + + 'C34 - ( W ) Public ReadOnly Property BC_LowVentPowerW As Double Implements ISSMGenInputs.BC_LowVentPowerW Get - '=C29*C32 + '=C32*C35 Return BC_Low * BC_SpecificVentilationPower End Get End Property - 'C32 - ( Wh/M3 ) + + 'C35 - ( Wh/M3 ) Public Property BC_SpecificVentilationPower As Double Implements ISSMGenInputs.BC_SpecificVentilationPower - 'C33 - Public Property BC_COP As Double Implements ISSMGenInputs.BC_COP - 'C34 + + 'C37 Public Property BC_AuxHeaterEfficiency As Double Implements ISSMGenInputs.BC_AuxHeaterEfficiency - 'C35 - ( KW/HKG ) + + 'C38 - ( KW/HKG ) Public Property BC_GCVDieselOrHeatingOil As Double Implements ISSMGenInputs.BC_GCVDieselOrHeatingOil - 'C36 - ( KG/L ) - Public Property BC_VolumicMassDieselOrHeatingOil As Double Implements ISSMGenInputs.BC_VolumicMassDieselOrHeatingOil - 'C37 - ( M2/M ) + + 'C40 - ( M2/M ) Public ReadOnly Property BC_WindowAreaPerUnitBusLength As Double Implements ISSMGenInputs.BC_WindowAreaPerUnitBusLength Get - 'NOTE:This forumla always returns 1.5 - '=IF(D6="low floor",1.5,IF(D6="semi low floor",1.5,1.5)) - Return If(BP_BusFloorType = "low floor", 1.5, If(BP_BusFloorType = "semi low floor", 1.5, 1.5)) + '=IF($C$10="No",1.5,2.5) + Return If(BP_DoubleDecker, 2.5, 1.5) End Get End Property - 'C38 - ( M/2 ) + + 'C41 - ( M/2 ) Public ReadOnly Property BC_FrontRearWindowArea As Double Implements ISSMGenInputs.BC_FrontRearWindowArea Get - 'NOTE: This formulae always return 5 - '=IF(D6="low floor",5,IF(D6="semi low floor",5,5)) - Return If(BP_BusFloorType = "low floor", 5, If(BP_BusFloorType = "low floor", 5, 5)) + '=IF($C$10="No",5,8) + Return If(BP_DoubleDecker, 8, 5) End Get End Property - 'C39 - ( K ) + + 'C42 - ( K ) Public Property BC_MaxTemperatureDeltaForLowFloorBusses As Double Implements ISSMGenInputs.BC_MaxTemperatureDeltaForLowFloorBusses - 'C40 - ( Fraction ) + + 'C43 - ( Fraction ) Public Property BC_MaxPossibleBenefitFromTechnologyList As Double Implements ISSMGenInputs.BC_MaxPossibleBenefitFromTechnologyList - 'Environmental Conditions - '************************ - 'C43 - ( Degrees Centegrade ) +#End Region + +#Region "Environmental Conditions" + + 'C46 - ( oC ) Public Property EC_EnviromentalTemperature As Double Implements ISSMGenInputs.EC_EnviromentalTemperature - 'C44 - ( W/M3 ) + + 'C47 - ( W/M3 ) Public Property EC_Solar As Double Implements ISSMGenInputs.EC_Solar + '( EC_EnviromentalTemperature and EC_Solar) (Batch Mode) Public ReadOnly Property EC_EnvironmentalConditionsMap As IEnvironmentalConditionsMap Implements ISSMGenInputs.EC_EnvironmentalConditionsMap Get @@ -193,48 +258,76 @@ Namespace Hvac Public Property EC_EnviromentalConditions_BatchEnabled As Boolean Implements ISSMGenInputs.EC_EnviromentalConditions_BatchEnabled - 'AC SYSTEM - '********* - 'C47 - Boolean Yes/No - Public Property AC_InCabinRoomAC_System As Boolean Implements ISSMGenInputs.AC_InCabinRoomAC_System - 'C48 - "mechanical/electrical +#End Region + +#Region "AC System" + + 'C53 - "Continous/2-stage/3-stage/4-stage Public Property AC_CompressorType As String Implements ISSMGenInputs.AC_CompressorType - 'C49 - ( KW ) + + 'mechanical/electrical + Public ReadOnly Property AC_CompressorTypeDerived As String Implements ISSMGenInputs.AC_CompressorTypeDerived + Get + Return If(AC_CompressorType = "Continuous", "Electrical", "Mechanical") + End Get + End Property + + 'C54 - ( KW ) Public Property AC_CompressorCapacitykW As Double Implements ISSMGenInputs.AC_CompressorCapacitykW + 'C59 + Public ReadOnly Property AC_COP As Double Implements ISSMGenInputs.AC_COP + Get + Dim cop As Double = 3.5R + + If (Not AC_CompressorType Is Nothing) Then + cop = If(AC_CompressorType.ToLower = "3-stage", cop * 1.02, cop) + cop = If(AC_CompressorType.ToLower = "4-stage", cop * 1.02, cop) + cop = If(AC_CompressorType.ToLower = "continuous", If(BP_BusFloorType.ToLower = "low floor", cop * 1.04, cop * 1.06), cop) + End If + + Return Math.Round(cop, 2) + End Get + End Property + +#End Region + +#Region "Ventilation" - 'VENTILATION - '*********** - 'C52 - Boolean Yes/No + 'C62 - Boolean Yes/No Public Property VEN_VentilationOnDuringHeating As Boolean Implements ISSMGenInputs.VEN_VentilationOnDuringHeating - 'C53 - Boolean Yes/No + + 'C63 - Boolean Yes/No Property VEN_VentilationWhenBothHeatingAndACInactive As Boolean Implements ISSMGenInputs.VEN_VentilationWhenBothHeatingAndACInactive - 'C54 - Boolean Yes/No + + 'C64 - Boolean Yes/No Public Property VEN_VentilationDuringAC As Boolean Implements ISSMGenInputs.VEN_VentilationDuringAC - 'C55 - String high/low + + 'C65 - String high/low Public Property VEN_VentilationFlowSettingWhenHeatingAndACInactive As String Implements ISSMGenInputs.VEN_VentilationFlowSettingWhenHeatingAndACInactive - 'C56 - String high/low + + 'C66 - String high/low Property VEN_VentilationDuringHeating As String Implements ISSMGenInputs.VEN_VentilationDuringHeating - 'C57 - String high/low + + 'C67 - String high/low Property VEN_VentilationDuringCooling As String Implements ISSMGenInputs.VEN_VentilationDuringCooling +#End Region - 'AUX HEATER - '********** - 'C60 - ( KW ) +#Region "AUX Heater" + + 'C70 - ( KW ) Public Property AH_EngineWasteHeatkW As Double Implements ISSMGenInputs.AH_EngineWasteHeatkW - 'C61 - ( KW ) + + 'C71 - ( KW ) Public Property AH_FuelFiredHeaterkW As Double Implements ISSMGenInputs.AH_FuelFiredHeaterkW - Sub New(Optional initialiseDefaults As Boolean = False) +#End Region - If initialiseDefaults Then SetDefaults() - - End Sub +#Region "Default Values" Private Sub SetDefaults() - 'BUS Parameterisation '******************** BP_BusModel = "DummyBus" @@ -252,32 +345,32 @@ Namespace Hvac 'BOUNDRY CONDITIONS '****************** - BC_GFactor = 1.0R + BC_GFactor = 0.95R 'BC_SolarClouding As Double :Calculated 'BC_HeatPerPassengerIntoCabinW :Calculated - BC_PassengerBoundaryTemperature = 13.0R - BC_PassengerDensityLowFloor = 3.0R - BC_PassengerDensitySemiLowFloor = 2.0R - BC_PassengerDensityRaisedFloor = 1.4R + BC_PassengerBoundaryTemperature = 12.0R + 'BC_PassengerDensityLowFloor :Calculated + 'BC_PassengerDensitySemiLowFloor :Calculated + 'BC_PassengerDensityRaisedFloor :Calculated 'BC_CalculatedPassengerNumber :Calculated 'BC_UValues :Calculated - BC_HeatingBoundaryTemperature = 20.0R - BC_CoolingBoundaryTemperature = 24.0R - BC_HighVentilation = 25.0R - BC_lowVentilation = 8.0R + BC_HeatingBoundaryTemperature = 18.0R + BC_CoolingBoundaryTemperature = 23.0R + 'BC_CoolingBoundaryTemperature : ReadOnly Static + BC_HighVentilation = 20.0R + BC_lowVentilation = 7.0R 'BC_High :Calculated 'BC_Low :Calculated 'BC_HighVentPowerW :Calculated 'BC_LowVentPowerW :Calculated - BC_SpecificVentilationPower = 0.6R - BC_COP = 4.0R - BC_AuxHeaterEfficiency = 1.0R - BC_GCVDieselOrHeatingOil = 13.0R - BC_VolumicMassDieselOrHeatingOil = 1.0R + BC_SpecificVentilationPower = 0.56R + 'BC_COP :Calculated + BC_AuxHeaterEfficiency = 0.84R + BC_GCVDieselOrHeatingOil = 11.8R 'BC_WindowAreaPerUnitBusLength :Calculated 'BC_FrontRearWindowArea :Calculated - BC_MaxTemperatureDeltaForLowFloorBusses = 4.0R - BC_MaxPossibleBenefitFromTechnologyList = 0.03R + BC_MaxTemperatureDeltaForLowFloorBusses = 3.0R + BC_MaxPossibleBenefitFromTechnologyList = 0.5R 'Environmental Conditions '************************ @@ -287,8 +380,7 @@ Namespace Hvac 'AC SYSTEM '********* - AC_InCabinRoomAC_System = True - AC_CompressorType = "mechanical" + AC_CompressorType = "2-stage" AC_CompressorCapacitykW = 18.0R @@ -299,19 +391,17 @@ Namespace Hvac VEN_VentilationDuringAC = True VEN_VentilationFlowSettingWhenHeatingAndACInactive = "high" VEN_VentilationDuringHeating = "high" - VEN_VentilationDuringCooling = "low" - + VEN_VentilationDuringCooling = "high" 'AUX HEATER '********** - AH_EngineWasteHeatkW = 2.0R - AH_FuelFiredHeaterkW = 10.0R - - + AH_FuelFiredHeaterkW = 30.0R End Sub +#End Region + End Class End Namespace diff --git a/VECTOAux/VectoAuxiliaries/Hvac/SSMTOOL.vb b/VECTOAux/VectoAuxiliaries/Hvac/SSMTOOL.vb index bb13a784b983013a35e2770bf2a64e22575045d2..6491996754d20fcd54c599b078fa70129ddc3056 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/SSMTOOL.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/SSMTOOL.vb @@ -18,6 +18,7 @@ Namespace Hvac Public Property TechList As ISSMTechList Implements ISSMTOOL.TechList Public Property Calculate As ISSMCalculate Implements ISSMTOOL.Calculate Public Property SSMDisabled As Boolean Implements ISSMTOOL.SSMDisabled + Public Property HVACConstants As IHVACConstants Implements ISSMTOOL.HVACConstants 'Repeat Warning Flags Private CompressorCapacityInsufficientWarned As Boolean @@ -39,6 +40,7 @@ Namespace Hvac Return If(SSMDisabled, 0, Calculate.FuelPerHBase) End Get End Property + 'Adjusted Values Public ReadOnly Property ElectricalWAdjusted As Single Implements ISSMTOOL.ElectricalWAdjusted Get @@ -49,7 +51,7 @@ Namespace Hvac Get Dim mechAdjusted As Single = If(SSMDisabled, 0, Calculate.MechanicalWBaseAdjusted) - If CompressorCapacityInsufficientWarned = False AndAlso (mechAdjusted) / (1000 * GenInputs.BC_COP) > GenInputs.AC_CompressorCapacitykW Then + If CompressorCapacityInsufficientWarned = False AndAlso (mechAdjusted) / (1000 * GenInputs.AC_COP) > GenInputs.AC_CompressorCapacitykW Then OnMessage(Me, "HVAC SSM :AC-Compressor Capacity unable to service cooling, run continues as if capacity was sufficient.", AdvancedAuxiliaryMessageType.Warning) CompressorCapacityInsufficientWarned = True @@ -68,10 +70,11 @@ Namespace Hvac End Property 'Constructors - Sub New(filePath As String, Optional isDisabled As Boolean = False, Optional useTestValues As Boolean = False) + Sub New(filePath As String, hvacConstants As HVACConstants, Optional isDisabled As Boolean = False, Optional useTestValues As Boolean = False) Me.filePath = filePath Me.SSMDisabled = isDisabled + Me.HVACConstants = hvacConstants GenInputs = New SSMGenInputs(useTestValues) TechList = New SSMTechList(filePath, GenInputs) @@ -129,7 +132,7 @@ Namespace Hvac Dim returnValue As Boolean = True Dim settings As JsonSerializerSettings = New JsonSerializerSettings() - Dim tmpAux As SSMTOOL = New SSMTOOL(filePath) + Dim tmpAux As SSMTOOL = New SSMTOOL(filePath, HVACConstants) settings.TypeNameHandling = TypeNameHandling.Objects @@ -248,33 +251,25 @@ Namespace Hvac Public Function FuelPerHBaseAsjusted(AverageUseableEngineWasteHeatKW As Single) As Single Implements ISSMTOOL.FuelPerHBaseAsjusted If SSMDisabled Then - Return 0 + End If - Else - - 'Set Engine Waste Heat - GenInputs.AH_EngineWasteHeatkW = AverageUseableEngineWasteHeatKW - Dim fba As Single = FuelPerHBaseAdjusted - - Dim FuelFiredWarning As Boolean = fba * GenInputs.BC_AuxHeaterEfficiency * GenInputs.BC_VolumicMassDieselOrHeatingOil * GenInputs.BC_GCVDieselOrHeatingOil * 1000 > _ - (AverageUseableEngineWasteHeatKW + GenInputs.AH_FuelFiredHeaterkW) - - - If Not FuelFiredHeaterInsufficientWarned AndAlso FuelFiredWarning Then - - FuelFiredHeaterInsufficientWarned = True + 'Set Engine Waste Heat + GenInputs.AH_EngineWasteHeatkW = AverageUseableEngineWasteHeatKW + Dim fba As Single = FuelPerHBaseAdjusted - OnMessage(Me, " HVAC SSM : Fuel fired heater insufficient for heating requirements, run continues assuming it was sufficient.", AdvancedAuxiliaryMessageType.Warning) + Dim FuelFiredWarning As Boolean = fba * GenInputs.BC_AuxHeaterEfficiency * HVACConstants.FuelDensity * GenInputs.BC_GCVDieselOrHeatingOil * 1000 > (AverageUseableEngineWasteHeatKW + GenInputs.AH_FuelFiredHeaterkW) - End If + If Not FuelFiredHeaterInsufficientWarned AndAlso FuelFiredWarning Then + FuelFiredHeaterInsufficientWarned = True - - Return fba + OnMessage(Me, " HVAC SSM : Fuel fired heater insufficient for heating requirements, run continues assuming it was sufficient.", AdvancedAuxiliaryMessageType.Warning) End If + Return fba + End Function 'Events diff --git a/VECTOAux/VectoAuxiliaries/Hvac/TechListBenefitLine.vb b/VECTOAux/VectoAuxiliaries/Hvac/TechListBenefitLine.vb index 0f0a8a0db2563aa6dece606938ca395d582a4374..71ad863a17d2e12d94b42798f7f9a703b1c2c9f4 100644 --- a/VECTOAux/VectoAuxiliaries/Hvac/TechListBenefitLine.vb +++ b/VECTOAux/VectoAuxiliaries/Hvac/TechListBenefitLine.vb @@ -1,334 +1,327 @@  Namespace Hvac -Public Enum TechLineType + Public Enum TechLineType - Normal - DriverACMechanical - DriverACElectrical - HVCActiveSelection + Normal + DriverACMechanical + DriverACElectrical + HVCActiveSelection -End Enum + End Enum -Public Enum PowerType + Public Enum PowerType - Mechanical - Electrical + Mechanical + Electrical -End Enum + End Enum -'Used by SSMTOOL Class, refer to original spreadsheet model -'Or PDF Model Document which articulates the same spreadsheet functionality -'But within the context of the Vecto interpretation of the same. -Public Class TechListBenefitLine - Implements ITechListBenefitLine + 'Used by SSMTOOL Class, refer to original spreadsheet model + 'Or PDF Model Document which articulates the same spreadsheet functionality + 'But within the context of the Vecto interpretation of the same. + Public Class TechListBenefitLine + Implements ITechListBenefitLine + Private _h, _vh, _vv, _vc, _c As Single + Public inputSheet As ISSMGenInputs -Private _h,_vh,_vv,_vc,_c As Single -Public inputSheet As ISSMGenInputs + Public Property Units As String Implements ITechListBenefitLine.Units + Public Property Category As String Implements ITechListBenefitLine.Category + Public Property BenefitName As String Implements ITechListBenefitLine.BenefitName + Public Property LowFloorH As New Double Implements ITechListBenefitLine.LowFloorH + Public Property LowFloorV As New Double Implements ITechListBenefitLine.LowFloorV + Public Property LowFloorC As New Double Implements ITechListBenefitLine.LowFloorC -Public Property Units As string Implements ITechListBenefitLine.Units -Public Property Category As String Implements ITechListBenefitLine.Category -Public Property BenefitName As String Implements ITechListBenefitLine.BenefitName -Public Property LowFloorH As new Double Implements ITechListBenefitLine.LowFloorH -Public Property LowFloorV As new Double Implements ITechListBenefitLine.LowFloorV -Public Property LowFloorC As new Double Implements ITechListBenefitLine.LowFloorC + Public Property SemiLowFloorH As New Double Implements ITechListBenefitLine.SemiLowFloorH + Public Property SemiLowFloorV As New Double Implements ITechListBenefitLine.SemiLowFloorV + Public Property SemiLowFloorC As New Double Implements ITechListBenefitLine.SemiLowFloorC -Public Property SemiLowFloorH As New Double Implements ITechListBenefitLine.SemiLowFloorH -Public Property SemiLowFloorV As New Double Implements ITechListBenefitLine.SemiLowFloorV -Public Property SemiLowFloorC As New Double Implements ITechListBenefitLine.SemiLowFloorC + Public Property RaisedFloorH As New Double Implements ITechListBenefitLine.RaisedFloorH + Public Property RaisedFloorV As New Double Implements ITechListBenefitLine.RaisedFloorV + Public Property RaisedFloorC As New Double Implements ITechListBenefitLine.RaisedFloorC -Public Property RaisedFloorH As New Double Implements ITechListBenefitLine.RaisedFloorH -Public Property RaisedFloorV As New Double Implements ITechListBenefitLine.RaisedFloorV -Public Property RaisedFloorC As New Double Implements ITechListBenefitLine.RaisedFloorC + Public Property OnVehicle As Boolean Implements ITechListBenefitLine.OnVehicle + Public Property ActiveVH As Boolean Implements ITechListBenefitLine.ActiveVH + Public Property ActiveVV As Boolean Implements ITechListBenefitLine.ActiveVV + Public Property ActiveVC As Boolean Implements ITechListBenefitLine.ActiveVC + Public Property LineType As TechLineType Implements ITechListBenefitLine.LineType + Public ReadOnly Property H As Single Implements ITechListBenefitLine.H + Get -Public Property OnVehicle As Boolean Implements ITechListBenefitLine.OnVehicle -Public Property ActiveVH As Boolean Implements ITechListBenefitLine.ActiveVH -Public Property ActiveVV As Boolean Implements ITechListBenefitLine.ActiveVV -Public Property ActiveVC As Boolean Implements ITechListBenefitLine.ActiveVC -Public Property LineType As TechLineType Implements ITechListBenefitLine.LineType + Dim returnValue As Single = 0 + '=IF($M49=0,0,IF(AND($M49=1,'INPUT & RESULTS SHEET'!$D$6="low floor"),'TECH LIST INPUT'!D49, IF(AND($M49=1,'INPUT & RESULTS SHEET'!$D$6="semi low floor"),'TECH LIST INPUT'!G49,'TECH LIST INPUT'!J49))) + If Not OnVehicle Then Return returnValue -Public ReadOnly Property H As Single Implements ITechListBenefitLine.H - Get + Select Case inputSheet.BP_BusFloorType + Case "low floor" + returnValue = LowFloorH + Case "semi low floor" + returnValue = SemiLowFloorH + Case "raised floor" + returnValue = RaisedFloorH + End Select - Dim returnValue As Single =0 + Return returnValue - '=IF($M49=0,0,IF(AND($M49=1,'INPUT & RESULTS SHEET'!$D$6="low floor"),'TECH LIST INPUT'!D49, IF(AND($M49=1,'INPUT & RESULTS SHEET'!$D$6="semi low floor"),'TECH LIST INPUT'!G49,'TECH LIST INPUT'!J49))) - If Not OnVehicle then return returnValue + End Get + End Property + Public ReadOnly Property VH As Single Implements ITechListBenefitLine.VH + Get - Select Case inputSheet.BP_BusFloorType - Case "low floor" - returnValue = LowFloorH - Case "semi low floor" - returnValue= SemiLowFloorH - Case "raised floor" - returnValue= RaisedFloorH - End Select + Dim floorValue As Single = 0 - Return returnValue + If Not OnVehicle Then Return floorValue - End Get -End Property -Public ReadOnly Property VH As Single Implements ITechListBenefitLine.VH - Get + 'Get floor value + Select Case inputSheet.BP_BusFloorType + Case "low floor" + floorValue = LowFloorV + Case "semi low floor" + floorValue = SemiLowFloorV + Case "raised floor" + floorValue = RaisedFloorV + End Select - Dim floorValue As Single =0 - If Not OnVehicle then Return floorValue + 'Active + If TechLineType.HVCActiveSelection AndAlso ActiveVH Then + Return floorValue + Else + Return 0 + End If - 'Get floor value - Select Case inputSheet.BP_BusFloorType - Case "low floor" - floorValue = LowFloorV - Case "semi low floor" - floorValue= SemiLowFloorV - Case "raised floor" - floorValue= RaisedFloorV - End Select + End Get - 'Active - If TechLineType.HVCActiveSelection AndAlso ActiveVH then - Return floorValue - else - Return 0 - End if + End Property + Public ReadOnly Property VV As Single Implements ITechListBenefitLine.VV + Get + Dim floorValue As Single = 0 - End Get + If Not OnVehicle Then Return floorValue + + 'Get floor value + Select Case inputSheet.BP_BusFloorType + Case "low floor" + floorValue = LowFloorV + Case "semi low floor" + floorValue = SemiLowFloorV + Case "raised floor" + floorValue = RaisedFloorV + End Select + + + 'Active + If TechLineType.HVCActiveSelection AndAlso ActiveVV Then + Return floorValue + Else + Return 0 + End If + + End Get + End Property + Public ReadOnly Property VC As Single Implements ITechListBenefitLine.VC + Get + + Dim floorValue As Single = 0 + + If Not OnVehicle Then Return floorValue + + 'Get floor value + Select Case inputSheet.BP_BusFloorType + Case "low floor" + floorValue = LowFloorV + Case "semi low floor" + floorValue = SemiLowFloorV + Case "raised floor" + floorValue = RaisedFloorV + End Select + + + 'Active + If TechLineType.HVCActiveSelection AndAlso ActiveVC Then + Return floorValue + Else + Return 0 + End If + + End Get + End Property + Public ReadOnly Property C As Single Implements ITechListBenefitLine.C + Get + + Dim returnValue As Single = 0 + + + + If Not OnVehicle Then Return returnValue + + Select Case inputSheet.BP_BusFloorType + Case "low floor" + returnValue = LowFloorC + Case "semi low floor" + returnValue = SemiLowFloorC + Case "raised floor" + returnValue = RaisedFloorC + End Select + + Return returnValue + + End Get + End Property + + Sub New() + + End Sub + + Sub New(geninputs As ISSMGenInputs) + + Me.inputSheet = geninputs + + End Sub + + Sub New(geninputs As ISSMGenInputs, + units As String, + category As String, + benefitName As String, + lowFloorH As Double, + lowFloorV As Double, + lowFloorC As Double, + semiLowFloorH As Double, + semiLowFloorV As Double, + semiLowFloorC As Double, + raisedFloorH As Double, + raisedFloorV As Double, + raisedFloorC As Double, + onVehicle As Boolean, + lineType As TechLineType, + activeVH As Boolean, + activeVV As Boolean, + activeVC As Boolean + ) + + Me.inputSheet = geninputs + Me.Units = Units + Me.category = category + Me.benefitName = benefitName + Me.lowFloorH = lowFloorH + Me.lowFloorV = lowFloorV + Me.lowFloorC = lowFloorC + Me.semiLowFloorH = semiLowFloorH + Me.semiLowFloorV = semiLowFloorV + Me.semiLowFloorC = semiLowFloorC + Me.raisedFloorH = raisedFloorH + Me.raisedFloorV = raisedFloorV + Me.raisedFloorC = raisedFloorC + Me.OnVehicle = onVehicle + Me.lineType = lineType + Me.ActiveVH = activeVH + Me.ActiveVV = activeVV + Me.ActiveVC = activeVC -End Property -Public ReadOnly Property VV As Single Implements ITechListBenefitLine.VV - Get - Dim floorValue As Single =0 + End Sub - If Not OnVehicle then Return floorValue + 'Operator Overloads + Public Shared Operator =(ByVal op1 As TechListBenefitLine, ByVal op2 As TechListBenefitLine) As Boolean - 'Get floor value - Select Case inputSheet.BP_BusFloorType - Case "low floor" - floorValue = LowFloorV - Case "semi low floor" - floorValue= SemiLowFloorV - Case "raised floor" - floorValue= RaisedFloorV - End Select - - - 'Active - If TechLineType.HVCActiveSelection AndAlso ActiveVV then - Return floorValue - else - Return 0 - End if - - End Get -End Property -Public ReadOnly Property VC As Single Implements ITechListBenefitLine.VC - Get - - Dim floorValue As Single =0 - - If Not OnVehicle then Return floorValue - - 'Get floor value - Select Case inputSheet.BP_BusFloorType - Case "low floor" - floorValue = LowFloorV - Case "semi low floor" - floorValue= SemiLowFloorV - Case "raised floor" - floorValue= RaisedFloorV - End Select - - - 'Active - If TechLineType.HVCActiveSelection AndAlso ActiveVC then - Return floorValue - else - Return 0 - End if - - End Get -End Property -Public ReadOnly Property C As Single Implements ITechListBenefitLine.C - Get - - Dim returnValue As Single =0 - - - - If Not OnVehicle then return returnValue - - Select Case inputSheet.BP_BusFloorType - Case "low floor" - returnValue = LowFloorC - Case "semi low floor" - returnValue= SemiLowFloorC - Case "raised floor" - returnValue= RaisedFloorC - End Select - - Return returnValue - - End Get -End Property - - -Sub new() - -End Sub - -Sub new ( geninputs As ISSMGenInputs ) - - Me.inputSheet = geninputs - -End Sub - -Sub new ( geninputs As ISSMGenInputs, - units As string, - category As String, - benefitName As String, - lowFloorH As double, - lowFloorV As double, - lowFloorC As double, - semiLowFloorH As Double, - semiLowFloorV As Double, - semiLowFloorC As Double, - raisedFloorH As Double, - raisedFloorV As Double, - raisedFloorC As Double, - onVehicle As Boolean, - lineType As TechLineType, - activeVH As Boolean, - activeVV As Boolean, - activeVC As Boolean - ) - - Me.inputSheet = geninputs - Me.Units = Units - Me.category = category - Me.benefitName = benefitName - Me.lowFloorH = lowFloorH - Me.lowFloorV = lowFloorV - Me.lowFloorC = lowFloorC - Me.semiLowFloorH = semiLowFloorH - Me.semiLowFloorV = semiLowFloorV - Me.semiLowFloorC = semiLowFloorC - Me.raisedFloorH = raisedFloorH - Me.raisedFloorV = raisedFloorV - Me.raisedFloorC = raisedFloorC - Me.OnVehicle = onVehicle - Me.lineType = lineType - Me.ActiveVH = activeVH - Me.ActiveVV = activeVV - Me.ActiveVC = activeVC - - -End Sub - -'Operator Overloads - Public Shared Operator = (ByVal op1 as TechListBenefitLine, ByVal op2 as TechListBenefitLine) As Boolean - - If ( op1.Category = op2.Category AndAlso _ - op1.BenefitName = op2.BenefitName AndAlso _ - op1.ActiveVC = op2.ActiveVC AndAlso _ - op1.ActiveVH = op2.ActiveVH AndAlso _ - op1.ActiveVV = op2.ActiveVV AndAlso _ - op1.LineType = op2.LineType AndAlso _ - op1.LowFloorC = op2.LowFloorC AndAlso _ - op1.LowFloorV = op2.LowFloorV AndAlso _ - op1.LowFloorH = op2.LowFloorH AndAlso _ - op1.SemiLowFloorC = op2.SemiLowFloorC AndAlso _ - op1.SemiLowFloorH = op2.SemiLowFloorH AndAlso _ - op1.SemiLowFloorV = op2.SemiLowFloorV AndAlso _ - op1.RaisedFloorC = op2.RaisedFloorC AndAlso _ - op1.RaisedFloorH = op2.RaisedFloorH AndAlso _ - op1.RaisedFloorV = op2.RaisedFloorV AndAlso _ - op1.OnVehicle = op2.OnVehicle AndAlso _ - op1.Units = op2.Units ) then - - Return True - - Else - - Return False - - End If - - -End Operator - Public Shared Operator <> (ByVal op1 as TechListBenefitLine, ByVal op2 as TechListBenefitLine) As Boolean - - If ( op1.Category <> op2.Category OrElse _ - op1.BenefitName <> op2.BenefitName OrElse _ - op1.ActiveVC <> op2.ActiveVC OrElse _ - op1.ActiveVH <> op2.ActiveVH OrElse _ - op1.ActiveVV <> op2.ActiveVV OrElse _ - op1.LineType <> op2.LineType OrElse _ - op1.LowFloorC <> op2.LowFloorC OrElse _ - op1.LowFloorV <> op2.LowFloorV OrElse _ - op1.LowFloorH <> op2.LowFloorH OrElse _ - op1.SemiLowFloorC <> op2.SemiLowFloorC OrElse _ - op1.SemiLowFloorH <> op2.SemiLowFloorH OrElse _ - op1.SemiLowFloorV <> op2.SemiLowFloorV OrElse _ - op1.RaisedFloorC <> op2.RaisedFloorC OrElse _ - op1.RaisedFloorH <> op2.RaisedFloorH OrElse _ - op1.RaisedFloorV <> op2.RaisedFloorV OrElse _ - op1.OnVehicle <> op2.OnVehicle OrElse _ - op1.Units <> op2.Units ) then - - Return True - - Else - - Return False - - End If - - -End Operator - - - Public Sub CloneFrom(source As ITechListBenefitLine) Implements ITechListBenefitLine.CloneFrom - - - Me.Units = source.Units - Me.Category = source.Category - Me.BenefitName = source.BenefitName - Me.LowFloorH = source.LowFloorH - Me.LowFloorV = source.LowFloorV - Me.LowFloorC = source.LowFloorC - - Me.SemiLowFloorH = source.SemiLowFloorH - Me.SemiLowFloorV = source.SemiLowFloorV - Me.SemiLowFloorC = source.SemiLowFloorC - - Me.RaisedFloorH = source.RaisedFloorH - Me.RaisedFloorV = source.RaisedFloorV - Me.RaisedFloorC = source.RaisedFloorC - - Me.OnVehicle = source.OnVehicle - Me.ActiveVH = source.ActiveVH - Me.ActiveVV = source.ActiveVV - Me.ActiveVC = source.ActiveVC - Me.LineType = source.LineType - - - End Sub - Public Function IsEqualTo(source As ITechListBenefitLine) As boolean Implements ITechListBenefitLine.IsEqualTo + If (op1.Category = op2.Category AndAlso _ + op1.BenefitName = op2.BenefitName AndAlso _ + op1.ActiveVC = op2.ActiveVC AndAlso _ + op1.ActiveVH = op2.ActiveVH AndAlso _ + op1.ActiveVV = op2.ActiveVV AndAlso _ + op1.LineType = op2.LineType AndAlso _ + op1.LowFloorC = op2.LowFloorC AndAlso _ + op1.LowFloorV = op2.LowFloorV AndAlso _ + op1.LowFloorH = op2.LowFloorH AndAlso _ + op1.SemiLowFloorC = op2.SemiLowFloorC AndAlso _ + op1.SemiLowFloorH = op2.SemiLowFloorH AndAlso _ + op1.SemiLowFloorV = op2.SemiLowFloorV AndAlso _ + op1.RaisedFloorC = op2.RaisedFloorC AndAlso _ + op1.RaisedFloorH = op2.RaisedFloorH AndAlso _ + op1.RaisedFloorV = op2.RaisedFloorV AndAlso _ + op1.OnVehicle = op2.OnVehicle AndAlso _ + op1.Units = op2.Units) Then - Return If(Me=source,True,False) - + Return True - End Function + Else + Return False + End If -End Class + + End Operator + Public Shared Operator <>(ByVal op1 As TechListBenefitLine, ByVal op2 As TechListBenefitLine) As Boolean + + If (op1.Category <> op2.Category OrElse _ + op1.BenefitName <> op2.BenefitName OrElse _ + op1.ActiveVC <> op2.ActiveVC OrElse _ + op1.ActiveVH <> op2.ActiveVH OrElse _ + op1.ActiveVV <> op2.ActiveVV OrElse _ + op1.LineType <> op2.LineType OrElse _ + op1.LowFloorC <> op2.LowFloorC OrElse _ + op1.LowFloorV <> op2.LowFloorV OrElse _ + op1.LowFloorH <> op2.LowFloorH OrElse _ + op1.SemiLowFloorC <> op2.SemiLowFloorC OrElse _ + op1.SemiLowFloorH <> op2.SemiLowFloorH OrElse _ + op1.SemiLowFloorV <> op2.SemiLowFloorV OrElse _ + op1.RaisedFloorC <> op2.RaisedFloorC OrElse _ + op1.RaisedFloorH <> op2.RaisedFloorH OrElse _ + op1.RaisedFloorV <> op2.RaisedFloorV OrElse _ + op1.OnVehicle <> op2.OnVehicle OrElse _ + op1.Units <> op2.Units) Then + + Return True + + Else + + Return False + + End If + + + End Operator + + Public Sub CloneFrom(source As ITechListBenefitLine) Implements ITechListBenefitLine.CloneFrom + + + Me.Units = source.Units + Me.Category = source.Category + Me.BenefitName = source.BenefitName + Me.LowFloorH = source.LowFloorH + Me.LowFloorV = source.LowFloorV + Me.LowFloorC = source.LowFloorC + + Me.SemiLowFloorH = source.SemiLowFloorH + Me.SemiLowFloorV = source.SemiLowFloorV + Me.SemiLowFloorC = source.SemiLowFloorC + + Me.RaisedFloorH = source.RaisedFloorH + Me.RaisedFloorV = source.RaisedFloorV + Me.RaisedFloorC = source.RaisedFloorC + + Me.OnVehicle = source.OnVehicle + Me.ActiveVH = source.ActiveVH + Me.ActiveVV = source.ActiveVV + Me.ActiveVC = source.ActiveVC + Me.LineType = source.LineType + + + End Sub + Public Function IsEqualTo(source As ITechListBenefitLine) As Boolean Implements ITechListBenefitLine.IsEqualTo + + Return If(Me = source, True, False) + + + End Function + + End Class End Namespace diff --git a/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.vb b/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.vb index 24bcccf2cbbf9ecec428689ec3736f202fa0218f..e6e21d82dca87b7040f1d3727ed1532e39ad9ede 100644 --- a/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.vb +++ b/VECTOAux/VectoAuxiliaries/UI/frmAuxiliaryConfig.vb @@ -475,7 +475,7 @@ Public Class frmAuxiliaryConfig Try Dim ahsmFile As String = FilePathUtils.ResolveFilePath(vectoPath, txtSSMFilePath.Text) - Dim ssmTool As SSMTOOL = New SSMTOOL(ahsmFile, False) + Dim ssmTool As SSMTOOL = New SSMTOOL(ahsmFile, New HVACConstants, False) If ssmTool.Load(ahsmFile) Then ErrorProvider.SetError(txtSSMFilePath, String.Empty) @@ -1095,7 +1095,7 @@ Public Class frmAuxiliaryConfig 'is file valid Try ahsm - HVac Steady State Model Try Dim ahsmFile As String = FilePathUtils.ResolveFilePath(vectoPath, absoluteSSMPath) - Dim ssmTool As SSMTOOL = New SSMTOOL(ahsmFile, False) + Dim ssmTool As SSMTOOL = New SSMTOOL(ahsmFile, New HVACConstants, False) ssmTool.Load(ahsmFile) Catch ex As Exception MessageBox.Show("The supplied AHSM File was invalid, aborting.") diff --git a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.Designer.vb b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.Designer.vb index ce90b73de3dfcc60b5a2d26d02006bdc38159b95..2c496f621c952896f596814b70402461417b0755 100644 --- a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.Designer.vb +++ b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.Designer.vb @@ -83,6 +83,8 @@ Partial Class frmHVACTool Me.cboBuses = New System.Windows.Forms.ComboBox() Me.tabGeneralInputsBC = New System.Windows.Forms.TabPage() Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.txtBC_TemperatureCoolingOff = New System.Windows.Forms.TextBox() + Me.Label5 = New System.Windows.Forms.Label() Me.lblUnitsBC_MaxPossibleBenefitFromTechnologyList = New System.Windows.Forms.Label() Me.txtBC_MaxPossibleBenefitFromTechnologyList = New System.Windows.Forms.TextBox() Me.lblBC_MaxPossibleBenefitFromTechnologyList = New System.Windows.Forms.Label() @@ -95,17 +97,12 @@ Partial Class frmHVACTool Me.lblUnitsBC_WindowAreaPerUnitBusLength = New System.Windows.Forms.Label() Me.txtBC_WindowAreaPerUnitBusLength = New System.Windows.Forms.TextBox() Me.lblBC_WindowAreaPerUnitBusLength = New System.Windows.Forms.Label() - Me.lblUnitsBC_VolumicMassDieselOrHeatingOil = New System.Windows.Forms.Label() - Me.txtBC_VolumicMassDieselOrHeatingOil = New System.Windows.Forms.TextBox() - Me.lblBC_VolumicMassDieselOrHeatingOil = New System.Windows.Forms.Label() Me.lblUnitsBC_GCVDieselOrHeatingOil = New System.Windows.Forms.Label() Me.txtBC_GCVDieselOrHeatingOil = New System.Windows.Forms.TextBox() Me.lblBC_GCVDieselOrHeatingOil = New System.Windows.Forms.Label() Me.txtBC_AuxHeaterEfficiency = New System.Windows.Forms.TextBox() Me.lblBC_AuxHeaterEfficiency = New System.Windows.Forms.Label() Me.lblUnitsBC_COP = New System.Windows.Forms.Label() - Me.txtBC_COP = New System.Windows.Forms.TextBox() - Me.lblBC_COP = New System.Windows.Forms.Label() Me.lblUnitsBC_SpecificVentilationPower = New System.Windows.Forms.Label() Me.txtBC_SpecificVentilationPower = New System.Windows.Forms.TextBox() Me.lvlBC_SpecificVentilationPower = New System.Windows.Forms.Label() @@ -189,9 +186,9 @@ Partial Class frmHVACTool Me.lblchkVEN_VentilationDuringAC = New System.Windows.Forms.Label() Me.lblchkVEN_VentilationWhenBothHeatingAndACInactive = New System.Windows.Forms.Label() Me.grpACSystem = New System.Windows.Forms.GroupBox() + Me.txtAC_COP = New System.Windows.Forms.TextBox() + Me.lblBC_COP = New System.Windows.Forms.Label() Me.cboAC_CompressorType = New System.Windows.Forms.ComboBox() - Me.chkAC_InCabinRoomAC_System = New System.Windows.Forms.CheckBox() - Me.lblChkAC_InCabinRoomAC_System = New System.Windows.Forms.Label() Me.txtAC_CompressorCapacitykW = New System.Windows.Forms.TextBox() Me.lbltxtAC_CompressorCapacitykW = New System.Windows.Forms.Label() Me.lblUnitstxtAC_CompressorCapacitykW = New System.Windows.Forms.Label() @@ -250,6 +247,9 @@ Partial Class frmHVACTool Me.CMFiles = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.OpenWithToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ShowInFolderToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.Label6 = New System.Windows.Forms.Label() + Me.txtAC_CompressorType = New System.Windows.Forms.TextBox() + Me.Label24 = New System.Windows.Forms.Label() Me.tabMain.SuspendLayout() Me.tabGeneralInputsBP.SuspendLayout() Me.BusParamGroupEdit.SuspendLayout() @@ -921,6 +921,9 @@ Partial Class frmHVACTool 'GroupBox2 ' Me.GroupBox2.BackColor = System.Drawing.Color.Transparent + Me.GroupBox2.Controls.Add(Me.Label24) + Me.GroupBox2.Controls.Add(Me.txtBC_TemperatureCoolingOff) + Me.GroupBox2.Controls.Add(Me.Label5) Me.GroupBox2.Controls.Add(Me.lblUnitsBC_MaxPossibleBenefitFromTechnologyList) Me.GroupBox2.Controls.Add(Me.txtBC_MaxPossibleBenefitFromTechnologyList) Me.GroupBox2.Controls.Add(Me.lblBC_MaxPossibleBenefitFromTechnologyList) @@ -933,17 +936,12 @@ Partial Class frmHVACTool Me.GroupBox2.Controls.Add(Me.lblUnitsBC_WindowAreaPerUnitBusLength) Me.GroupBox2.Controls.Add(Me.txtBC_WindowAreaPerUnitBusLength) Me.GroupBox2.Controls.Add(Me.lblBC_WindowAreaPerUnitBusLength) - Me.GroupBox2.Controls.Add(Me.lblUnitsBC_VolumicMassDieselOrHeatingOil) - Me.GroupBox2.Controls.Add(Me.txtBC_VolumicMassDieselOrHeatingOil) - Me.GroupBox2.Controls.Add(Me.lblBC_VolumicMassDieselOrHeatingOil) Me.GroupBox2.Controls.Add(Me.lblUnitsBC_GCVDieselOrHeatingOil) Me.GroupBox2.Controls.Add(Me.txtBC_GCVDieselOrHeatingOil) Me.GroupBox2.Controls.Add(Me.lblBC_GCVDieselOrHeatingOil) Me.GroupBox2.Controls.Add(Me.txtBC_AuxHeaterEfficiency) Me.GroupBox2.Controls.Add(Me.lblBC_AuxHeaterEfficiency) Me.GroupBox2.Controls.Add(Me.lblUnitsBC_COP) - Me.GroupBox2.Controls.Add(Me.txtBC_COP) - Me.GroupBox2.Controls.Add(Me.lblBC_COP) Me.GroupBox2.Controls.Add(Me.lblUnitsBC_SpecificVentilationPower) Me.GroupBox2.Controls.Add(Me.txtBC_SpecificVentilationPower) Me.GroupBox2.Controls.Add(Me.lvlBC_SpecificVentilationPower) @@ -1000,16 +998,36 @@ Partial Class frmHVACTool Me.GroupBox2.ForeColor = System.Drawing.SystemColors.MenuHighlight Me.GroupBox2.Location = New System.Drawing.Point(34, 47) Me.GroupBox2.Name = "GroupBox2" - Me.GroupBox2.Size = New System.Drawing.Size(890, 534) + Me.GroupBox2.Size = New System.Drawing.Size(890, 548) Me.GroupBox2.TabIndex = 27 Me.GroupBox2.TabStop = False Me.GroupBox2.Text = "Boundary Conditions" ' + 'txtBC_TemperatureCoolingOff + ' + Me.txtBC_TemperatureCoolingOff.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) + Me.txtBC_TemperatureCoolingOff.Location = New System.Drawing.Point(218, 343) + Me.txtBC_TemperatureCoolingOff.Name = "txtBC_TemperatureCoolingOff" + Me.txtBC_TemperatureCoolingOff.ReadOnly = True + Me.txtBC_TemperatureCoolingOff.Size = New System.Drawing.Size(97, 21) + Me.txtBC_TemperatureCoolingOff.TabIndex = 77 + ' + 'Label5 + ' + Me.Label5.AutoSize = True + Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) + Me.Label5.ForeColor = System.Drawing.Color.Black + Me.Label5.Location = New System.Drawing.Point(14, 349) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(167, 15) + Me.Label5.TabIndex = 76 + Me.Label5.Text = "Temperature cooling turns off" + ' 'lblUnitsBC_MaxPossibleBenefitFromTechnologyList ' Me.lblUnitsBC_MaxPossibleBenefitFromTechnologyList.AutoSize = True Me.lblUnitsBC_MaxPossibleBenefitFromTechnologyList.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_MaxPossibleBenefitFromTechnologyList.Location = New System.Drawing.Point(783, 264) + Me.lblUnitsBC_MaxPossibleBenefitFromTechnologyList.Location = New System.Drawing.Point(783, 208) Me.lblUnitsBC_MaxPossibleBenefitFromTechnologyList.Name = "lblUnitsBC_MaxPossibleBenefitFromTechnologyList" Me.lblUnitsBC_MaxPossibleBenefitFromTechnologyList.Size = New System.Drawing.Size(51, 15) Me.lblUnitsBC_MaxPossibleBenefitFromTechnologyList.TabIndex = 75 @@ -1019,7 +1037,7 @@ Partial Class frmHVACTool 'txtBC_MaxPossibleBenefitFromTechnologyList ' Me.txtBC_MaxPossibleBenefitFromTechnologyList.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_MaxPossibleBenefitFromTechnologyList.Location = New System.Drawing.Point(655, 261) + Me.txtBC_MaxPossibleBenefitFromTechnologyList.Location = New System.Drawing.Point(655, 205) Me.txtBC_MaxPossibleBenefitFromTechnologyList.Name = "txtBC_MaxPossibleBenefitFromTechnologyList" Me.txtBC_MaxPossibleBenefitFromTechnologyList.Size = New System.Drawing.Size(97, 21) Me.txtBC_MaxPossibleBenefitFromTechnologyList.TabIndex = 74 @@ -1029,7 +1047,7 @@ Partial Class frmHVACTool Me.lblBC_MaxPossibleBenefitFromTechnologyList.AutoSize = True Me.lblBC_MaxPossibleBenefitFromTechnologyList.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_MaxPossibleBenefitFromTechnologyList.ForeColor = System.Drawing.Color.Black - Me.lblBC_MaxPossibleBenefitFromTechnologyList.Location = New System.Drawing.Point(448, 264) + Me.lblBC_MaxPossibleBenefitFromTechnologyList.Location = New System.Drawing.Point(448, 208) Me.lblBC_MaxPossibleBenefitFromTechnologyList.Name = "lblBC_MaxPossibleBenefitFromTechnologyList" Me.lblBC_MaxPossibleBenefitFromTechnologyList.Size = New System.Drawing.Size(159, 15) Me.lblBC_MaxPossibleBenefitFromTechnologyList.TabIndex = 73 @@ -1039,7 +1057,7 @@ Partial Class frmHVACTool ' Me.lblUnitsBC_MaxTemperatureDeltaForLowFloorBusses.AutoSize = True Me.lblUnitsBC_MaxTemperatureDeltaForLowFloorBusses.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_MaxTemperatureDeltaForLowFloorBusses.Location = New System.Drawing.Point(783, 235) + Me.lblUnitsBC_MaxTemperatureDeltaForLowFloorBusses.Location = New System.Drawing.Point(783, 179) Me.lblUnitsBC_MaxTemperatureDeltaForLowFloorBusses.Name = "lblUnitsBC_MaxTemperatureDeltaForLowFloorBusses" Me.lblUnitsBC_MaxTemperatureDeltaForLowFloorBusses.Size = New System.Drawing.Size(15, 15) Me.lblUnitsBC_MaxTemperatureDeltaForLowFloorBusses.TabIndex = 72 @@ -1049,7 +1067,7 @@ Partial Class frmHVACTool 'txtBC_MaxTemperatureDeltaForLowFloorBusses ' Me.txtBC_MaxTemperatureDeltaForLowFloorBusses.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_MaxTemperatureDeltaForLowFloorBusses.Location = New System.Drawing.Point(655, 232) + Me.txtBC_MaxTemperatureDeltaForLowFloorBusses.Location = New System.Drawing.Point(655, 176) Me.txtBC_MaxTemperatureDeltaForLowFloorBusses.Name = "txtBC_MaxTemperatureDeltaForLowFloorBusses" Me.txtBC_MaxTemperatureDeltaForLowFloorBusses.Size = New System.Drawing.Size(97, 21) Me.txtBC_MaxTemperatureDeltaForLowFloorBusses.TabIndex = 71 @@ -1059,7 +1077,7 @@ Partial Class frmHVACTool Me.lblBC_MaxTemperatureDeltaForLowFloorBusses.AutoSize = True Me.lblBC_MaxTemperatureDeltaForLowFloorBusses.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_MaxTemperatureDeltaForLowFloorBusses.ForeColor = System.Drawing.Color.Black - Me.lblBC_MaxTemperatureDeltaForLowFloorBusses.Location = New System.Drawing.Point(448, 235) + Me.lblBC_MaxTemperatureDeltaForLowFloorBusses.Location = New System.Drawing.Point(448, 179) Me.lblBC_MaxTemperatureDeltaForLowFloorBusses.Name = "lblBC_MaxTemperatureDeltaForLowFloorBusses" Me.lblBC_MaxTemperatureDeltaForLowFloorBusses.Size = New System.Drawing.Size(205, 15) Me.lblBC_MaxTemperatureDeltaForLowFloorBusses.TabIndex = 70 @@ -1069,7 +1087,7 @@ Partial Class frmHVACTool ' Me.lblUnitsBC_FrontRearWindowArea.AutoSize = True Me.lblUnitsBC_FrontRearWindowArea.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_FrontRearWindowArea.Location = New System.Drawing.Point(783, 208) + Me.lblUnitsBC_FrontRearWindowArea.Location = New System.Drawing.Point(783, 152) Me.lblUnitsBC_FrontRearWindowArea.Name = "lblUnitsBC_FrontRearWindowArea" Me.lblUnitsBC_FrontRearWindowArea.Size = New System.Drawing.Size(31, 15) Me.lblUnitsBC_FrontRearWindowArea.TabIndex = 69 @@ -1079,7 +1097,7 @@ Partial Class frmHVACTool 'txtBC_FrontRearWindowArea ' Me.txtBC_FrontRearWindowArea.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_FrontRearWindowArea.Location = New System.Drawing.Point(655, 205) + Me.txtBC_FrontRearWindowArea.Location = New System.Drawing.Point(655, 149) Me.txtBC_FrontRearWindowArea.Name = "txtBC_FrontRearWindowArea" Me.txtBC_FrontRearWindowArea.ReadOnly = True Me.txtBC_FrontRearWindowArea.Size = New System.Drawing.Size(97, 21) @@ -1090,7 +1108,7 @@ Partial Class frmHVACTool Me.lblBC_FrontRearWindowArea.AutoSize = True Me.lblBC_FrontRearWindowArea.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_FrontRearWindowArea.ForeColor = System.Drawing.Color.Black - Me.lblBC_FrontRearWindowArea.Location = New System.Drawing.Point(448, 208) + Me.lblBC_FrontRearWindowArea.Location = New System.Drawing.Point(448, 152) Me.lblBC_FrontRearWindowArea.Name = "lblBC_FrontRearWindowArea" Me.lblBC_FrontRearWindowArea.Size = New System.Drawing.Size(140, 15) Me.lblBC_FrontRearWindowArea.TabIndex = 67 @@ -1100,7 +1118,7 @@ Partial Class frmHVACTool ' Me.lblUnitsBC_WindowAreaPerUnitBusLength.AutoSize = True Me.lblUnitsBC_WindowAreaPerUnitBusLength.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_WindowAreaPerUnitBusLength.Location = New System.Drawing.Point(783, 179) + Me.lblUnitsBC_WindowAreaPerUnitBusLength.Location = New System.Drawing.Point(783, 123) Me.lblUnitsBC_WindowAreaPerUnitBusLength.Name = "lblUnitsBC_WindowAreaPerUnitBusLength" Me.lblUnitsBC_WindowAreaPerUnitBusLength.Size = New System.Drawing.Size(38, 15) Me.lblUnitsBC_WindowAreaPerUnitBusLength.TabIndex = 66 @@ -1110,7 +1128,7 @@ Partial Class frmHVACTool 'txtBC_WindowAreaPerUnitBusLength ' Me.txtBC_WindowAreaPerUnitBusLength.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_WindowAreaPerUnitBusLength.Location = New System.Drawing.Point(655, 176) + Me.txtBC_WindowAreaPerUnitBusLength.Location = New System.Drawing.Point(655, 120) Me.txtBC_WindowAreaPerUnitBusLength.Name = "txtBC_WindowAreaPerUnitBusLength" Me.txtBC_WindowAreaPerUnitBusLength.ReadOnly = True Me.txtBC_WindowAreaPerUnitBusLength.Size = New System.Drawing.Size(97, 21) @@ -1121,47 +1139,17 @@ Partial Class frmHVACTool Me.lblBC_WindowAreaPerUnitBusLength.AutoSize = True Me.lblBC_WindowAreaPerUnitBusLength.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_WindowAreaPerUnitBusLength.ForeColor = System.Drawing.Color.Black - Me.lblBC_WindowAreaPerUnitBusLength.Location = New System.Drawing.Point(448, 179) + Me.lblBC_WindowAreaPerUnitBusLength.Location = New System.Drawing.Point(448, 123) Me.lblBC_WindowAreaPerUnitBusLength.Name = "lblBC_WindowAreaPerUnitBusLength" Me.lblBC_WindowAreaPerUnitBusLength.Size = New System.Drawing.Size(188, 15) Me.lblBC_WindowAreaPerUnitBusLength.TabIndex = 64 Me.lblBC_WindowAreaPerUnitBusLength.Text = "WindowArea Per Unit Bus Length" ' - 'lblUnitsBC_VolumicMassDieselOrHeatingOil - ' - Me.lblUnitsBC_VolumicMassDieselOrHeatingOil.AutoSize = True - Me.lblUnitsBC_VolumicMassDieselOrHeatingOil.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_VolumicMassDieselOrHeatingOil.Location = New System.Drawing.Point(783, 151) - Me.lblUnitsBC_VolumicMassDieselOrHeatingOil.Name = "lblUnitsBC_VolumicMassDieselOrHeatingOil" - Me.lblUnitsBC_VolumicMassDieselOrHeatingOil.Size = New System.Drawing.Size(28, 15) - Me.lblUnitsBC_VolumicMassDieselOrHeatingOil.TabIndex = 63 - Me.lblUnitsBC_VolumicMassDieselOrHeatingOil.Text = "Kg/l" - Me.ToolTip1.SetToolTip(Me.lblUnitsBC_VolumicMassDieselOrHeatingOil, "Kg/Litre") - ' - 'txtBC_VolumicMassDieselOrHeatingOil - ' - Me.txtBC_VolumicMassDieselOrHeatingOil.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_VolumicMassDieselOrHeatingOil.Location = New System.Drawing.Point(655, 148) - Me.txtBC_VolumicMassDieselOrHeatingOil.Name = "txtBC_VolumicMassDieselOrHeatingOil" - Me.txtBC_VolumicMassDieselOrHeatingOil.Size = New System.Drawing.Size(97, 21) - Me.txtBC_VolumicMassDieselOrHeatingOil.TabIndex = 62 - ' - 'lblBC_VolumicMassDieselOrHeatingOil - ' - Me.lblBC_VolumicMassDieselOrHeatingOil.AutoSize = True - Me.lblBC_VolumicMassDieselOrHeatingOil.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.lblBC_VolumicMassDieselOrHeatingOil.ForeColor = System.Drawing.Color.Black - Me.lblBC_VolumicMassDieselOrHeatingOil.Location = New System.Drawing.Point(448, 151) - Me.lblBC_VolumicMassDieselOrHeatingOil.Name = "lblBC_VolumicMassDieselOrHeatingOil" - Me.lblBC_VolumicMassDieselOrHeatingOil.Size = New System.Drawing.Size(202, 15) - Me.lblBC_VolumicMassDieselOrHeatingOil.TabIndex = 61 - Me.lblBC_VolumicMassDieselOrHeatingOil.Text = "Volumic Mass Diesel Or Heating Oil" - ' 'lblUnitsBC_GCVDieselOrHeatingOil ' Me.lblUnitsBC_GCVDieselOrHeatingOil.AutoSize = True Me.lblUnitsBC_GCVDieselOrHeatingOil.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_GCVDieselOrHeatingOil.Location = New System.Drawing.Point(783, 123) + Me.lblUnitsBC_GCVDieselOrHeatingOil.Location = New System.Drawing.Point(783, 95) Me.lblUnitsBC_GCVDieselOrHeatingOil.Name = "lblUnitsBC_GCVDieselOrHeatingOil" Me.lblUnitsBC_GCVDieselOrHeatingOil.Size = New System.Drawing.Size(50, 15) Me.lblUnitsBC_GCVDieselOrHeatingOil.TabIndex = 60 @@ -1171,7 +1159,7 @@ Partial Class frmHVACTool 'txtBC_GCVDieselOrHeatingOil ' Me.txtBC_GCVDieselOrHeatingOil.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_GCVDieselOrHeatingOil.Location = New System.Drawing.Point(655, 120) + Me.txtBC_GCVDieselOrHeatingOil.Location = New System.Drawing.Point(655, 92) Me.txtBC_GCVDieselOrHeatingOil.Name = "txtBC_GCVDieselOrHeatingOil" Me.txtBC_GCVDieselOrHeatingOil.Size = New System.Drawing.Size(97, 21) Me.txtBC_GCVDieselOrHeatingOil.TabIndex = 59 @@ -1181,7 +1169,7 @@ Partial Class frmHVACTool Me.lblBC_GCVDieselOrHeatingOil.AutoSize = True Me.lblBC_GCVDieselOrHeatingOil.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_GCVDieselOrHeatingOil.ForeColor = System.Drawing.Color.Black - Me.lblBC_GCVDieselOrHeatingOil.Location = New System.Drawing.Point(448, 123) + Me.lblBC_GCVDieselOrHeatingOil.Location = New System.Drawing.Point(448, 95) Me.lblBC_GCVDieselOrHeatingOil.Name = "lblBC_GCVDieselOrHeatingOil" Me.lblBC_GCVDieselOrHeatingOil.Size = New System.Drawing.Size(149, 15) Me.lblBC_GCVDieselOrHeatingOil.TabIndex = 58 @@ -1190,7 +1178,7 @@ Partial Class frmHVACTool 'txtBC_AuxHeaterEfficiency ' Me.txtBC_AuxHeaterEfficiency.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_AuxHeaterEfficiency.Location = New System.Drawing.Point(655, 90) + Me.txtBC_AuxHeaterEfficiency.Location = New System.Drawing.Point(655, 62) Me.txtBC_AuxHeaterEfficiency.Name = "txtBC_AuxHeaterEfficiency" Me.txtBC_AuxHeaterEfficiency.Size = New System.Drawing.Size(97, 21) Me.txtBC_AuxHeaterEfficiency.TabIndex = 57 @@ -1200,7 +1188,7 @@ Partial Class frmHVACTool Me.lblBC_AuxHeaterEfficiency.AutoSize = True Me.lblBC_AuxHeaterEfficiency.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_AuxHeaterEfficiency.ForeColor = System.Drawing.Color.Black - Me.lblBC_AuxHeaterEfficiency.Location = New System.Drawing.Point(448, 93) + Me.lblBC_AuxHeaterEfficiency.Location = New System.Drawing.Point(448, 65) Me.lblBC_AuxHeaterEfficiency.Name = "lblBC_AuxHeaterEfficiency" Me.lblBC_AuxHeaterEfficiency.Size = New System.Drawing.Size(121, 15) Me.lblBC_AuxHeaterEfficiency.TabIndex = 56 @@ -1215,25 +1203,6 @@ Partial Class frmHVACTool Me.lblUnitsBC_COP.Size = New System.Drawing.Size(0, 15) Me.lblUnitsBC_COP.TabIndex = 55 ' - 'txtBC_COP - ' - Me.txtBC_COP.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_COP.Location = New System.Drawing.Point(655, 62) - Me.txtBC_COP.Name = "txtBC_COP" - Me.txtBC_COP.Size = New System.Drawing.Size(97, 21) - Me.txtBC_COP.TabIndex = 54 - ' - 'lblBC_COP - ' - Me.lblBC_COP.AutoSize = True - Me.lblBC_COP.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.lblBC_COP.ForeColor = System.Drawing.Color.Black - Me.lblBC_COP.Location = New System.Drawing.Point(448, 65) - Me.lblBC_COP.Name = "lblBC_COP" - Me.lblBC_COP.Size = New System.Drawing.Size(32, 15) - Me.lblBC_COP.TabIndex = 53 - Me.lblBC_COP.Text = "COP" - ' 'lblUnitsBC_SpecificVentilationPower ' Me.lblUnitsBC_SpecificVentilationPower.AutoSize = True @@ -1268,7 +1237,7 @@ Partial Class frmHVACTool ' Me.lblUnitsBC_LowVentPowerW.AutoSize = True Me.lblUnitsBC_LowVentPowerW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_LowVentPowerW.Location = New System.Drawing.Point(349, 487) + Me.lblUnitsBC_LowVentPowerW.Location = New System.Drawing.Point(349, 519) Me.lblUnitsBC_LowVentPowerW.Name = "lblUnitsBC_LowVentPowerW" Me.lblUnitsBC_LowVentPowerW.Size = New System.Drawing.Size(18, 15) Me.lblUnitsBC_LowVentPowerW.TabIndex = 49 @@ -1278,7 +1247,7 @@ Partial Class frmHVACTool 'txtBC_LowVentPowerW ' Me.txtBC_LowVentPowerW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_LowVentPowerW.Location = New System.Drawing.Point(218, 484) + Me.txtBC_LowVentPowerW.Location = New System.Drawing.Point(218, 516) Me.txtBC_LowVentPowerW.Name = "txtBC_LowVentPowerW" Me.txtBC_LowVentPowerW.ReadOnly = True Me.txtBC_LowVentPowerW.Size = New System.Drawing.Size(97, 21) @@ -1289,7 +1258,7 @@ Partial Class frmHVACTool Me.lblBC_LowVentPowerW.AutoSize = True Me.lblBC_LowVentPowerW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_LowVentPowerW.ForeColor = System.Drawing.Color.Black - Me.lblBC_LowVentPowerW.Location = New System.Drawing.Point(14, 487) + Me.lblBC_LowVentPowerW.Location = New System.Drawing.Point(14, 519) Me.lblBC_LowVentPowerW.Name = "lblBC_LowVentPowerW" Me.lblBC_LowVentPowerW.Size = New System.Drawing.Size(95, 15) Me.lblBC_LowVentPowerW.TabIndex = 47 @@ -1299,7 +1268,7 @@ Partial Class frmHVACTool ' Me.lblUnitsBC_HighVentPowerW.AutoSize = True Me.lblUnitsBC_HighVentPowerW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_HighVentPowerW.Location = New System.Drawing.Point(349, 459) + Me.lblUnitsBC_HighVentPowerW.Location = New System.Drawing.Point(349, 491) Me.lblUnitsBC_HighVentPowerW.Name = "lblUnitsBC_HighVentPowerW" Me.lblUnitsBC_HighVentPowerW.Size = New System.Drawing.Size(18, 15) Me.lblUnitsBC_HighVentPowerW.TabIndex = 46 @@ -1309,7 +1278,7 @@ Partial Class frmHVACTool 'txtBC_HighVentPowerW ' Me.txtBC_HighVentPowerW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_HighVentPowerW.Location = New System.Drawing.Point(218, 456) + Me.txtBC_HighVentPowerW.Location = New System.Drawing.Point(218, 488) Me.txtBC_HighVentPowerW.Name = "txtBC_HighVentPowerW" Me.txtBC_HighVentPowerW.ReadOnly = True Me.txtBC_HighVentPowerW.Size = New System.Drawing.Size(97, 21) @@ -1320,7 +1289,7 @@ Partial Class frmHVACTool Me.lblBC_HighVentPowerW.AutoSize = True Me.lblBC_HighVentPowerW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_HighVentPowerW.ForeColor = System.Drawing.Color.Black - Me.lblBC_HighVentPowerW.Location = New System.Drawing.Point(14, 459) + Me.lblBC_HighVentPowerW.Location = New System.Drawing.Point(14, 491) Me.lblBC_HighVentPowerW.Name = "lblBC_HighVentPowerW" Me.lblBC_HighVentPowerW.Size = New System.Drawing.Size(98, 15) Me.lblBC_HighVentPowerW.TabIndex = 44 @@ -1330,7 +1299,7 @@ Partial Class frmHVACTool ' Me.lblUnitsBC_Low.AutoSize = True Me.lblUnitsBC_Low.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_Low.Location = New System.Drawing.Point(349, 430) + Me.lblUnitsBC_Low.Location = New System.Drawing.Point(349, 462) Me.lblUnitsBC_Low.Name = "lblUnitsBC_Low" Me.lblUnitsBC_Low.Size = New System.Drawing.Size(43, 15) Me.lblUnitsBC_Low.TabIndex = 43 @@ -1340,7 +1309,7 @@ Partial Class frmHVACTool 'txtBC_Low ' Me.txtBC_Low.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_Low.Location = New System.Drawing.Point(218, 427) + Me.txtBC_Low.Location = New System.Drawing.Point(218, 459) Me.txtBC_Low.Name = "txtBC_Low" Me.txtBC_Low.ReadOnly = True Me.txtBC_Low.Size = New System.Drawing.Size(97, 21) @@ -1351,7 +1320,7 @@ Partial Class frmHVACTool Me.lblBC_Low.AutoSize = True Me.lblBC_Low.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_Low.ForeColor = System.Drawing.Color.Black - Me.lblBC_Low.Location = New System.Drawing.Point(14, 430) + Me.lblBC_Low.Location = New System.Drawing.Point(14, 462) Me.lblBC_Low.Name = "lblBC_Low" Me.lblBC_Low.Size = New System.Drawing.Size(30, 15) Me.lblBC_Low.TabIndex = 41 @@ -1361,7 +1330,7 @@ Partial Class frmHVACTool ' Me.lblUnitsBC_High.AutoSize = True Me.lblUnitsBC_High.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_High.Location = New System.Drawing.Point(349, 401) + Me.lblUnitsBC_High.Location = New System.Drawing.Point(349, 433) Me.lblUnitsBC_High.Name = "lblUnitsBC_High" Me.lblUnitsBC_High.Size = New System.Drawing.Size(43, 15) Me.lblUnitsBC_High.TabIndex = 40 @@ -1371,7 +1340,7 @@ Partial Class frmHVACTool 'txtBC_High ' Me.txtBC_High.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_High.Location = New System.Drawing.Point(218, 398) + Me.txtBC_High.Location = New System.Drawing.Point(218, 430) Me.txtBC_High.Name = "txtBC_High" Me.txtBC_High.ReadOnly = True Me.txtBC_High.Size = New System.Drawing.Size(97, 21) @@ -1382,7 +1351,7 @@ Partial Class frmHVACTool Me.lblBC_High.AutoSize = True Me.lblBC_High.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_High.ForeColor = System.Drawing.Color.Black - Me.lblBC_High.Location = New System.Drawing.Point(14, 401) + Me.lblBC_High.Location = New System.Drawing.Point(14, 433) Me.lblBC_High.Name = "lblBC_High" Me.lblBC_High.Size = New System.Drawing.Size(33, 15) Me.lblBC_High.TabIndex = 38 @@ -1392,7 +1361,7 @@ Partial Class frmHVACTool ' Me.lblUnitsBC_lowVentilation.AutoSize = True Me.lblUnitsBC_lowVentilation.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_lowVentilation.Location = New System.Drawing.Point(349, 373) + Me.lblUnitsBC_lowVentilation.Location = New System.Drawing.Point(349, 405) Me.lblUnitsBC_lowVentilation.Name = "lblUnitsBC_lowVentilation" Me.lblUnitsBC_lowVentilation.Size = New System.Drawing.Size(22, 15) Me.lblUnitsBC_lowVentilation.TabIndex = 37 @@ -1402,7 +1371,7 @@ Partial Class frmHVACTool 'txtBC_lowVentilation ' Me.txtBC_lowVentilation.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_lowVentilation.Location = New System.Drawing.Point(218, 370) + Me.txtBC_lowVentilation.Location = New System.Drawing.Point(218, 402) Me.txtBC_lowVentilation.Name = "txtBC_lowVentilation" Me.txtBC_lowVentilation.Size = New System.Drawing.Size(97, 21) Me.txtBC_lowVentilation.TabIndex = 36 @@ -1412,7 +1381,7 @@ Partial Class frmHVACTool Me.lblBC_lowVentilation.AutoSize = True Me.lblBC_lowVentilation.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_lowVentilation.ForeColor = System.Drawing.Color.Black - Me.lblBC_lowVentilation.Location = New System.Drawing.Point(14, 373) + Me.lblBC_lowVentilation.Location = New System.Drawing.Point(14, 405) Me.lblBC_lowVentilation.Name = "lblBC_lowVentilation" Me.lblBC_lowVentilation.Size = New System.Drawing.Size(90, 15) Me.lblBC_lowVentilation.TabIndex = 35 @@ -1422,7 +1391,7 @@ Partial Class frmHVACTool ' Me.lblUnitsBC_HighVentilation.AutoSize = True Me.lblUnitsBC_HighVentilation.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitsBC_HighVentilation.Location = New System.Drawing.Point(349, 346) + Me.lblUnitsBC_HighVentilation.Location = New System.Drawing.Point(349, 378) Me.lblUnitsBC_HighVentilation.Name = "lblUnitsBC_HighVentilation" Me.lblUnitsBC_HighVentilation.Size = New System.Drawing.Size(22, 15) Me.lblUnitsBC_HighVentilation.TabIndex = 34 @@ -1432,7 +1401,7 @@ Partial Class frmHVACTool 'txtBC_HighVentilation ' Me.txtBC_HighVentilation.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_HighVentilation.Location = New System.Drawing.Point(218, 343) + Me.txtBC_HighVentilation.Location = New System.Drawing.Point(218, 375) Me.txtBC_HighVentilation.Name = "txtBC_HighVentilation" Me.txtBC_HighVentilation.Size = New System.Drawing.Size(97, 21) Me.txtBC_HighVentilation.TabIndex = 33 @@ -1442,7 +1411,7 @@ Partial Class frmHVACTool Me.lblBC_HighVentilation.AutoSize = True Me.lblBC_HighVentilation.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblBC_HighVentilation.ForeColor = System.Drawing.Color.Black - Me.lblBC_HighVentilation.Location = New System.Drawing.Point(14, 346) + Me.lblBC_HighVentilation.Location = New System.Drawing.Point(14, 378) Me.lblBC_HighVentilation.Name = "lblBC_HighVentilation" Me.lblBC_HighVentilation.Size = New System.Drawing.Size(93, 15) Me.lblBC_HighVentilation.TabIndex = 32 @@ -1511,7 +1480,7 @@ Partial Class frmHVACTool 'txtBC_GFactor ' Me.txtBC_GFactor.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtBC_GFactor.Location = New System.Drawing.Point(220, 30) + Me.txtBC_GFactor.Location = New System.Drawing.Point(218, 30) Me.txtBC_GFactor.Name = "txtBC_GFactor" Me.txtBC_GFactor.Size = New System.Drawing.Size(97, 21) Me.txtBC_GFactor.TabIndex = 25 @@ -1636,6 +1605,7 @@ Partial Class frmHVACTool Me.txtBC_PassengerDensityRaisedFloor.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.txtBC_PassengerDensityRaisedFloor.Location = New System.Drawing.Point(218, 202) Me.txtBC_PassengerDensityRaisedFloor.Name = "txtBC_PassengerDensityRaisedFloor" + Me.txtBC_PassengerDensityRaisedFloor.ReadOnly = True Me.txtBC_PassengerDensityRaisedFloor.Size = New System.Drawing.Size(97, 21) Me.txtBC_PassengerDensityRaisedFloor.TabIndex = 13 ' @@ -1677,6 +1647,7 @@ Partial Class frmHVACTool Me.txtBC_PassengerDensitySemiLowFloor.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.txtBC_PassengerDensitySemiLowFloor.Location = New System.Drawing.Point(218, 173) Me.txtBC_PassengerDensitySemiLowFloor.Name = "txtBC_PassengerDensitySemiLowFloor" + Me.txtBC_PassengerDensitySemiLowFloor.ReadOnly = True Me.txtBC_PassengerDensitySemiLowFloor.Size = New System.Drawing.Size(97, 21) Me.txtBC_PassengerDensitySemiLowFloor.TabIndex = 9 ' @@ -1696,6 +1667,7 @@ Partial Class frmHVACTool Me.txtBC_PassengerDensityLowFloor.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.txtBC_PassengerDensityLowFloor.Location = New System.Drawing.Point(218, 145) Me.txtBC_PassengerDensityLowFloor.Name = "txtBC_PassengerDensityLowFloor" + Me.txtBC_PassengerDensityLowFloor.ReadOnly = True Me.txtBC_PassengerDensityLowFloor.Size = New System.Drawing.Size(97, 21) Me.txtBC_PassengerDensityLowFloor.TabIndex = 7 ' @@ -1968,7 +1940,7 @@ Partial Class frmHVACTool Me.grpVentilation.FlatStyle = System.Windows.Forms.FlatStyle.Popup Me.grpVentilation.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!) Me.grpVentilation.ForeColor = System.Drawing.SystemColors.MenuHighlight - Me.grpVentilation.Location = New System.Drawing.Point(34, 350) + Me.grpVentilation.Location = New System.Drawing.Point(34, 369) Me.grpVentilation.Name = "grpVentilation" Me.grpVentilation.Size = New System.Drawing.Size(409, 216) Me.grpVentilation.TabIndex = 31 @@ -2102,9 +2074,11 @@ Partial Class frmHVACTool 'grpACSystem ' Me.grpACSystem.BackColor = System.Drawing.Color.Transparent + Me.grpACSystem.Controls.Add(Me.txtAC_CompressorType) + Me.grpACSystem.Controls.Add(Me.Label6) + Me.grpACSystem.Controls.Add(Me.txtAC_COP) + Me.grpACSystem.Controls.Add(Me.lblBC_COP) Me.grpACSystem.Controls.Add(Me.cboAC_CompressorType) - Me.grpACSystem.Controls.Add(Me.chkAC_InCabinRoomAC_System) - Me.grpACSystem.Controls.Add(Me.lblChkAC_InCabinRoomAC_System) Me.grpACSystem.Controls.Add(Me.txtAC_CompressorCapacitykW) Me.grpACSystem.Controls.Add(Me.lbltxtAC_CompressorCapacitykW) Me.grpACSystem.Controls.Add(Me.lblUnitstxtAC_CompressorCapacitykW) @@ -2114,47 +2088,47 @@ Partial Class frmHVACTool Me.grpACSystem.ForeColor = System.Drawing.SystemColors.MenuHighlight Me.grpACSystem.Location = New System.Drawing.Point(34, 209) Me.grpACSystem.Name = "grpACSystem" - Me.grpACSystem.Size = New System.Drawing.Size(409, 135) + Me.grpACSystem.Size = New System.Drawing.Size(409, 154) Me.grpACSystem.TabIndex = 30 Me.grpACSystem.TabStop = False Me.grpACSystem.Text = "AC-System" ' + 'txtAC_COP + ' + Me.txtAC_COP.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) + Me.txtAC_COP.Location = New System.Drawing.Point(215, 123) + Me.txtAC_COP.Name = "txtAC_COP" + Me.txtAC_COP.ReadOnly = True + Me.txtAC_COP.Size = New System.Drawing.Size(101, 21) + Me.txtAC_COP.TabIndex = 56 + ' + 'lblBC_COP + ' + Me.lblBC_COP.AutoSize = True + Me.lblBC_COP.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) + Me.lblBC_COP.ForeColor = System.Drawing.Color.Black + Me.lblBC_COP.Location = New System.Drawing.Point(13, 126) + Me.lblBC_COP.Name = "lblBC_COP" + Me.lblBC_COP.Size = New System.Drawing.Size(32, 15) + Me.lblBC_COP.TabIndex = 55 + Me.lblBC_COP.Text = "COP" + ' 'cboAC_CompressorType ' + Me.cboAC_CompressorType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cboAC_CompressorType.FormattingEnabled = True - Me.cboAC_CompressorType.Items.AddRange(New Object() {"Mechanical", "Electrical"}) - Me.cboAC_CompressorType.Location = New System.Drawing.Point(217, 62) + Me.cboAC_CompressorType.Items.AddRange(New Object() {"2-Stage", "3-Stage", "4-Stage", "Continuous"}) + Me.cboAC_CompressorType.Location = New System.Drawing.Point(215, 27) Me.cboAC_CompressorType.Name = "cboAC_CompressorType" Me.cboAC_CompressorType.Size = New System.Drawing.Size(100, 24) Me.cboAC_CompressorType.TabIndex = 26 ' - 'chkAC_InCabinRoomAC_System - ' - Me.chkAC_InCabinRoomAC_System.AutoSize = True - Me.chkAC_InCabinRoomAC_System.Location = New System.Drawing.Point(220, 33) - Me.chkAC_InCabinRoomAC_System.Name = "chkAC_InCabinRoomAC_System" - Me.chkAC_InCabinRoomAC_System.Size = New System.Drawing.Size(31, 21) - Me.chkAC_InCabinRoomAC_System.TabIndex = 25 - Me.chkAC_InCabinRoomAC_System.Text = " " - Me.chkAC_InCabinRoomAC_System.UseVisualStyleBackColor = True - ' - 'lblChkAC_InCabinRoomAC_System - ' - Me.lblChkAC_InCabinRoomAC_System.AutoSize = True - Me.lblChkAC_InCabinRoomAC_System.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.lblChkAC_InCabinRoomAC_System.ForeColor = System.Drawing.Color.Black - Me.lblChkAC_InCabinRoomAC_System.Location = New System.Drawing.Point(14, 33) - Me.lblChkAC_InCabinRoomAC_System.Name = "lblChkAC_InCabinRoomAC_System" - Me.lblChkAC_InCabinRoomAC_System.Size = New System.Drawing.Size(154, 15) - Me.lblChkAC_InCabinRoomAC_System.TabIndex = 24 - Me.lblChkAC_InCabinRoomAC_System.Text = "In Cabin Room AC_System" - ' 'txtAC_CompressorCapacitykW ' Me.txtAC_CompressorCapacitykW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) - Me.txtAC_CompressorCapacitykW.Location = New System.Drawing.Point(218, 92) + Me.txtAC_CompressorCapacitykW.Location = New System.Drawing.Point(215, 91) Me.txtAC_CompressorCapacitykW.Name = "txtAC_CompressorCapacitykW" - Me.txtAC_CompressorCapacitykW.Size = New System.Drawing.Size(99, 21) + Me.txtAC_CompressorCapacitykW.Size = New System.Drawing.Size(101, 21) Me.txtAC_CompressorCapacitykW.TabIndex = 23 ' 'lbltxtAC_CompressorCapacitykW @@ -2162,7 +2136,7 @@ Partial Class frmHVACTool Me.lbltxtAC_CompressorCapacitykW.AutoSize = True Me.lbltxtAC_CompressorCapacitykW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lbltxtAC_CompressorCapacitykW.ForeColor = System.Drawing.Color.Black - Me.lbltxtAC_CompressorCapacitykW.Location = New System.Drawing.Point(14, 91) + Me.lbltxtAC_CompressorCapacitykW.Location = New System.Drawing.Point(13, 91) Me.lbltxtAC_CompressorCapacitykW.Name = "lbltxtAC_CompressorCapacitykW" Me.lbltxtAC_CompressorCapacitykW.Size = New System.Drawing.Size(140, 15) Me.lbltxtAC_CompressorCapacitykW.TabIndex = 22 @@ -2172,7 +2146,7 @@ Partial Class frmHVACTool ' Me.lblUnitstxtAC_CompressorCapacitykW.AutoSize = True Me.lblUnitstxtAC_CompressorCapacitykW.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblUnitstxtAC_CompressorCapacitykW.Location = New System.Drawing.Point(352, 99) + Me.lblUnitstxtAC_CompressorCapacitykW.Location = New System.Drawing.Point(347, 94) Me.lblUnitstxtAC_CompressorCapacitykW.Name = "lblUnitstxtAC_CompressorCapacitykW" Me.lblUnitstxtAC_CompressorCapacitykW.Size = New System.Drawing.Size(24, 15) Me.lblUnitstxtAC_CompressorCapacitykW.TabIndex = 16 @@ -2184,11 +2158,11 @@ Partial Class frmHVACTool Me.lblcboAC_CompressorType.AutoSize = True Me.lblcboAC_CompressorType.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.lblcboAC_CompressorType.ForeColor = System.Drawing.Color.Black - Me.lblcboAC_CompressorType.Location = New System.Drawing.Point(14, 62) + Me.lblcboAC_CompressorType.Location = New System.Drawing.Point(13, 62) Me.lblcboAC_CompressorType.Name = "lblcboAC_CompressorType" - Me.lblcboAC_CompressorType.Size = New System.Drawing.Size(122, 15) + Me.lblcboAC_CompressorType.Size = New System.Drawing.Size(175, 15) Me.lblcboAC_CompressorType.TabIndex = 0 - Me.lblcboAC_CompressorType.Text = "AC-Compressor Type" + Me.lblcboAC_CompressorType.Text = "AC-Compressor Type (Derived)" ' 'tabTechBenefits ' @@ -2675,6 +2649,37 @@ Partial Class frmHVACTool Me.ShowInFolderToolStripMenuItem.Size = New System.Drawing.Size(176, 22) Me.ShowInFolderToolStripMenuItem.Text = "Open in Folder" ' + 'Label6 + ' + Me.Label6.AutoSize = True + Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) + Me.Label6.ForeColor = System.Drawing.Color.Black + Me.Label6.Location = New System.Drawing.Point(13, 30) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(122, 15) + Me.Label6.TabIndex = 57 + Me.Label6.Text = "AC-Compressor Type" + ' + 'txtAC_CompressorType + ' + Me.txtAC_CompressorType.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) + Me.txtAC_CompressorType.Location = New System.Drawing.Point(214, 59) + Me.txtAC_CompressorType.Name = "txtAC_CompressorType" + Me.txtAC_CompressorType.ReadOnly = True + Me.txtAC_CompressorType.Size = New System.Drawing.Size(101, 21) + Me.txtAC_CompressorType.TabIndex = 58 + ' + 'Label24 + ' + Me.Label24.AutoSize = True + Me.Label24.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label24.Location = New System.Drawing.Point(349, 349) + Me.Label24.Name = "Label24" + Me.Label24.Size = New System.Drawing.Size(22, 15) + Me.Label24.TabIndex = 78 + Me.Label24.Text = "oC" + Me.ToolTip1.SetToolTip(Me.Label24, "Degrees Centigrade") + ' 'frmHVACTool ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -2697,7 +2702,7 @@ Partial Class frmHVACTool Me.MaximizeBox = False Me.Name = "frmHVACTool" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent - Me.Text = "SSM HVAC Model V01 ( Excel Model V04 )" + Me.Text = "SSM HVAC Model V01 ( Excel Model V07 )" Me.tabMain.ResumeLayout(False) Me.tabGeneralInputsBP.ResumeLayout(False) Me.BusParamGroupEdit.ResumeLayout(False) @@ -2730,9 +2735,9 @@ Partial Class frmHVACTool CType(Me.ErrorProvider1, System.ComponentModel.ISupportInitialize).EndInit() Me.CMFiles.ResumeLayout(False) Me.ResumeLayout(False) - Me.PerformLayout + Me.PerformLayout() -End Sub + End Sub Friend WithEvents tabMain As System.Windows.Forms.TabControl Friend WithEvents tabGeneralInputsBP As System.Windows.Forms.TabPage Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip @@ -2790,17 +2795,12 @@ End Sub Friend WithEvents lblUnitsBC_High As System.Windows.Forms.Label Friend WithEvents txtBC_High As System.Windows.Forms.TextBox Friend WithEvents lblBC_High As System.Windows.Forms.Label - Friend WithEvents lblUnitsBC_VolumicMassDieselOrHeatingOil As System.Windows.Forms.Label - Friend WithEvents txtBC_VolumicMassDieselOrHeatingOil As System.Windows.Forms.TextBox - Friend WithEvents lblBC_VolumicMassDieselOrHeatingOil As System.Windows.Forms.Label Friend WithEvents lblUnitsBC_GCVDieselOrHeatingOil As System.Windows.Forms.Label Friend WithEvents txtBC_GCVDieselOrHeatingOil As System.Windows.Forms.TextBox Friend WithEvents lblBC_GCVDieselOrHeatingOil As System.Windows.Forms.Label Friend WithEvents txtBC_AuxHeaterEfficiency As System.Windows.Forms.TextBox Friend WithEvents lblBC_AuxHeaterEfficiency As System.Windows.Forms.Label Friend WithEvents lblUnitsBC_COP As System.Windows.Forms.Label - Friend WithEvents txtBC_COP As System.Windows.Forms.TextBox - Friend WithEvents lblBC_COP As System.Windows.Forms.Label Friend WithEvents lblUnitsBC_MaxPossibleBenefitFromTechnologyList As System.Windows.Forms.Label Friend WithEvents txtBC_MaxPossibleBenefitFromTechnologyList As System.Windows.Forms.TextBox Friend WithEvents lblBC_MaxPossibleBenefitFromTechnologyList As System.Windows.Forms.Label @@ -2832,8 +2832,6 @@ End Sub Friend WithEvents lblchkVEN_VentilationWhenBothHeatingAndACInactive As System.Windows.Forms.Label Friend WithEvents grpACSystem As System.Windows.Forms.GroupBox Friend WithEvents cboAC_CompressorType As System.Windows.Forms.ComboBox - Friend WithEvents chkAC_InCabinRoomAC_System As System.Windows.Forms.CheckBox - Friend WithEvents lblChkAC_InCabinRoomAC_System As System.Windows.Forms.Label Friend WithEvents txtAC_CompressorCapacitykW As System.Windows.Forms.TextBox Friend WithEvents lbltxtAC_CompressorCapacitykW As System.Windows.Forms.Label Friend WithEvents lblUnitstxtAC_CompressorCapacitykW As System.Windows.Forms.Label @@ -2959,4 +2957,11 @@ End Sub Friend WithEvents CMFiles As System.Windows.Forms.ContextMenuStrip Friend WithEvents OpenWithToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents ShowInFolderToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents txtBC_TemperatureCoolingOff As System.Windows.Forms.TextBox + Friend WithEvents Label5 As System.Windows.Forms.Label + Friend WithEvents txtAC_COP As System.Windows.Forms.TextBox + Friend WithEvents lblBC_COP As System.Windows.Forms.Label + Friend WithEvents txtAC_CompressorType As System.Windows.Forms.TextBox + Friend WithEvents Label6 As System.Windows.Forms.Label + Friend WithEvents Label24 As System.Windows.Forms.Label End Class diff --git a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.resx b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.resx index 5ac719b01a4db51f40b6007eb1e43ba7fcb909dc..2f5c2ad9f6afd9493c0982d43be5e45ef984bd6a 100644 --- a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.resx +++ b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.resx @@ -120,6 +120,9 @@ <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> + <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="btnOpenAenv.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> @@ -137,6 +140,9 @@ AElFTkSuQmCC </value> </data> + <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> <metadata name="ErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>116, 17</value> </metadata> @@ -149,4 +155,7 @@ <metadata name="CMFiles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>429, 17</value> </metadata> + <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.vb b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.vb index 87fe63ed57730c0095dde0ca6f938c250e88d2aa..ca25c9f8172641fa19b5abc8ed9b7e1836716264 100644 --- a/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.vb +++ b/VECTOAux/VectoAuxiliaries/UI/frmHVACTool.vb @@ -85,23 +85,21 @@ Public Class frmHVACTool vectoFile = vectoFilePath 'Add any initialization after the InitializeComponent() call. - - Me.busDatabasePath = busDatabasePath Me.ahsmFilePath = ahsmFilePath + ssmTOOL = New SSMTOOL(ahsmFilePath, New HVACConstants, False, useDefaults) + originalssmTOOL = New SSMTOOL(ahsmFilePath, New HVACConstants, False, useDefaults) - - ssmTOOL = New SSMTOOL(ahsmFilePath, useDefaults) - originalssmTOOL = New SSMTOOL(ahsmFilePath, useDefaults) - - If ssmTOOL.Load(ahsmFilePath) AndAlso originalssmTOOL.Load(ahsmFilePath) Then - Timer1.Enabled = True + If IO.File.Exists(ahsmFilePath) Then + If ssmTOOL.Load(ahsmFilePath) AndAlso originalssmTOOL.Load(ahsmFilePath) Then + Timer1.Enabled = True + Else + MessageBox.Show("The file format for the Steady State Model (.AHSM) was corrupted or is an alpha version. Please refer to the documentation or help to discover more.") + Timer1.Enabled = False + End If Else - - MessageBox.Show("The file format for the Steady State Model (.AHSM) was corrupted or is an alpha version. Please refer to the documentation or help to discover more.") - Timer1.Enabled = False - + Timer1.Enabled = True End If setupBuses() @@ -261,32 +259,31 @@ Public Class frmHVACTool txtBC_UValues.DataBindings.Add("Text", ssmTool.genInputs, "BC_UValues") txtBC_HeatingBoundaryTemperature.DataBindings.Add("Text", ssmTool.genInputs, "BC_HeatingBoundaryTemperature") txtBC_CoolingBoundaryTemperature.DataBindings.Add("Text", ssmTool.genInputs, "BC_CoolingBoundaryTemperature") - txtBC_HighVentilation.DataBindings.Add("Text", ssmTool.genInputs, "BC_HighVentilation") + txtBC_TemperatureCoolingOff.DataBindings.Add("Text", ssmTOOL.GenInputs, "BC_TemperatureCoolingTurnsOff") + txtBC_HighVentilation.DataBindings.Add("Text", ssmTOOL.GenInputs, "BC_HighVentilation") txtBC_lowVentilation.DataBindings.Add("Text", ssmTool.genInputs, "BC_lowVentilation") txtBC_High.DataBindings.Add("Text", ssmTool.genInputs, "BC_High") txtBC_Low.DataBindings.Add("Text", ssmTool.genInputs, "BC_Low") txtBC_HighVentPowerW.DataBindings.Add("Text", ssmTool.genInputs, "BC_HighVentPowerW") txtBC_LowVentPowerW.DataBindings.Add("Text", ssmTool.genInputs, "BC_LowVentPowerW") txtBC_SpecificVentilationPower.DataBindings.Add("Text", ssmTool.genInputs, "BC_SpecificVentilationPower") - txtBC_COP.DataBindings.Add("Text", ssmTool.genInputs, "BC_COP") txtBC_AuxHeaterEfficiency.DataBindings.Add("Text", ssmTool.genInputs, "BC_AuxHeaterEfficiency") txtBC_GCVDieselOrHeatingOil.DataBindings.Add("Text", ssmTool.genInputs, "BC_GCVDieselOrHeatingOil") - txtBC_VolumicMassDieselOrHeatingOil.DataBindings.Add("Text", ssmTool.genInputs, "BC_VolumicMassDieselOrHeatingOil") txtBC_WindowAreaPerUnitBusLength.DataBindings.Add("Text", ssmTool.genInputs, "BC_WindowAreaPerUnitBusLength") txtBC_FrontRearWindowArea.DataBindings.Add("Text", ssmTool.genInputs, "BC_FrontRearWindowArea") txtBC_MaxTemperatureDeltaForLowFloorBusses.DataBindings.Add("Text", ssmTool.genInputs, "BC_MaxTemperatureDeltaForLowFloorBusses") txtBC_MaxPossibleBenefitFromTechnologyList.DataBindings.Add("Text", ssmTOOL.GenInputs, "BC_MaxPossibleBenefitFromTechnologyList") - 'General Inputs Other 'EnviromentalConditions txtEC_EnviromentalTemperature.DataBindings.Add("Text", ssmTool.genInputs, "EC_EnviromentalTemperature") txtEC_Solar.DataBindings.Add("Text", ssmTOOL.GenInputs, "EC_Solar") chkEC_BatchMode.DataBindings.Add("Checked", ssmTOOL.GenInputs, "EC_EnviromentalConditions_BatchEnabled", False, DataSourceUpdateMode.OnPropertyChanged) 'AC-system - chkAC_InCabinRoomAC_System.DataBindings.Add("Checked", ssmTool.genInputs, "AC_InCabinRoomAC_System", False, DataSourceUpdateMode.OnPropertyChanged) - cboAC_CompressorType.DataBindings.Add("Text", ssmTool.genInputs, "AC_CompressorType", False, DataSourceUpdateMode.OnPropertyChanged) + cboAC_CompressorType.DataBindings.Add("Text", ssmTOOL.GenInputs, "AC_CompressorType", False, DataSourceUpdateMode.OnPropertyChanged) + txtAC_CompressorType.DataBindings.Add("Text", ssmTOOL.GenInputs, "AC_CompressorTypeDerived") txtAC_CompressorCapacitykW.DataBindings.Add("Text", ssmTool.genInputs, "AC_CompressorCapacitykW") + txtAC_COP.DataBindings.Add("Text", ssmTOOL.GenInputs, "AC_COP") 'Ventilation chkVEN_VentilationOnDuringHeating.DataBindings.Add("Checked", ssmTool.genInputs, "VEN_VentilationOnDuringHeating", False, DataSourceUpdateMode.OnPropertyChanged) @@ -345,7 +342,7 @@ Public Class frmHVACTool e.Cancel = Not Validate_GeneralInputsBP() End Sub - Public Sub Validating_GeneralInputsBC(sender As Object, e As CancelEventArgs) Handles txtBC_GFactor.Validating, txtBC_VolumicMassDieselOrHeatingOil.Validating, txtBC_SpecificVentilationPower.Validating, txtBC_PassengerDensitySemiLowFloor.Validating, txtBC_PassengerDensityRaisedFloor.Validating, txtBC_PassengerDensityLowFloor.Validating, txtBC_MaxTemperatureDeltaForLowFloorBusses.Validating, txtBC_MaxPossibleBenefitFromTechnologyList.Validating, txtBC_lowVentilation.Validating, txtBC_HighVentilation.Validating, txtBC_HeatingBoundaryTemperature.Validating, txtBC_GCVDieselOrHeatingOil.Validating, txtBC_COP.Validating, txtBC_CoolingBoundaryTemperature.Validating, txtBC_AuxHeaterEfficiency.Validating, txtBC_PassengerBoundaryTemperature.Validating + Public Sub Validating_GeneralInputsBC(sender As Object, e As CancelEventArgs) Handles txtBC_GFactor.Validating, txtBC_SpecificVentilationPower.Validating, txtBC_MaxTemperatureDeltaForLowFloorBusses.Validating, txtBC_MaxPossibleBenefitFromTechnologyList.Validating, txtBC_lowVentilation.Validating, txtBC_HighVentilation.Validating, txtBC_HeatingBoundaryTemperature.Validating, txtBC_GCVDieselOrHeatingOil.Validating, txtBC_CoolingBoundaryTemperature.Validating, txtBC_AuxHeaterEfficiency.Validating, txtBC_PassengerBoundaryTemperature.Validating e.Cancel = Not Validate_GeneralInputsBC() @@ -487,18 +484,15 @@ Public Class frmHVACTool 'txtBC_GFactor IsTextBoxNumber(txtBC_GFactor, "Please enter a number ( GFactor )", result) - 'BC_SolarClouding : Calculated - 'BC_HeatPerPassengerIntoCabinW : Calculated + 'BC_SolarClouding : Calculated + 'BC_HeatPerPassengerIntoCabinW : Calculated 'txtBC_PassengerBoundaryTemperature IsTextBoxNumber(txtBC_PassengerBoundaryTemperature, "Please enter a number ( Passenger Boundary Temperature )", result) - 'txtBC_PassengerDensityLowFloor - IsTextBoxNumber(txtBC_PassengerDensityLowFloor, "Please enter a number ( Passenger Density Low Floor )", result) - 'txtBC_PassengerDensitySemiLowFloor - IsTextBoxNumber(txtBC_PassengerDensitySemiLowFloor, "Please enter a number ( Passenger Density Semi Low Floor )", result) - 'txtBC_PassengerDensityRaisedFloor - IsTextBoxNumber(txtBC_PassengerDensityRaisedFloor, "Please enter a number ( Passenger Density Raised Floor )", result) - 'txtBC_CalculatedPassengerNumber : Calculated - 'txtBC_UValues : Calculated + 'txtBC_PassengerDensityLowFloor : Calculated + 'txtBC_PassengerDensitySemiLowFloor : Calculated + 'txtBC_PassengerDensityRaisedFloor : Calculated + 'txtBC_CalculatedPassengerNumber : Calculated + 'txtBC_UValues : Calculated 'txtBC_HeatingBoundaryTemperature IsTextBoxNumber(txtBC_HeatingBoundaryTemperature, "Please enter a number ( Heating Boundary Temperature )", result) 'txtBC_CoolingBoundaryTemperature @@ -514,13 +508,11 @@ Public Class frmHVACTool 'txtBC_SpecificVentilationPower IsTextBoxNumber(txtBC_SpecificVentilationPower, "Please enter a number ( Specific Ventilation Power )", result) 'txtBC_COP - IsTextBoxNumber(txtBC_COP, "Please enter a number ( COP )", result) + IsTextBoxNumber(txtAC_COP, "Please enter a number ( COP )", result) 'txtBC_AuxHeaterEfficiency IsTextBoxNumber(txtBC_AuxHeaterEfficiency, "Please enter a number ( Aux Heater Efficiency )", result) 'txtBC_GCVDieselOrHeatingOil IsTextBoxNumber(txtBC_GCVDieselOrHeatingOil, "Please enter a number ( GCV Diesel Or Heating Oil )", result) - 'txtBC_VolumicMassDieselOrHeatingOil - IsTextBoxNumber(txtBC_VolumicMassDieselOrHeatingOil, "Please enter a number ( Volumic Mass Diesel Or Heating Oil )", result) 'txtBC_WindowAreaPerUnitBusLength : Calculated 'txtBC_FrontRearWindowArea : Calculated 'txtBC_MaxTemperatureDeltaForLowFloorBusses @@ -1389,4 +1381,5 @@ Public Class frmHVACTool MsgBox("File not found!") End If End Sub + End Class diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_5_SmartAlternatorSetEfficiencyTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_5_SmartAlternatorSetEfficiencyTests.vb index ccd66ac7a67d5bfc13c12c1883608c610fcf3852..9cffaae25b8b3c8b3a42183ad91dda9c99a7caf3 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_5_SmartAlternatorSetEfficiencyTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_5_SmartAlternatorSetEfficiencyTests.vb @@ -24,7 +24,7 @@ Private Function GetSSM() As ISSMTOOL Const _SSMMAP As String = "TestFiles\ssm.Ahsm Const _BusDatabase As String ="TestFiles\BusDatabase.abdb - Dim ssm As ISSMTOOL = New SSMTOOL( _SSMMAP ) + Dim ssm As ISSMTOOL = New SSMTOOL(_SSMMAP, New HVACConstants()) ssm.Load( _SSMMAP) diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_NonSmart_AlternatorsSetEfficiencyTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_NonSmart_AlternatorsSetEfficiencyTests.vb index c6464d481e5a6fed78db67753bb0615eb76cb0ac..7d847c25a5cac367dc27e2dcd29468c0f9063ff8 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_NonSmart_AlternatorsSetEfficiencyTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M0_NonSmart_AlternatorsSetEfficiencyTests.vb @@ -29,7 +29,7 @@ Private Function GetSSM() As ISSMTOOL Const _SSMMAP As String = "TestFiles\ssm.Ahsm Const _BusDatabase As String ="TestFiles\BusDatabase.abdb - Dim ssm As ISSMTOOL = New SSMTOOL( _SSMMAP ) + Dim ssm As ISSMTOOL = New SSMTOOL(_SSMMAP, New HVACConstants()) ssm.Load( _SSMMAP) diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M14Tests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M14Tests.vb index 47f48d77a4d887e758fea14aea7c3878c8c8559f..5e17e34ef475e60494af01d6b913aa2dbf0a354d 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M14Tests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M14Tests.vb @@ -19,6 +19,7 @@ public class SSMToolMock Public Property Calculate As ISSMCalculate Implements ISSMTOOL.Calculate Public Property SSMDisabled As Boolean Implements ISSMTOOL.SSMDisabled + Public Property HVACConstants As IHVACConstants Implements ISSMTOOL.HVACConstants Public Sub Clone(from As ISSMTOOL) Implements ISSMTOOL.Clone @@ -105,7 +106,7 @@ Public Class M14Tests Dim hvacSSM As New Mock(Of ISSMTOOL) Dim signals As new Mock( Of ISignals) Dim ssmMock As ISSMTOOL = New SSMToolMock() - Dim constants As IHVACConstants = New HVACConstants() + Dim constants As IHVACConstants = New HVACConstants(835) 'Moq' Arrangements m13.Setup ( Function(x) x.WHTCTotalCycleFuelConsumptionGrams).Returns(ip1) diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M1_AverageHVACLoadDemandTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M1_AverageHVACLoadDemandTests.vb index 9e9c46b68b8ade01632c56a42630db799a1b2331..fa709354f96a9cc52ca92cbb363ce781c1584622 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M1_AverageHVACLoadDemandTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M1_AverageHVACLoadDemandTests.vb @@ -16,7 +16,7 @@ Public Class M1_AverageHVACLoadDemandTests Private signals As ISignals = New Signals With {.EngineSpeed=2000} Private powernetVoltage As Single = 26.3 -Private ssm As ISSMTOOL = New SSMTOOL(_SSMMAP) + Private ssm As ISSMTOOL = New SSMTOOL(_SSMMAP, New HVACConstants()) Private m0 As IM0_NonSmart_AlternatorsSetEfficiency diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M2_AverageElectricalLoadTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M2_AverageElectricalLoadTests.vb index bf32f208d5e0484a9edd5e8aeba873504d11db7e..5c64846b14be4a399bb5a19a6d7f2e4182851420 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M2_AverageElectricalLoadTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M2_AverageElectricalLoadTests.vb @@ -21,7 +21,7 @@ Private Function GetSSM() As ISSMTOOL Const _SSMMAP As String = "TestFiles\ssm.Ahsm Const _BusDatabase As String ="TestFiles\BusDatabase.abdb - Dim ssm As ISSMTOOL = New SSMTOOL( _SSMMAP ) + Dim ssm As ISSMTOOL = New SSMTOOL(_SSMMAP, New HVACConstants()) ssm.Load( _SSMMAP) diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/M5_SmartAlternatorSetGenerationTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/M5_SmartAlternatorSetGenerationTests.vb index 8c409db100a690b301d6e9495daf150cb7c6d482..495b46f3d4fdfef0d3769846ee87b1f021161535 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/M5_SmartAlternatorSetGenerationTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/M5_SmartAlternatorSetGenerationTests.vb @@ -30,7 +30,7 @@ Private Function GetSSM() As ISSMTOOL Const _SSMMAP As String = "TestFiles\ssm.Ahsm Const _BusDatabase As String ="TestFiles\BusDatabase.abdb - Dim ssm As ISSMTOOL = New SSMTOOL( _SSMMAP ) + Dim ssm As ISSMTOOL = New SSMTOOL(_SSMMAP, New HVACConstants()) ssm.Load( _SSMMAP) diff --git a/VECTOAux/VectoAuxiliariesTests/UnitTests/SSMTOOLTests.vb b/VECTOAux/VectoAuxiliariesTests/UnitTests/SSMTOOLTests.vb index 90aee41212d78a9efb7486d01223a580a351df12..dd32a8ae6d965454afb89002df50b8a5f9c0b423 100644 --- a/VECTOAux/VectoAuxiliariesTests/UnitTests/SSMTOOLTests.vb +++ b/VECTOAux/VectoAuxiliariesTests/UnitTests/SSMTOOLTests.vb @@ -102,10 +102,8 @@ Namespace UnitTests Assert.AreEqual(927.18478125 ,target.BC_HighVentPowerW ) Assert.AreEqual(296.69913000R ,target.BC_LowVentPowerW ) Assert.AreEqual(0.6R ,target.BC_SpecificVentilationPower ) - Assert.AreEqual(4 ,target.BC_COP ) Assert.AreEqual(1 ,target.BC_AuxHeaterEfficiency ) Assert.AreEqual(13 ,target.BC_GCVDieselOrHeatingOil ) - Assert.AreEqual(1 ,target.BC_VolumicMassDieselOrHeatingOil ) Assert.AreEqual(1.5R ,target.BC_WindowAreaPerUnitBusLength ) Assert.AreEqual(5 ,target.BC_FrontRearWindowArea ) Assert.AreEqual(4 ,target.BC_MaxTemperatureDeltaForLowFloorBusses ) @@ -127,10 +125,9 @@ Namespace UnitTests 'AC-SYSTEM '********* - Assert.AreEqual( True , target.AC_InCabinRoomAC_System ) Assert.AreEqual( "mechanical" , target.AC_CompressorType ) Assert.AreEqual( 18 , target.AC_CompressorCapacitykW ) - + Assert.AreEqual(4, target.AC_COP) End If If section = "Ventilation" Then @@ -566,7 +563,7 @@ End Sub const filePath as string = "SSMTOOLTestSaveRetreive.json" - Dim target As SSMTOOL = New SSMTOOL(filePath, True ) + Dim target As SSMTOOL = New SSMTOOL(filePath, New HVACConstants(), True) target.Save(filePath) @@ -590,8 +587,8 @@ End Sub const filePath as string = "SSMTOOLTestSaveRetreive.json" - Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath ) - Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath ) + Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) + Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) Assert.IsTrue ( ssmTool1.IsEqualTo( ssmTool2)) @@ -604,12 +601,12 @@ End Sub const filePath as string = "SSMTOOLTestSaveRetreive.json" - Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath ) + Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) 'Alter somthing ssmTool1.genInputs.BP_BusLength=11 - Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath ) + Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) Assert.IsFalse ( ssmTool1.IsEqualTo( ssmTool2)) @@ -624,8 +621,8 @@ End Sub const filePath as string = "SSMTOOLTestSaveRetreive.json" - Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath ) - Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath ) + Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) + Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) Assert.IsTrue ( ssmTool1.IsEqualTo( ssmTool2)) @@ -638,8 +635,8 @@ End Sub const filePath as string = "SSMTOOLTestSaveRetreive.json" - Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath ) - Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath ) + Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) + Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) 'Change something on techlist AddDefaultTechLine( ssmTool1) @@ -653,8 +650,8 @@ End Sub const filePath as string = "SSMTOOLTestSaveRetreive.json" - Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath ) - Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath ) + Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) + Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) 'Change something on techlist AddDefaultTechLine( ssmTool1) @@ -669,8 +666,8 @@ End Sub const filePath as string = "SSMTOOLTestSaveRetreive.json" - Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath ) - Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath ) + Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) + Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) 'Change something on techlist AddDefaultTechLine( ssmTool1) @@ -688,8 +685,8 @@ End Sub const filePath as string = "SSMTOOLTestSaveRetreive.json" - Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath ) - Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath ) + Dim ssmTool1 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) + Dim ssmTool2 As SSMTOOL = New SSMTOOL(filePath, New HVACConstants()) 'Change something on techlist AddDefaultTechLine( ssmTool1)