initial commit
This commit is contained in:
780
ArinWarev1/Calculator/Result/C1차소요량.vb
Normal file
780
ArinWarev1/Calculator/Result/C1차소요량.vb
Normal file
@@ -0,0 +1,780 @@
|
||||
Public Class C1차소요량
|
||||
Public Mon As String
|
||||
Private ErrMsg As String = "1차에너지소요량 계산되지 않았습니다"
|
||||
Private MIdx As Integer
|
||||
|
||||
'//M00 일떄의 합계식이 추가되지않았따
|
||||
'//해당부분은 주로 합계식에서 사용된다.
|
||||
|
||||
Public Sub Calc_Summary()
|
||||
|
||||
If MIdx <> 0 Then
|
||||
MsgBox("Calc 계산식은 0번만 가능합니다")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim i1, i2, i3, i4, i5, i6 As Decimal
|
||||
|
||||
i1 = 0 : i2 = 0 : i3 = 0 : i4 = 0 : i5 = 0
|
||||
For i As Integer = 1 To 12
|
||||
i1 += Result.일차E소요량(i).난방등유
|
||||
i2 += Result.일차E소요량(i).난방LNG
|
||||
i3 += Result.일차E소요량(i).난방LPG
|
||||
i4 += Result.일차E소요량(i).난방지역
|
||||
i5 += Result.일차E소요량(i).난방전력
|
||||
Next
|
||||
Me.난방등유 = i1
|
||||
Me.난방LNG = i2
|
||||
Me.난방LPG = i3
|
||||
Me.난방지역 = i4
|
||||
Me.난방전력 = i5
|
||||
|
||||
i1 = 0 : i2 = 0 : i3 = 0 : i4 = 0 : i5 = 0 : i6 = 0
|
||||
For i As Integer = 1 To 12
|
||||
i1 += Result.일차E소요량(i).냉방등유
|
||||
i2 += Result.일차E소요량(i).냉방LNG
|
||||
i3 += Result.일차E소요량(i).냉방LPG
|
||||
i4 += Result.일차E소요량(i).냉방지역난방열
|
||||
i5 += Result.일차E소요량(i).냉방지역냉방열
|
||||
i6 += Result.일차E소요량(i).냉방전력
|
||||
Next
|
||||
Me.냉방등유 = i1
|
||||
Me.냉방LNG = i2
|
||||
Me.냉방LPG = i3
|
||||
Me.냉방지역난방열 = i4
|
||||
Me.냉방지역냉방열 = i5
|
||||
Me.냉방전력 = i6
|
||||
|
||||
i1 = 0 : i2 = 0 : i3 = 0 : i4 = 0 : i5 = 0
|
||||
For i As Integer = 1 To 12
|
||||
i1 += Result.일차E소요량(i).급탕등유
|
||||
i2 += Result.일차E소요량(i).급탕LNG
|
||||
i3 += Result.일차E소요량(i).급탕LPG
|
||||
i4 += Result.일차E소요량(i).급탕지역
|
||||
i5 += Result.일차E소요량(i).급탕전력
|
||||
Next
|
||||
Me.급탕등유 = i1
|
||||
Me.급탕LNG = i2
|
||||
Me.급탕LPG = i3
|
||||
Me.급탕지역 = i4
|
||||
Me.급탕전력 = i5
|
||||
|
||||
End Sub
|
||||
|
||||
Private DSETR As DSR
|
||||
Private Result As CResult
|
||||
Public Sub New(ByRef pdsetr As DSR, ByRef presult As CResult, Optional ByVal pmIdx As Integer = 0)
|
||||
DSETR = pdsetr
|
||||
Result = presult
|
||||
MIdx = pmIdx
|
||||
Mon = "M" & Format(pmIdx, "00")
|
||||
End Sub
|
||||
|
||||
ReadOnly Property 소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.일차E소요량(i).소요량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Me.난방소요량 + Me.냉방소요량 + Me.급탕소요량 + Me.조명소요량 + Me.환기소요량 - (Result.생산E(MIdx).태양광전력생산량 * Result.E변환계수.전력) - (Result.생산E(MIdx).열병합전력생산량 * Result.E변환계수.전력)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 단위면적() As Decimal
|
||||
Get
|
||||
If MIdx <> 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방면적 + Me.냉방면적 + Me.급탕면적 + Me.조명면적 + Me.환기면적
|
||||
End If
|
||||
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "난방"
|
||||
ReadOnly Property 난방소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.난방등유 * Result.E변환계수.등유 + Me.난방LNG * Result.E변환계수.LNG + _
|
||||
Me.난방LPG * Result.E변환계수.LPG + Me.난방지역 * Result.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.난방전력 * Result.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Else
|
||||
Return Me.난방등유 * Result.E변환계수.등유 + Me.난방LNG * Result.E변환계수.LNG + _
|
||||
Me.난방LPG * Result.E변환계수.LPG + Me.난방지역 * Result.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result.E변환계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 난방소요량2() As Decimal '//140112(?)
|
||||
Get
|
||||
|
||||
Dim 건물용도 As Integer = CInt(DSET1.tbl_Desc.Rows(0)("isjugo"))
|
||||
|
||||
If MIdx = 0 Then
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
|
||||
Dim R As Decimal = Me.난방등유 * Result.E변환계수.지역난방 + Me.난방LNG * Result.E변환계수.지역난방 + _
|
||||
Me.난방LPG * Result.E변환계수.지역난방 + Me.난방지역 * Result.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.난방전력 * Result.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Else
|
||||
Dim R As Decimal = Me.난방등유 * Result.E변환계수.등유 + Me.난방LNG * Result.E변환계수.LNG + _
|
||||
Me.난방LPG * Result.E변환계수.LPG + Me.난방지역 * Result.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.난방전력 * Result.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
Return Me.난방등유 * Result.E변환계수.지역난방 + Me.난방LNG * Result.E변환계수.지역난방 + _
|
||||
Me.난방LPG * Result.E변환계수.지역난방 + Me.난방지역 * Result.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result.E변환계수.전력
|
||||
Else
|
||||
Return Me.난방등유 * Result.E변환계수.등유 + Me.난방LNG * Result.E변환계수.LNG + _
|
||||
Me.난방LPG * Result.E변환계수.LPG + Me.난방지역 * Result.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result.E변환계수.전력
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property 난방등유() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방등유"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("난방등유") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 난방LNG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방LNG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("난방LNG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 난방LPG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방LPG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("난방LPG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
'Property 난방펠렛() As Decimal
|
||||
' Get
|
||||
' Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
' If DR.GetUpperBound(0) = -1 Then
|
||||
' MsgBox(ErrMsg,MsgBoxStyle.Information,"C1차소요량")
|
||||
' Return 0
|
||||
' Else
|
||||
' Return TOSG(DR(0)("난방펠렛"))
|
||||
' End If
|
||||
' End Get
|
||||
' Set(ByVal value As Decimal)
|
||||
' Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
' If DR.GetUpperBound(0) = -1 Then
|
||||
' MsgBox(ErrMsg,MsgBoxStyle.Information,"C1차소요량")
|
||||
' Else
|
||||
' DR(0)("난방펠렛") = value
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
Property 난방지역() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방지역"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("난방지역") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 난방전력() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방전력"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("난방전력") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property 난방면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방소요량 / Result.사용면적.H
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 난방면적2() As Decimal
|
||||
Get
|
||||
If Result.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방소요량2 / Result.사용면적.H
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "냉방"
|
||||
ReadOnly Property 냉방소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.냉방등유 * Result.E변환계수.등유 + Me.냉방LNG * Result.E변환계수.LNG + _
|
||||
Me.냉방LPG * Result.E변환계수.LPG + Me.냉방지역난방열 * Result.E변환계수.지역난방 + _
|
||||
Me.냉방지역냉방열 * Result.E변환계수.지역냉방 + Me.냉방전력 * Result.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.냉방전력 * Result.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Else
|
||||
Return Me.냉방등유 * Result.E변환계수.등유 + Me.냉방LNG * Result.E변환계수.LNG + _
|
||||
Me.냉방LPG * Result.E변환계수.LPG + Me.냉방지역난방열 * Result.E변환계수.지역난방 + _
|
||||
Me.냉방지역냉방열 * Result.E변환계수.지역냉방 + Me.냉방전력 * Result.E변환계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Property 냉방등유() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방등유"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("냉방등유") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방LNG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방LNG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("냉방LNG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방펠렛() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방펠렛"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("냉방펠렛") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방LPG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방LPG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("냉방LPG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방지역난방열() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방지역"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("냉방지역") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방지역냉방열() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방지역2"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("냉방지역2") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방전력() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방전력"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("냉방전력") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 냉방면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.C = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방소요량 / Result.사용면적.C
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "급탕"
|
||||
ReadOnly Property 급탕소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.급탕등유 * Result.E변환계수.등유 + Me.급탕LNG * Result.E변환계수.LNG + _
|
||||
Me.급탕LPG * Result.E변환계수.LPG + Me.급탕지역 * Result.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result.E변환계수.전력
|
||||
|
||||
'#If DEBUG Then
|
||||
' Dim f As String = "c:\temp\1\급탕소요량1.txt"
|
||||
' Dim b As New System.Text.StringBuilder
|
||||
' If System.IO.File.Exists(f) = False Then
|
||||
' b.AppendLine("태양광전력생산량 열병합전력생산량 난방전력 냉방전력 급탕전력 조명전력 환기전력 전력변환계수")
|
||||
' End If
|
||||
' b.AppendLine(Result.생산E(0).태양광전력생산량.ToString() + vbTab + Result.생산E(0).열병합전력생산량.ToString() + vbTab + _
|
||||
' 난방전력.ToString() + vbTab + 냉방전력.ToString() + vbTab + 급탕전력.ToString() + vbTab + 조명전력.ToString() + vbTab + _
|
||||
' 환기전력.ToString() + vbTab + Result.E변환계수.전력.ToString())
|
||||
' My.Computer.FileSystem.WriteAllText(f, b.ToString, True)
|
||||
'#End If
|
||||
Try
|
||||
Return R - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.급탕전력 * Result.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Else
|
||||
|
||||
'#If DEBUG Then
|
||||
' Dim f As String = "c:\temp\1\급탕소요량2.txt"
|
||||
' Dim b As New System.Text.StringBuilder
|
||||
' If System.IO.File.Exists(f) = False Then
|
||||
' b.AppendLine("MIDX 급탕등유 급탕LNG 급탕LPG 급탕지역 급탕전력")
|
||||
' End If
|
||||
' b.AppendLine(MIdx.ToString() + vbTab + 급탕등유.ToString() + vbTab + 급탕LNG.ToString() + vbTab + 급탕LPG.ToString() + vbTab + 급탕지역.ToString() + vbTab + 급탕전력.ToString())
|
||||
' My.Computer.FileSystem.WriteAllText(f, b.ToString, True)
|
||||
'#End If
|
||||
|
||||
Return Me.급탕등유 * Result.E변환계수.등유 + Me.급탕LNG * Result.E변환계수.LNG + _
|
||||
Me.급탕LPG * Result.E변환계수.LPG + Me.급탕지역 * Result.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result.E변환계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 급탕소요량2() As Decimal
|
||||
Get
|
||||
Dim 건물용도 As Integer = CInt(DSET1.tbl_Desc.Rows(0)("isjugo"))
|
||||
|
||||
If MIdx = 0 Then
|
||||
If 건물용도 < 10 Then
|
||||
Dim R As Decimal = Me.급탕등유 * Result.E변환계수.지역난방 + Me.급탕LNG * Result.E변환계수.지역난방 + _
|
||||
Me.급탕LPG * Result.E변환계수.지역난방 + Me.급탕지역 * Result.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.급탕전력 * Result.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Else
|
||||
Dim R As Decimal = Me.급탕등유 * Result.E변환계수.등유 + Me.급탕LNG * Result.E변환계수.LNG + _
|
||||
Me.급탕LPG * Result.E변환계수.LPG + Me.급탕지역 * Result.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.급탕전력 * Result.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
Return Me.급탕등유 * Result.E변환계수.지역난방 + Me.급탕LNG * Result.E변환계수.지역난방 + _
|
||||
Me.급탕LPG * Result.E변환계수.지역난방 + Me.급탕지역 * Result.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result.E변환계수.전력
|
||||
Else
|
||||
Return Me.급탕등유 * Result.E변환계수.등유 + Me.급탕LNG * Result.E변환계수.LNG + _
|
||||
Me.급탕LPG * Result.E변환계수.LPG + Me.급탕지역 * Result.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result.E변환계수.전력
|
||||
End If
|
||||
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Property 급탕등유() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("급탕등유"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("급탕등유") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕LNG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("급탕LNG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("급탕LNG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕펠렛() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("급탕펠렛"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("급탕펠렛") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕LPG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("급탕LPG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("급탕LPG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕지역() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("급탕지역"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("급탕지역") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕전력() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("급탕전력"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "C1차소요량")
|
||||
Else
|
||||
DR(0)("급탕전력") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 급탕면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕소요량 / Result.사용면적.W
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 급탕면적2() As Decimal
|
||||
Get
|
||||
If Result.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕소요량2 / Result.사용면적.W
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "조명부분(읽기전용)"
|
||||
ReadOnly Property 조명소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = 조명전력 * Result.E변환계수.전력
|
||||
|
||||
Try
|
||||
Return R - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.조명전력 * Result.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Else
|
||||
Return 조명전력 * Result.E변환계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 조명전력() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then '//합계필드라면 12월의 합계를 반환한다.
|
||||
Dim i1 As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
i1 += Result.일차E소요량(i).조명전력
|
||||
Next
|
||||
Return i1
|
||||
Else
|
||||
Return Result.E소요량(Me.MIdx).조명S
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 조명면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명소요량 / Result.사용면적.L
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "환기부분(읽기전용)"
|
||||
ReadOnly Property 환기소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = 환기전력 * Result.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.환기전력 * Result.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Else
|
||||
Return 환기전력 * Result.E변환계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 환기전력() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then '//합계필드라면 12월의 합계를 반환한다.
|
||||
Dim i1 As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
i1 += Result.일차E소요량(i).환기전력
|
||||
Next
|
||||
Return i1
|
||||
Else
|
||||
Return Result.E소요량(Me.MIdx).환기S
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 환기면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.V = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.환기소요량 / Result.사용면적.V
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
452
ArinWarev1/Calculator/Result/CCo2발생량.vb
Normal file
452
ArinWarev1/Calculator/Result/CCo2발생량.vb
Normal file
@@ -0,0 +1,452 @@
|
||||
Public Class CCo2발생량
|
||||
Public Mon As String
|
||||
Private ErrMsg As String = "에너지소요량 계산되지 않았습니다"
|
||||
Private MIdx As Integer
|
||||
Private Result As CResult
|
||||
Public Sub New(ByRef presult As CResult, Optional ByVal pmIdx As Integer = 0)
|
||||
Result = presult
|
||||
MIdx = pmIdx
|
||||
Mon = "M" & Format(MIdx, "00")
|
||||
End Sub
|
||||
ReadOnly Property 발생량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then '//최종합계는 저람량을 제하지않는다?
|
||||
Return Me.난방발생량 + Me.냉방발생량 + Me.급탕발생량 + Me.조명발생량 + Me.환기발생량
|
||||
Else
|
||||
Return Me.난방발생량 + Me.냉방발생량 + Me.급탕발생량 + Me.조명발생량 + Me.환기발생량 - Me.저감량태양광 - Me.저감량열병합
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 단위면적() As Decimal
|
||||
Get '//월구분없음 실제로는 최종합 M00 에만 값이 있다.
|
||||
Return Me.난방면적 + Me.냉방면적 + Me.급탕면적 + Me.조명면적 + Me.환기면적
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "난방"
|
||||
ReadOnly Property 난방발생량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.난방등유 + Me.난방LNG + Me.난방LPG + Me.난방지역 + Me.난방전력
|
||||
Try
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.난방전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Else
|
||||
Return Me.난방등유 + Me.난방LNG + Me.난방LPG + Me.난방지역 + Me.난방전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 난방등유() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).난방등유
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).난방등유 * Result.Co2배출계수.등유
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 난방LNG() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).난방LNG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).난방LNG * Result.Co2배출계수.LNG
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 난방LPG() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).난방LPG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).난방LPG * Result.Co2배출계수.LPG
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 난방지역() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).난방지역
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).난방지역 * Result.Co2배출계수.지역난방
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 난방전력() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).난방전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).난방전력 * Result.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
'ReadOnly Property 난방펠렛() As Decimal
|
||||
' Get
|
||||
' If Me.MIdx = 0 Then
|
||||
' Dim Res As Decimal = 0
|
||||
' For i As Short = 1 To 12
|
||||
' Res += Result.Co2발생량(i).난방펠렛
|
||||
' Next
|
||||
' Return Res
|
||||
' Else
|
||||
' Return Result.일차E소요량(MIdx).난방펠렛 * Result.Co2배출계수.펠렛
|
||||
' End If
|
||||
' End Get
|
||||
'End Property
|
||||
ReadOnly Property 난방면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방발생량 / Result.사용면적.H
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
ReadOnly Property 냉방발생량() As Decimal
|
||||
Get
|
||||
Dim R As Decimal = Me.냉방등유 + Me.냉방LNG + Me.냉방LPG + Me.냉방지역난방열 + Me.냉방지역냉방열 + Me.냉방전력
|
||||
If MIdx = 0 Then
|
||||
Try
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.냉방전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Else
|
||||
Return R
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방등유() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).냉방등유
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).냉방등유 * Result.Co2배출계수.등유
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방LNG() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).냉방LNG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).냉방LNG * Result.Co2배출계수.LNG
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
'ReadOnly Property 냉방펠렛() As Decimal
|
||||
' Get
|
||||
' If Me.MIdx = 0 Then
|
||||
' Dim Res As Decimal = 0
|
||||
' For i As Short = 1 To 12
|
||||
' Res += Result.Co2발생량(i).냉방펠렛
|
||||
' Next
|
||||
' Return Res
|
||||
' Else
|
||||
' Return Result.일차E소요량(MIdx).냉방펠렛 * Result.Co2배출계수.펠렛
|
||||
' End If
|
||||
' End Get
|
||||
'End Property
|
||||
ReadOnly Property 냉방LPG() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).냉방LPG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).냉방LPG * Result.Co2배출계수.LPG
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방지역난방열() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).냉방지역난방열
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).냉방지역난방열 * Result.Co2배출계수.지역난방
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방지역냉방열() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).냉방지역냉방열
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).냉방지역냉방열 * Result.Co2배출계수.지역냉방
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방전력() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).냉방전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).냉방전력 * Result.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.C = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방발생량 / Result.사용면적.C
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 급탕발생량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.급탕등유 + Me.급탕LNG + Me.급탕LPG + Me.급탕지역 + Me.급탕전력
|
||||
Try
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.급탕전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Else
|
||||
Return Me.급탕등유 + Me.급탕LNG + Me.급탕LPG + Me.급탕지역 + Me.급탕전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 급탕등유() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).급탕등유
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).급탕등유 * Result.Co2배출계수.등유
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
'ReadOnly Property 급탕펠렛() As Decimal
|
||||
' Get
|
||||
' If Me.MIdx = 0 Then
|
||||
' Dim Res As Decimal = 0
|
||||
' For i As Short = 1 To 12
|
||||
' Res += Result.Co2발생량(i).급탕펠렛
|
||||
' Next
|
||||
' Return Res
|
||||
' Else
|
||||
' Return Result.일차E소요량(MIdx).급탕펠렛 * Result.Co2배출계수.펠렛
|
||||
' End If
|
||||
' End Get
|
||||
'End Property
|
||||
ReadOnly Property 급탕LNG() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).급탕LNG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).급탕LNG * Result.Co2배출계수.LNG
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 급탕LPG() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).급탕LPG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).급탕LPG * Result.Co2배출계수.LPG
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 급탕지역() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).급탕지역
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).급탕지역 * Result.Co2배출계수.지역난방
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 급탕전력() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).급탕전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).급탕전력 * Result.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 급탕면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕발생량 / Result.사용면적.W
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 조명발생량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.조명전력
|
||||
Try
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.조명전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Else
|
||||
Return Me.조명전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 조명전력() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).조명전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).조명전력 * Result.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 조명면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명발생량 / Result.사용면적.L
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 환기발생량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.환기전력
|
||||
Try
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.환기전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Else
|
||||
Return Me.환기전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 환기전력() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).환기전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.일차E소요량(MIdx).환기전력 * Result.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 환기면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.V = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.환기발생량 / Result.사용면적.V
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 저감량태양광() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).저감량태양광
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.생산E(MIdx).태양광전력생산량 * Result.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 저감량열병합() As Decimal
|
||||
Get
|
||||
If Me.MIdx = 0 Then
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.Co2발생량(i).저감량열병합
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result.생산E(MIdx).열병합전력생산량 * Result.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
48
ArinWarev1/Calculator/Result/CResult.vb
Normal file
48
ArinWarev1/Calculator/Result/CResult.vb
Normal file
@@ -0,0 +1,48 @@
|
||||
Public Class CResult
|
||||
|
||||
|
||||
Public Zones As CZones
|
||||
|
||||
Public E요구량(12) As C에너지요구량
|
||||
Public E소요량(12) As C에너지소요량
|
||||
Public 일차E소요량(12) As C1차소요량
|
||||
Public 생산E(12) As C생산에너지
|
||||
Public Co2발생량(12) As CCo2발생량
|
||||
Public E분석(12) As C에너지분석 '//여기는 유일하게 0번 인덱스를 쓸수없다
|
||||
|
||||
Public Co2배출계수 As CCo2배출계수
|
||||
Public E변환계수 As C1차에너지변환계수
|
||||
|
||||
Public 사용면적 As C사용면적
|
||||
Public 최대부하 As C최대냉난방부하
|
||||
|
||||
Private DSETR As DSR
|
||||
Private DSET As DS
|
||||
Public Sub New(ByRef pds As DS, ByRef pdsetr As DSR)
|
||||
DSET = pds
|
||||
DSETR = pdsetr
|
||||
|
||||
'//공용
|
||||
Co2배출계수 = New CCo2배출계수
|
||||
E변환계수 = New C1차에너지변환계수
|
||||
|
||||
'//단일
|
||||
사용면적 = New C사용면적(DSET, DSETR, Me)
|
||||
최대부하 = New C최대냉난방부하(DSETR)
|
||||
|
||||
'//서브추가항목
|
||||
Zones = New CZones(DSET, DSETR, Me)
|
||||
|
||||
'//월별로 들어가는 배열항목
|
||||
For i As Integer = 0 To 12
|
||||
Me.E요구량(i) = New C에너지요구량(Me, i)
|
||||
Me.E소요량(i) = New C에너지소요량(DSETR, Me, i)
|
||||
Me.일차E소요량(i) = New C1차소요량(DSETR, Me, i)
|
||||
Me.생산E(i) = New C생산에너지(DSETR, Me, i)
|
||||
Me.Co2발생량(i) = New CCo2발생량(Me, i)
|
||||
Me.E분석(i) = New C에너지분석(DSETR, Me, i)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
71
ArinWarev1/Calculator/Result/CZones.vb
Normal file
71
ArinWarev1/Calculator/Result/CZones.vb
Normal file
@@ -0,0 +1,71 @@
|
||||
|
||||
''' <summary>
|
||||
''' 각존의 데이터를 참조한다
|
||||
''' </summary>
|
||||
Public Class CZones
|
||||
Dim ErrMsg As String = "최대냉난방부하가 계산되지 않았습니다"
|
||||
Public Items() As Citem
|
||||
|
||||
Private DSET As DS
|
||||
Private DSETR As DSR
|
||||
Private Result As CResult
|
||||
Public Sub New(ByRef pds As DS, ByRef pdsetr As DSR, ByRef presult As CResult) '//존은초기화값을 가지고 생성한다.
|
||||
DSET = pds
|
||||
DSETR = pdsetr
|
||||
Result = presult
|
||||
ReDim Items(Me.CountR) '//결과내의 존을 초기화한다.
|
||||
Dim idx As Integer = 0
|
||||
For Each It As DSR.최대냉난방부하Row In DSETR.최대냉난방부하.Select("zone<>'00'")
|
||||
Items(idx) = New Citem(DSET, DSETR, Result, idx, It.Zone)
|
||||
idx += 1
|
||||
Next
|
||||
'//해당존의 코드값을 가지고 결과가 게산되어있따.
|
||||
End Sub
|
||||
Public Function Count() As Integer
|
||||
Return DSET.tbl_zone.Rows.Count '//현재 시스템의 존 카운터를 반환
|
||||
End Function
|
||||
Public Function CountR() As Integer
|
||||
Return DSETR.최대냉난방부하.Select("zone<>'00'").GetUpperBound(0) + 1 '//계산결과내의 존의 갯수를 반환
|
||||
End Function
|
||||
|
||||
Public Class Citem
|
||||
Public Index As Integer
|
||||
Public Code As String
|
||||
Public 최대냉난방부하 As C최대냉난방부하.Citem
|
||||
Public 월에너지분석(11) As C에너지분석 '//이존의 12달의 내역을 참조한다.
|
||||
Private DSETR As DSR
|
||||
Private DSET As DS
|
||||
Private Result As CResult
|
||||
Public Sub New(ByRef pds As DS, ByRef pdsetr As DSR, ByRef presult As CResult, ByVal pidx As Integer, ByVal pcode As String)
|
||||
DSET = pds
|
||||
DSETR = pdsetr
|
||||
Result = presult
|
||||
Me.Index = pidx
|
||||
Me.Code = pcode
|
||||
최대냉난방부하 = New C최대냉난방부하.Citem(DSETR, pcode)
|
||||
|
||||
Dim Idx As Integer = 0
|
||||
For Each DR As C에너지분석 In Me.월에너지분석
|
||||
DR = New C에너지분석(DSETR, Result, Idx, pcode)
|
||||
Idx += 1
|
||||
Next
|
||||
End Sub
|
||||
Public Function Name() As String
|
||||
Dim dR() As DataRow = DSET.tbl_zone.Select("code='" & Me.Code & "'")
|
||||
If dR.GetUpperBound(0) = -1 Then
|
||||
Return "존재하지않는 Zone 입니다"
|
||||
Else
|
||||
Return dR(0)("설명").ToString
|
||||
End If
|
||||
End Function
|
||||
Public Function Row() As DS.tbl_zoneRow
|
||||
Dim dR() As DS.tbl_zoneRow = CType(DSET.tbl_zone.Select("code='" & Me.Code & "'"), DS.tbl_zoneRow())
|
||||
If dR.GetUpperBound(0) = -1 Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return dR(0)
|
||||
End If
|
||||
End Function
|
||||
End Class
|
||||
End Class
|
||||
|
||||
75
ArinWarev1/Calculator/Result/C범용.vb
Normal file
75
ArinWarev1/Calculator/Result/C범용.vb
Normal file
@@ -0,0 +1,75 @@
|
||||
Public Class CCo2배출계수
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
ReadOnly Property 등유() As Decimal
|
||||
Get
|
||||
Return 0.259
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property LNG() As Decimal
|
||||
Get
|
||||
Return 0.202
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property LPG() As Decimal
|
||||
Get
|
||||
Return 0.227
|
||||
End Get
|
||||
End Property
|
||||
'ReadOnly Property 펠렛() As Decimal
|
||||
' Get
|
||||
' Return 0.0 '//나중에 지정하세요.
|
||||
' End Get
|
||||
'End Property
|
||||
ReadOnly Property 지역난방() As Decimal
|
||||
Get
|
||||
Return 0.164
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 지역냉방() As Decimal
|
||||
Get
|
||||
Return 0.14
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 전력() As Decimal
|
||||
Get
|
||||
Return 0.4691
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
Public Class C1차에너지변환계수
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
ReadOnly Property 등유() As Decimal
|
||||
Get
|
||||
Return 1.1
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property LNG() As Decimal
|
||||
Get
|
||||
Return 1.1
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property LPG() As Decimal
|
||||
Get
|
||||
Return 1.1
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 지역난방() As Decimal
|
||||
Get
|
||||
Return 0.728
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 지역냉방() As Decimal
|
||||
Get
|
||||
Return 0.937
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 전력() As Decimal
|
||||
Get
|
||||
Return 2.75
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
412
ArinWarev1/Calculator/Result/C사용면적.vb
Normal file
412
ArinWarev1/Calculator/Result/C사용면적.vb
Normal file
@@ -0,0 +1,412 @@
|
||||
''' <summary>
|
||||
''' 전체존의 사용면적을 계산및 확인(냉,난,조,급,환)
|
||||
''' </summary>
|
||||
''' <remarks>전체존의 사용면적을 계산및 확인(냉,난,조,급,환)</remarks>
|
||||
Public Class C사용면적
|
||||
|
||||
''' <summary>
|
||||
''' 난방
|
||||
''' </summary>
|
||||
''' <remarks>난방</remarks>
|
||||
Property H() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("H"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("H") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 냉방
|
||||
''' </summary>
|
||||
''' <remarks>냉방</remarks>
|
||||
Property C() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("C"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("C") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 조명
|
||||
''' </summary>
|
||||
''' <remarks>조명</remarks>
|
||||
Property L() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("L"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("L") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 급탕
|
||||
''' </summary>
|
||||
''' <remarks>급탕</remarks>
|
||||
Property W() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("W"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("W") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 환기
|
||||
''' </summary>
|
||||
''' <remarks>환기</remarks>
|
||||
Property V() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("V"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("V") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 난방_WF
|
||||
''' </summary>
|
||||
''' <remarks>난방</remarks>
|
||||
Property H_WF() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("H_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("H_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 냉방_WF
|
||||
''' </summary>
|
||||
''' <remarks>냉방</remarks>
|
||||
Property C_WF() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("C_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("C_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 조명_WF
|
||||
''' </summary>
|
||||
''' <remarks>조명</remarks>
|
||||
Property L_WF() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("L_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("L_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 급탕_WF
|
||||
''' </summary>
|
||||
''' <remarks>급탕</remarks>
|
||||
Property W_WF() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("W_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("W_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 환기_WF
|
||||
''' </summary>
|
||||
''' <remarks>환기</remarks>
|
||||
Property V_WF() As Decimal
|
||||
Get
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DSETR.사용면적(0)("V_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR.사용면적.Rows.Count = 0 Then
|
||||
LogSB.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR.사용면적(0)("V_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overridable Sub Calc()
|
||||
|
||||
pLog.Add(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
|
||||
pLog.Add(">> C사용면적.Calc")
|
||||
pLog.Add(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
|
||||
|
||||
Dim A_H As Decimal = 0
|
||||
Dim A_C As Decimal = 0
|
||||
Dim A_L As Decimal = 0
|
||||
Dim A_W As Decimal = 0
|
||||
Dim A_V As Decimal = 0
|
||||
'//용도별 면적가중치(wf) 추가 '2012.07.01
|
||||
Dim A_H_wf As Decimal = 0
|
||||
Dim A_C_wf As Decimal = 0
|
||||
Dim A_L_wf As Decimal = 0
|
||||
Dim A_W_wf As Decimal = 0
|
||||
Dim A_V_wf As Decimal = 0
|
||||
Dim day_year As Decimal
|
||||
'//'2012.07.01
|
||||
|
||||
If DSETR.사용면적.Rows.Count = 0 Then '//데결과가 없으면 신규줄을 기록한다.
|
||||
Dim Dr As DSR.사용면적Row = DSETR.사용면적.New사용면적Row
|
||||
Dr.H = 0 : Dr.C = 0 : Dr.L = 0 : Dr.W = 0 : Dr.V = 0
|
||||
DSETR.사용면적.Add사용면적Row(Dr)
|
||||
DSETR.AcceptChanges()
|
||||
End If
|
||||
|
||||
'//건물용도
|
||||
Dim 건물용도 As Integer = CInt(DSET.tbl_Desc.Rows(0)("isjugo"))
|
||||
|
||||
'//A_H,C,W,L,V 의 누적값을 계산(사용면적) '//모든존을 대상으로
|
||||
|
||||
For Each Dr존 As DS.tbl_zoneRow In DSET.tbl_zone.Select("code<>'0'", "code")
|
||||
|
||||
Dim Dr프로필 As DS.tbl_profileRow = CType(DSET.tbl_profile.Select("code='" & Dr존.프로필 & "'")(0), DS.tbl_profileRow)
|
||||
|
||||
Dim offset As Integer = 1
|
||||
If Dr프로필.code = "0016" Then
|
||||
If Dr존.조명부하산출방법 = "입력치" Then
|
||||
If Dr존.조명에너지부하율입력치 > 10 Then
|
||||
offset = ((Dr존.조명에너지부하율입력치 - 10) * 0.4 + 10) / Dr존.조명에너지부하율입력치
|
||||
End If
|
||||
ElseIf Dr존.조명부하산출방법 = "계산치" Then
|
||||
If Dr존.조명에너지부하율계산치 > 10 Then
|
||||
offset = ((Dr존.조명에너지부하율계산치 - 10) * 0.4 + 10) / Dr존.조명에너지부하율계산치
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
pLog.Add(String.Format(">> Zone({0})Row Offset={1}", Dr존.code, offset))
|
||||
|
||||
'//냉난방(HC) 이거나 난방(H)일경우 난방면적 누적
|
||||
If Dr존.냉난방방식.IndexOf("난") <> -1 OrElse Dr존.냉난방공조.IndexOf("난") <> -1 Then
|
||||
A_H += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수)
|
||||
If 건물용도 < 10 Then '//주거일경우에
|
||||
|
||||
'//연
|
||||
|
||||
A_H_wf = A_H
|
||||
|
||||
Else
|
||||
day_year = TOSG(Dr프로필.day01) + TOSG(Dr프로필.day02) + TOSG(Dr프로필.day03) + TOSG(Dr프로필.day04) + TOSG(Dr프로필.day05) + TOSG(Dr프로필.day06) + TOSG(Dr프로필.day07) + TOSG(Dr프로필.day08) + TOSG(Dr프로필.day09) + TOSG(Dr프로필.day10) + TOSG(Dr프로필.day11) + TOSG(Dr프로필.day12)
|
||||
'A_H_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * (TOSG(Dr프로필.일일운전시간) * Math.Round(day_year / (11 * 250), 3))
|
||||
|
||||
A_H_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * Math.Round(TOSG(Dr프로필.일일운전시간) * (day_year / (11 * 250)), 3)
|
||||
|
||||
'If Dr프로필.code <> "0010" Then
|
||||
' A_H_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * Math.Round(TOSG(Dr프로필.일일운전시간) * (day_year / (11 * 250)), 3)
|
||||
'Else
|
||||
' A_H_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * Math.Round(TOSG(Dr프로필.일일운전시간) * (day_year / (11 * 250)) / (0.583 / 0.314), 3) '//전산실 용도에 따른 난방 가중치 적용
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
pLog.Add(String.Format(">> Zone({0})Row A_H_wf={1}", Dr존.code, A_H_wf))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'//냉난방(hC) 이거나 냉방(C)일경우 냉방면적 누적
|
||||
If Dr존.냉난방방식.IndexOf("냉") <> -1 OrElse Dr존.냉난방공조.IndexOf("냉") <> -1 Then
|
||||
A_C += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수)
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
A_C_wf = A_C
|
||||
Else
|
||||
day_year = TOSG(Dr프로필.day01) + TOSG(Dr프로필.day02) + TOSG(Dr프로필.day03) + TOSG(Dr프로필.day04) + TOSG(Dr프로필.day05) + TOSG(Dr프로필.day06) + TOSG(Dr프로필.day07) + TOSG(Dr프로필.day08) + TOSG(Dr프로필.day09) + TOSG(Dr프로필.day10) + TOSG(Dr프로필.day11) + TOSG(Dr프로필.day12)
|
||||
'A_C_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * (TOSG(Dr프로필.일일운전시간) * Math.Round(day_year / (11 * 250), 3))
|
||||
|
||||
A_C_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * Math.Round(TOSG(Dr프로필.일일운전시간) * (day_year / (11 * 250)), 3)
|
||||
|
||||
'If Dr프로필.code <> "0010" Then
|
||||
' A_C_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * Math.Round(TOSG(Dr프로필.일일운전시간) * (day_year / (11 * 250)), 3)
|
||||
'Else
|
||||
' A_C_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * Math.Round(TOSG(Dr프로필.일일운전시간) * (day_year / (11 * 250)) / (0.045 / 0.314), 3) '//전산실 용도에 따른 냉방 가중치 적용
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
pLog.Add(String.Format(">> Zone({0})Row A_C={1},A_C_wf={2}", Dr존.code, A_C, A_C_wf))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'//급탕요구량이 있다면 급탕면적 누적
|
||||
If TOSG(Dr프로필.일일급탕요구량) > 0 Then
|
||||
|
||||
A_W += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수)
|
||||
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
A_W_wf = A_W
|
||||
Else
|
||||
day_year = TOSG(Dr프로필.day01) + TOSG(Dr프로필.day02) + TOSG(Dr프로필.day03) + TOSG(Dr프로필.day04) + TOSG(Dr프로필.day05) + TOSG(Dr프로필.day06) + TOSG(Dr프로필.day07) + TOSG(Dr프로필.day08) + TOSG(Dr프로필.day09) + TOSG(Dr프로필.day10) + TOSG(Dr프로필.day11) + TOSG(Dr프로필.day12)
|
||||
'A_W_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * (TOSG(Dr프로필.일일급탕요구량) * Math.Round(day_year / (30 * 250), 3)) 160211 소수점오류인한 수정
|
||||
A_W_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * Math.Round(TOSG(Dr프로필.일일급탕요구량) * (day_year / (30 * 250)), 3)
|
||||
End If
|
||||
|
||||
pLog.Add(String.Format(">> Zone({0})Row A_W={1},A_W_wf={2}", Dr존.code, A_W, A_W_wf))
|
||||
|
||||
End If
|
||||
|
||||
'//조명의 에너지부하율값이 있으면 조명면적 누적
|
||||
If Dr존.조명에너지부하율계산치 <> "0" OrElse Dr존.조명에너지부하율입력치 <> "0" Then
|
||||
A_L += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수)
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
'//가스를쓰는 난방 급탕은 계가 발생
|
||||
A_L_wf = A_L
|
||||
Else
|
||||
day_year = TOSG(Dr프로필.day01) + TOSG(Dr프로필.day02) + TOSG(Dr프로필.day03) + TOSG(Dr프로필.day04) + TOSG(Dr프로필.day05) + TOSG(Dr프로필.day06) + TOSG(Dr프로필.day07) + TOSG(Dr프로필.day08) + TOSG(Dr프로필.day09) + TOSG(Dr프로필.day10) + TOSG(Dr프로필.day11) + TOSG(Dr프로필.day12)
|
||||
'A_L_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * (TOSG(Dr프로필.일일사용시간) * Math.Round(day_year / (9 * 250), 3) * offset)
|
||||
A_L_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * Math.Round(TOSG(Dr프로필.일일사용시간) * (day_year / (9 * 250)), 3) * offset
|
||||
End If
|
||||
|
||||
pLog.Add(String.Format(">> Zone({0})Row A_L={1},A_L_wf={2}", Dr존.code, A_L, A_L_wf))
|
||||
End If
|
||||
|
||||
'//냉난방공조를 사용하고있다면 환기면적 누적(ZZ:기능없음)
|
||||
If (Dr존.냉난방공조 <> "기능없음") Then
|
||||
A_V += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수)
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
A_V_wf = A_V
|
||||
Else
|
||||
day_year = TOSG(Dr프로필.day01) + TOSG(Dr프로필.day02) + TOSG(Dr프로필.day03) + TOSG(Dr프로필.day04) + TOSG(Dr프로필.day05) + TOSG(Dr프로필.day06) + TOSG(Dr프로필.day07) + TOSG(Dr프로필.day08) + TOSG(Dr프로필.day09) + TOSG(Dr프로필.day10) + TOSG(Dr프로필.day11) + TOSG(Dr프로필.day12)
|
||||
'A_V_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * (TOSG(Dr프로필.일일운전시간) * Math.Round(day_year / (11 * 250), 3))
|
||||
A_V_wf += TOSG(Dr존.면적) * TOSG(Dr존.입력존의수) * Math.Round(TOSG(Dr프로필.일일운전시간) * (day_year / (11 * 250)), 3)
|
||||
End If
|
||||
|
||||
pLog.Add(String.Format(">> Zone({0})Row A_V={1},A_V_wf={2}", Dr존.code, A_V, A_V_wf))
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'//저장소에 보관한다.
|
||||
'//가중치 없는 사용면적
|
||||
Result.사용면적.H = A_H
|
||||
Result.사용면적.C = A_C
|
||||
Result.사용면적.L = A_L
|
||||
Result.사용면적.W = A_W
|
||||
Result.사용면적.V = A_V
|
||||
|
||||
pLog.Add("C사용면적.CALC 결과 : 가중치없음")
|
||||
pLog.Add(String.Format("H={0},C={1},L={2},W={3},V={4}", A_H, A_C, A_L, A_W, A_V))
|
||||
|
||||
|
||||
'// 가중치 있는 사용면적 '2013.07.01
|
||||
Result.사용면적.H_WF = A_H_wf
|
||||
Result.사용면적.C_WF = A_C_wf
|
||||
Result.사용면적.L_WF = A_L_wf
|
||||
Result.사용면적.W_WF = A_W_wf
|
||||
Result.사용면적.V_WF = A_V_wf
|
||||
|
||||
pLog.Add("C사용면적.CALC 결과 : 가중치적용")
|
||||
pLog.Add(String.Format("H_wf={0},C_wf={1},L_wf={2},W_wf={3},V_wf={4}", A_H_wf, A_C_wf, A_L_wf, A_W_wf, A_V_wf))
|
||||
End Sub
|
||||
|
||||
Private DSETR As DSR
|
||||
Private Result As CResult
|
||||
Private DSET As DS
|
||||
Public Sub New(ByRef pds As DS, ByRef pdsetr As DSR, ByRef presult As CResult)
|
||||
|
||||
If Not pLog Is Nothing Then
|
||||
pLog.Add("New C사용면적", True)
|
||||
End If
|
||||
|
||||
DSET = pds
|
||||
DSETR = pdsetr
|
||||
Result = presult
|
||||
End Sub
|
||||
End Class
|
||||
272
ArinWarev1/Calculator/Result/C생산에너지.vb
Normal file
272
ArinWarev1/Calculator/Result/C생산에너지.vb
Normal file
@@ -0,0 +1,272 @@
|
||||
'// 0월합계에대한 처리는 하였음
|
||||
'// 완료일자 : 2010-03-08
|
||||
|
||||
Public Class C생산에너지
|
||||
Public Mon As String
|
||||
Private MIdx As Integer
|
||||
Private ErrMsg As String = "에너지소요량 계산되지 않았습니다"
|
||||
|
||||
'Public Sub Calc_Summary()
|
||||
' '//
|
||||
' If MIdx <> 0 Then
|
||||
' MsgBox("계산식은 0번 합계배열만 가능합니다")
|
||||
' Return
|
||||
' End If
|
||||
|
||||
' Dim I1 as decimal = 0
|
||||
' Dim I2 as decimal = 0
|
||||
' Dim I3 as decimal = 0
|
||||
' Dim I4 as decimal = 0
|
||||
' Dim I5 as decimal = 0
|
||||
' Dim I6 as decimal = 0
|
||||
' For i As Integer = 1 To 12
|
||||
' '//12월을 다더해서 0번열에 기록한다.
|
||||
' I1 += Result.생산E(i).태양광전력생산량
|
||||
' I2 += Result.생산E(i).열병합전력생산량
|
||||
' I3 += Result.생산E(i).태양열생산량
|
||||
' I4 += Result.생산E(i).지열생산량
|
||||
' I5 += Result.생산E(i).면적당생산량태양열
|
||||
' I6 += Result.생산E(i).면적당생산량지열
|
||||
' Next
|
||||
' Me.태양광전력생산량 = I1
|
||||
' Me.열병합전력생산량 = I2
|
||||
' Me.태양열생산량 = I3
|
||||
' Me.지열생산량 = I4
|
||||
' Me.면적당생산량태양열 = I5
|
||||
' Me.면적당생산량지열 = I6
|
||||
'End Sub
|
||||
|
||||
Private DSETR As DSR
|
||||
Private Result As CResult
|
||||
Public Sub New(ByRef pdsetr As DSR, ByRef presult As CResult, Optional ByVal pmIdx As Integer = 0)
|
||||
DSETR = pdsetr
|
||||
Result = presult
|
||||
MIdx = pmIdx
|
||||
Mon = "M" & Format(MIdx, "00")
|
||||
End Sub
|
||||
Property 태양광전력생산량() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
'MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
If MIdx = 0 Then '//0월이면 모든월의 합계를 반환한다.
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.생산E(i).태양광전력생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(DR(0)("전력태양광"))
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
' MsgBox("태양광기록(" & Mon & ")")
|
||||
DR(0)("전력태양광") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 열병합전력생산량() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
'MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
If MIdx = 0 Then '//0월이면 모든월의 합계를 반환한다.
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.생산E(i).열병합전력생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(DR(0)("전력열병합"))
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("전력열병합") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 신재생열병합전력생산량() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
'MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
If MIdx = 0 Then '//0월이면 모든월의 합계를 반환한다.
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.생산E(i).신재생열병합전력생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(DR(0)("신재생열병합전력생산량"))
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("신재생열병합전력생산량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property 신재생면적당열생산량() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
'MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
If MIdx = 0 Then '//0월이면 모든월의 합계를 반환한다.
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.생산E(i).신재생면적당열생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(DR(0)("신재생면적당열생산량"))
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("신재생면적당열생산량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property 태양열생산량() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
'MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
If MIdx = 0 Then '//0월이면 모든월의 합계를 반환한다.
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.생산E(i).태양열생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(DR(0)("생산량태양열"))
|
||||
End If
|
||||
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("생산량태양열") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 지열생산량() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
'MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
If MIdx = 0 Then '//0월이면 모든월의 합계를 반환한다.
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.생산E(i).지열생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(DR(0)("생산량지열"))
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("생산량지열") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 면적당생산량태양열() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
'MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
If MIdx = 0 Then '//0월이면 모든월의 합계를 반환한다.
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.생산E(i).면적당생산량태양열
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(DR(0)("면적당생산량태양열"))
|
||||
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("면적당생산량태양열") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 면적당생산량지열() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
'MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
If MIdx = 0 Then '//0월이면 모든월의 합계를 반환한다.
|
||||
Dim Res As Decimal = 0
|
||||
For i As Short = 1 To 12
|
||||
Res += Result.생산E(i).면적당생산량지열
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(DR(0)("면적당생산량지열"))
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("면적당생산량지열") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
355
ArinWarev1/Calculator/Result/C에너지분석.vb
Normal file
355
ArinWarev1/Calculator/Result/C에너지분석.vb
Normal file
@@ -0,0 +1,355 @@
|
||||
Public Class C에너지분석
|
||||
Public ZZone As String
|
||||
Public Mon As String
|
||||
Private ErrMsg As String = "월에너지분석이 계산되지 않았습니다"
|
||||
Private DSETR As DSR
|
||||
Private Result As CResult
|
||||
Public Sub New(ByRef pdsetr As DSR, ByRef presult As CResult, ByVal mIdx As Integer, Optional ByVal pZone As String = "00")
|
||||
DSETR = pdsetr
|
||||
Result = presult
|
||||
Me.ZZone = pZone
|
||||
Mon = "M" & Format(mIdx, "00")
|
||||
End Sub
|
||||
ReadOnly Property 에너지요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "에너지요구량")
|
||||
Return 0
|
||||
Else
|
||||
Return 난방에너지요구량열(CStr(IIf(Zone <> "00", Zone, ZZone))) + _
|
||||
난방에너지요구량공조환기(CStr(IIf(Zone <> "00", Zone, ZZone))) + _
|
||||
냉방에너지요구량열(CStr(IIf(Zone <> "00", Zone, ZZone))) + _
|
||||
냉방에너지요구량공조환기(CStr(IIf(Zone <> "00", Zone, ZZone))) + _
|
||||
조명에너지요구량(CStr(IIf(Zone <> "00", Zone, ZZone))) + _
|
||||
급탕에너지요구량(CStr(IIf(Zone <> "00", Zone, ZZone)))
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 면적당에너지요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Return Me.난방단위면적당요구량 + Me.냉방단위면적당요구량 + Me.조명단위면적당요구량 + Me.급탕단위면적당요구량
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 난방에너지요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Return Me.난방에너지요구량열(IIf(Zone <> "00", Zone, ZZone).ToString) + Me.난방에너지요구량공조환기(IIf(Zone <> "00", Zone, ZZone).ToString)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 난방단위면적당요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
If Result.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방에너지요구량 / Result.사용면적.H
|
||||
End If
|
||||
' Return Me.난방에너지요구량열(Zone) + Me.난방에너지요구량공조환기(Zone)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Property 난방에너지요구량열(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "난방에너지요구량열")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방요구량열"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "난방에너지요구량열")
|
||||
Else
|
||||
DR(0)("난방요구량열") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 난방에너지요구량공조환기(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "난방에너지요구량공조환기")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방요구량공조"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "난방에너지요구량공조환기")
|
||||
Else
|
||||
DR(0)("난방요구량공조") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property 냉방에너지요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Return Me.냉방에너지요구량열(CStr(IIf(Zone <> "00", Zone, ZZone))) + Me.냉방에너지요구량공조환기(CStr(IIf(Zone <> "00", Zone, ZZone)))
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 냉방단위면적당요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
If Result.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방에너지요구량 / Result.사용면적.C
|
||||
End If
|
||||
' Return Me.난방에너지요구량열(Zone) + Me.난방에너지요구량공조환기(Zone)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Property 냉방에너지요구량열(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
|
||||
|
||||
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "냉방에너지요구량열")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방요구량열"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "냉방에너지요구량열")
|
||||
Else
|
||||
DR(0)("냉방요구량열") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방에너지요구량공조환기(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "냉방에너지요구량공조환기")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방요구량공조"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "냉방에너지요구량공조환기")
|
||||
Else
|
||||
DR(0)("냉방요구량공조") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property 조명에너지요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "조명에너지요구량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("조명요구량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "조명에너지요구량")
|
||||
Else
|
||||
DR(0)("조명요구량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 조명단위면적당요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
If Result.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명에너지요구량 / Result.사용면적.L
|
||||
End If
|
||||
' Return Me.난방에너지요구량열(Zone) + Me.난방에너지요구량공조환기(Zone)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property 급탕에너지요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "급탕요구량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("급탕요구량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "급탕요구량")
|
||||
Else
|
||||
DR(0)("급탕요구량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 급탕단위면적당요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
If Result.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕에너지요구량 / Result.사용면적.W
|
||||
End If
|
||||
' Return Me.난방에너지요구량열(Zone) + Me.난방에너지요구량공조환기(Zone)
|
||||
End Get
|
||||
End Property
|
||||
Property 공조풍량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "공조풍량")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("공조풍량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "공조풍량")
|
||||
Else
|
||||
DR(0)("공조풍량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 공조에너지요구량난방(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "공조에너지요구량난방")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("공조요구량난방"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg, MsgBoxStyle.Information, "공조에너지요구량난방")
|
||||
Else
|
||||
DR(0)("공조요구량난방") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 공조에너지요구량냉방(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("공조요구량냉방"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("공조요구량냉방") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 공조에너지요구량가습(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("공조요구량가습"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("공조요구량가습") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 환기에너지요구량(Optional ByVal Zone As String = "00") As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone = "00", ZZone, Zone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("환기요구량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("환기요구량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Public Sub Calc()
|
||||
'//Zone 이 00일떄만 계산된다
|
||||
|
||||
'//여기데이터는 12개가 미리존재한다 그러므로 현재 속한 월말 계산하면된다
|
||||
'//현재 월 존에해당하는 데이터가없다면 생성해준다.
|
||||
Dim Drow As DSR.월별에너지분석Row
|
||||
If DSETR.월별에너지분석.Select("월='" & Mon & "' and 존='00'").GetUpperBound(0) = -1 Then
|
||||
Drow = DSETR.월별에너지분석.New월별에너지분석Row
|
||||
Drow.존 = "00"
|
||||
Drow.월 = Mon
|
||||
DSETR.월별에너지분석.Add월별에너지분석Row(Drow) '//기본줄을 추가함
|
||||
DSETR.AcceptChanges()
|
||||
End If
|
||||
|
||||
Dim a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 As Decimal
|
||||
a2 = 0 : a3 = 0 : a4 = 0 : a5 = 0 : a6 = 0
|
||||
a7 = 0 : a8 = 0 : a9 = 0 : a10 = 0 : a11 = 0 : a12 = 0
|
||||
For Each Dr As DSR.월별에너지분석Row In DSETR.월별에너지분석.Select("월='" & Mon & "' and 존 <> '00'", "존")
|
||||
'//존별로 에너지요구량 최상단 합데이터를 갱신한다.
|
||||
'Dr.에너지요구량 = Dr.난방요구량열 + Dr.난방요구량공조 + Dr.냉방요구량열 + Dr.냉방요구량공조 + Dr.조명요구량 + Dr.급탕요구량
|
||||
'a1 = a1 + Dr.에너지요구량
|
||||
a2 = a2 + Dr.난방요구량열
|
||||
a3 = a3 + Dr.난방요구량공조
|
||||
a4 = a4 + Dr.냉방요구량열
|
||||
a5 = a5 + Dr.냉방요구량공조
|
||||
a6 = a6 + Dr.조명요구량
|
||||
a7 = a7 + Dr.급탕요구량
|
||||
a8 = a8 + Dr.공조풍량
|
||||
a9 = a9 + Dr.공조요구량난방
|
||||
a10 = a10 + Dr.공조요구량냉방
|
||||
a11 = a11 + Dr.공조요구량가습
|
||||
a12 = a12 + Dr.환기요구량
|
||||
Next
|
||||
|
||||
'Me.에너지요구량 = a2 + a3 + a4 + a5 + a6 + a7 ㅇ건 Readonlye 로 계산한다.
|
||||
|
||||
Me.난방에너지요구량열 = a2
|
||||
Me.난방에너지요구량공조환기 = a3
|
||||
Me.냉방에너지요구량열 = a4
|
||||
Me.냉방에너지요구량공조환기 = a5
|
||||
Me.조명에너지요구량 = a6
|
||||
Me.급탕에너지요구량 = a7
|
||||
Me.공조풍량 = a8
|
||||
Me.공조에너지요구량난방 = a9
|
||||
Me.공조에너지요구량냉방 = a10
|
||||
Me.공조에너지요구량가습 = a11
|
||||
Me.환기에너지요구량 = a12
|
||||
' Next
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
401
ArinWarev1/Calculator/Result/C에너지소요량.vb
Normal file
401
ArinWarev1/Calculator/Result/C에너지소요량.vb
Normal file
@@ -0,0 +1,401 @@
|
||||
Public Class C에너지소요량
|
||||
|
||||
|
||||
Dim Midx As Integer
|
||||
Public Mon As String
|
||||
Private ErrMsg As String = "에너지소요량 계산되지 않았습니다"
|
||||
Private DSETR As DSR
|
||||
Private Result As CResult
|
||||
Public Sub New(ByRef pdsetr As DSR, ByRef presult As CResult, Optional ByVal pmIdx As Integer = 0)
|
||||
DSETR = pdsetr
|
||||
Result = presult
|
||||
Mon = "M" & Format(pmIdx, "00")
|
||||
Me.Midx = pmIdx
|
||||
End Sub
|
||||
|
||||
Public Sub Calc_Summary()
|
||||
If Midx <> 0 Then
|
||||
MsgBox("계산식은 0번 합계필드만 가능합니다.", MsgBoxStyle.Critical, "확인")
|
||||
Return
|
||||
End If
|
||||
Dim I10 As Decimal = 0
|
||||
Dim I20 As Decimal = 0
|
||||
Dim I30 As Decimal = 0
|
||||
Dim I40 As Decimal = 0
|
||||
Dim I50 As Decimal = 0
|
||||
Dim I60 As Decimal = 0
|
||||
|
||||
Dim IH As Decimal = 0
|
||||
Dim IC As Decimal = 0
|
||||
Dim IL As Decimal = 0
|
||||
Dim IW As Decimal = 0
|
||||
Dim IV As Decimal = 0
|
||||
|
||||
Dim I4 As Decimal = 0 '//난방
|
||||
Dim I5 As Decimal = 0 '//냉방
|
||||
Dim I6 As Decimal = 0 '//조명
|
||||
Dim I7 As Decimal = 0 '//급탕
|
||||
Dim I8 As Decimal = 0 '//환기
|
||||
|
||||
For i As Integer = 1 To 12
|
||||
'//12월을 다더해서 0번열에 기록한다.
|
||||
I10 += Result.E소요량(i).난방
|
||||
I20 += Result.E소요량(i).난방보조
|
||||
I30 += Result.E소요량(i).냉방
|
||||
I40 += Result.E소요량(i).냉방보조
|
||||
I50 += Result.E소요량(i).급탕
|
||||
I60 += Result.E소요량(i).급탕보조
|
||||
|
||||
IH += Result.E소요량(i).난방S
|
||||
IC += Result.E소요량(i).냉방S
|
||||
IL += Result.E소요량(i).조명S
|
||||
IW += Result.E소요량(i).급탕S
|
||||
IV += Result.E소요량(i).환기S
|
||||
|
||||
I4 += Result.일차E소요량(i).난방전력
|
||||
I5 += Result.일차E소요량(i).냉방전력
|
||||
I6 += Result.일차E소요량(i).조명전력
|
||||
I7 += Result.일차E소요량(i).급탕전력
|
||||
I8 += Result.일차E소요량(i).환기전력
|
||||
Next
|
||||
|
||||
Me.난방 = I10
|
||||
Me.난방보조 = I20
|
||||
Me.냉방 = I30
|
||||
Me.냉방보조 = I40
|
||||
Me.급탕 = I50
|
||||
Me.급탕보조 = I60
|
||||
|
||||
If (I4 + I5 + I6 + I7 + I8 <> 0) Then
|
||||
Me.난방S = IH - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I4
|
||||
Me.냉방S = IC - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I5
|
||||
Me.조명S = IL - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I6
|
||||
Me.급탕S = IW - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I7
|
||||
Me.환기S = IV - (Result.생산E(0).태양광전력생산량 + Result.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I8
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
ReadOnly Property 소요량() As Decimal
|
||||
Get
|
||||
Return 난방S + 냉방S + 조명S + 환기S + 급탕S
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 면적소요량() As Decimal
|
||||
Get
|
||||
Return 난방면적 + 냉방면적 + 조명면적 + 급탕면적 + 환기면적
|
||||
End Get
|
||||
|
||||
End Property
|
||||
Property 난방S() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방"))
|
||||
End If
|
||||
Else
|
||||
Return 난방 + 난방보조
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("난방") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property 난방() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("난방에너지소요량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 난방보조() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방보조에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("난방보조에너지소요량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 난방면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방S / Result.사용면적.H
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Property 냉방S() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방"))
|
||||
End If
|
||||
Else
|
||||
Return 냉방 + 냉방보조
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방에너지소요량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방보조() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방보조에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방보조에너지소요량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 냉방면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.C = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방S / Result.사용면적.C
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Property 조명S() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("조명"))
|
||||
End If
|
||||
Else
|
||||
Return Result.E분석(Midx).조명에너지요구량
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("조명") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 조명면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명S / Result.사용면적.L
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property 급탕S() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("급탕"))
|
||||
End If
|
||||
Else
|
||||
Return 급탕 + 급탕보조
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("급탕") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
|
||||
'#If DEBUG Then
|
||||
' Dim f As String = "c:\temp\1\급탕에너지소요량.txt"
|
||||
' Dim b As New System.Text.StringBuilder
|
||||
' If System.IO.File.Exists(f) = False Then
|
||||
' b.AppendLine("Mon 급탕에너지소요량")
|
||||
' End If
|
||||
' b.AppendLine(Mon + vbTab + DR(0)("급탕에너지소요량").ToString)
|
||||
' My.Computer.FileSystem.WriteAllText(f, b.ToString, True)
|
||||
'#End If
|
||||
|
||||
Return TOSG(DR(0)("급탕에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("급탕에너지소요량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕보조() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
|
||||
#If DEBUG Then
|
||||
'Dim f As String = "c:\temp\1\급탕보조에너지소요량.txt"
|
||||
'Dim b As New System.Text.StringBuilder
|
||||
'If System.IO.File.Exists(f) = False Then
|
||||
' b.AppendLine("Mon 급탕보조에너지소요량")
|
||||
'End If
|
||||
'b.AppendLine(Mon + vbTab + DR(0)("급탕보조에너지소요량").ToString)
|
||||
'My.Computer.FileSystem.WriteAllText(f, b.ToString, True)
|
||||
#End If
|
||||
|
||||
Return TOSG(DR(0)("급탕보조에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("급탕보조에너지소요량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 급탕면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
|
||||
'#If DEBUG Then
|
||||
' Dim f As String = "c:\temp\1\급탕면적.txt"
|
||||
' Dim b As New System.Text.StringBuilder
|
||||
' If System.IO.File.Exists(f) = False Then
|
||||
' b.AppendLine("급탕S 사용면적")
|
||||
' End If
|
||||
' b.AppendLine(급탕S.ToString() + vbTab + Result.사용면적.W.ToString)
|
||||
' My.Computer.FileSystem.WriteAllText(f, b.ToString, True)
|
||||
'#End If
|
||||
|
||||
Return 급탕S / Result.사용면적.W
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Property 환기S() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("환기"))
|
||||
End If
|
||||
Else
|
||||
Return Result.E분석(Midx).환기에너지요구량
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("환기") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 환기면적() As Decimal
|
||||
Get
|
||||
If Result.사용면적.V = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return 환기S / Result.사용면적.V
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
224
ArinWarev1/Calculator/Result/C에너지요구량.vb
Normal file
224
ArinWarev1/Calculator/Result/C에너지요구량.vb
Normal file
@@ -0,0 +1,224 @@
|
||||
Public Class C에너지요구량
|
||||
|
||||
Dim Midx As Integer
|
||||
Public Mon As String
|
||||
Private ErrMsg As String = "에너지요구량 계산되지 않았습니다"
|
||||
Private Result As CResult
|
||||
Public Sub New(ByRef presult As CResult, Optional ByVal pmIdx As Integer = 0)
|
||||
Result = presult
|
||||
Mon = "M" & Format(pmIdx, "00")
|
||||
Me.Midx = pmIdx
|
||||
End Sub
|
||||
|
||||
ReadOnly Property 요구량() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then '//누적데이터
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).요구량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return 난방요구량 + 냉방요구량 + 조명요구량 + 급탕요구량
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 면적당요구량() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then '//누적데이터
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).면적당요구량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return 난방면적 + 냉방면적 + 조명면적 + 급탕면적
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "난방요구량"
|
||||
ReadOnly Property 난방요구량() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then '//누적데이터
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).난방요구량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Me.난방열 + Me.난방공조
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 난방열() As Decimal
|
||||
Get '//월별 에너지분석에서 난방요구량
|
||||
If Midx = 0 Then
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E분석(i).난방에너지요구량열
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result.E분석(Midx).난방에너지요구량열
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 난방공조() As Decimal
|
||||
Get '//월별 에너지분석에서 난방요구량
|
||||
If Midx = 0 Then
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E분석(i).난방에너지요구량공조환기
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result.E분석(Midx).난방에너지요구량공조환기
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 난방면적() As Decimal
|
||||
Get '//월별 에너지분석에서 난방요구량
|
||||
If Midx = 0 Then
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).난방면적
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
If Result.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방요구량 / Result.사용면적.H
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "냉방요구량"
|
||||
ReadOnly Property 냉방요구량() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then '//누적데이터
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).냉방요구량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Me.냉방열 + Me.냉방공조
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방열() As Decimal
|
||||
Get '//월별 에너지분석에서 난방요구량
|
||||
If Midx = 0 Then
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E분석(i).냉방에너지요구량열
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result.E분석(Midx).냉방에너지요구량열
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방공조() As Decimal
|
||||
Get '//월별 에너지분석에서 난방요구량
|
||||
If Midx = 0 Then
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E분석(i).냉방에너지요구량공조환기
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result.E분석(Midx).냉방에너지요구량공조환기
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방면적() As Decimal
|
||||
Get '//월별 에너지분석에서 난방요구량
|
||||
If Midx = 0 Then
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).냉방면적
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
If Result.사용면적.C = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방요구량 / Result.사용면적.C
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "조명요구량"
|
||||
ReadOnly Property 조명요구량() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then '//누적데이터
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).조명요구량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result.E분석(Midx).조명에너지요구량
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 조명면적() As Decimal
|
||||
Get '//월별 에너지분석에서 난방요구량
|
||||
If Midx = 0 Then
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).조명면적
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
If Result.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명요구량 / Result.사용면적.L
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "급탕요구량"
|
||||
ReadOnly Property 급탕요구량() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then '//누적데이터
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).급탕요구량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result.E분석(Midx).급탕에너지요구량
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 급탕면적() As Decimal
|
||||
Get '//월별 에너지분석에서 난방요구량
|
||||
If Midx = 0 Then
|
||||
Dim R As Decimal = 0
|
||||
For i As Integer = 1 To 12
|
||||
R += Result.E요구량(i).급탕면적
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
If Result.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕요구량 / Result.사용면적.W
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
264
ArinWarev1/Calculator/Result/C최대냉난방부하.vb
Normal file
264
ArinWarev1/Calculator/Result/C최대냉난방부하.vb
Normal file
@@ -0,0 +1,264 @@
|
||||
|
||||
Public Class C최대냉난방부하
|
||||
Private DSETR As DSR
|
||||
Public Sub New(ByRef pdsetr As DSR) '//존은초기화값을 가지고 생성한다.
|
||||
DSETR = pdsetr
|
||||
End Sub
|
||||
Public Function Item(Optional ByVal ZoneCode As String = "00") As Citem
|
||||
Return New Citem(DSETR, ZoneCode)
|
||||
End Function
|
||||
|
||||
Public Sub Calc_Summary()
|
||||
'//Zone 이 00일떄만 계산된다
|
||||
|
||||
Dim a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 As Decimal
|
||||
a1 = 0 : a2 = 0 : a3 = 0 : a4 = 0 : a5 = 0 : a6 = 0
|
||||
a7 = 0 : a8 = 0 : a9 = 0 : a10 = 0
|
||||
Dim Exist As Boolean = False
|
||||
|
||||
For Each Dr As DSR.최대냉난방부하Row In DSETR.최대냉난방부하.Select("Zone <> '00'", "Zone")
|
||||
If Exist = False Then Exist = True
|
||||
' Dr.최대냉난방부하 = Dr.최대난방기기부하 + Dr.최대냉방기기부하
|
||||
a1 += Dr.최대난방기기부하
|
||||
a2 += Dr.최대난방실내부하
|
||||
'a3 += Dr.난방최대가동시간
|
||||
a4 += Dr.최대가열성능
|
||||
a5 += Dr.최대냉방기기부하
|
||||
a6 += Dr.최대냉방실내부하
|
||||
'a7 += Dr.냉방최대가동시간
|
||||
a8 += Dr.최대냉각성능
|
||||
a9 += Dr.최대가습성능
|
||||
a10 += Dr.공조풍량
|
||||
Next
|
||||
|
||||
If Exist = False Then
|
||||
MsgBox("각존별 계산이 되어있지않아서 값을 계산할 수 없습니다", MsgBoxStyle.Critical, "확인")
|
||||
Return
|
||||
End If
|
||||
|
||||
Me.Item("00").최대난방기기부하 = a1
|
||||
Me.Item("00").최대난방실내부하 = a2
|
||||
Me.Item("00").일일난방최대가동시간 = a3
|
||||
Me.Item("00").최대가열성능 = a4
|
||||
Me.Item("00").최대냉방기기부하 = a5
|
||||
Me.Item("00").최대냉방실내부하 = a6
|
||||
Me.Item("00").일일냉방최대가동시간 = a7
|
||||
Me.Item("00").최대냉각성능 = a8
|
||||
Me.Item("00").최대가습성능 = a9
|
||||
Me.Item("00").공조풍량 = a10
|
||||
|
||||
End Sub
|
||||
|
||||
Public Class Citem
|
||||
Private Zone As String
|
||||
Dim ErrMsg As String = "최대냉난방부하가 계산되지 않았습니다"
|
||||
Private DSETR As DSR
|
||||
Public Sub New(ByRef pdsetr As DSR, Optional ByVal pZone As String = "00") '//존은초기화값을 가지고 생성한다.
|
||||
DSETR = pdsetr
|
||||
Zone = pZone
|
||||
End Sub
|
||||
ReadOnly Property 최대냉난방부하() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(Me.최대난방기기부하 + Me.최대냉방기기부하)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Property 최대난방기기부하() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("최대난방기기부하"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("최대난방기기부하") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 최대난방실내부하() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("최대난방실내부하"))
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("최대난방실내부하") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 일일난방최대가동시간() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("난방최대가동시간"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("난방최대가동시간") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 최대가열성능() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("최대가열성능"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("최대가열성능") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 최대냉방기기부하() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("최대냉방기기부하"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("최대냉방기기부하") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 최대냉방실내부하() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("최대냉방실내부하"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("최대냉방실내부하") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 일일냉방최대가동시간() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("냉방최대가동시간"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방최대가동시간") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 최대냉각성능() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("최대냉각성능"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("최대냉각성능") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 최대가습성능() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("최대가습성능"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("최대가습성능") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 공조풍량() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(DR(0)("공조풍량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("공조풍량") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user