initial commit
This commit is contained in:
732
ArinWarev1/Calculator-OD/Result/C1차소요량.vb
Normal file
732
ArinWarev1/Calculator-OD/Result/C1차소요량.vb
Normal file
@@ -0,0 +1,732 @@
|
||||
Public Class C1차소요량OD
|
||||
|
||||
Dim T As String = "1차소요량"
|
||||
|
||||
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 += Result1o.일차E소요량(i).난방등유
|
||||
i2 += Result1o.일차E소요량(i).난방LNG
|
||||
i3 += Result1o.일차E소요량(i).난방LPG
|
||||
i4 += Result1o.일차E소요량(i).난방지역
|
||||
i5 += Result1o.일차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 += Result1o.일차E소요량(i).냉방등유
|
||||
i2 += Result1o.일차E소요량(i).냉방LNG
|
||||
i3 += Result1o.일차E소요량(i).냉방LPG
|
||||
i4 += Result1o.일차E소요량(i).냉방지역난방열
|
||||
i5 += Result1o.일차E소요량(i).냉방지역냉방열
|
||||
i6 += Result1o.일차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 += Result1o.일차E소요량(i).급탕등유
|
||||
i2 += Result1o.일차E소요량(i).급탕LNG
|
||||
i3 += Result1o.일차E소요량(i).급탕LPG
|
||||
i4 += Result1o.일차E소요량(i).급탕지역
|
||||
i5 += Result1o.일차E소요량(i).급탕전력
|
||||
Next
|
||||
Me.급탕등유 = i1
|
||||
Me.급탕LNG = i2
|
||||
Me.급탕LPG = i3
|
||||
Me.급탕지역 = i4
|
||||
Me.급탕전력 = i5
|
||||
|
||||
End Sub
|
||||
Public Sub New(Optional ByVal pmIdx As Integer = 0)
|
||||
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 += Result1o.일차E소요량(i).소요량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Me.난방소요량 + Me.냉방소요량 + Me.급탕소요량 + Me.조명소요량 + Me.환기소요량 - (Result1o.생산E(MIdx).태양광전력생산량 * Result1o.E변환계수.전력) - (Result1o.생산E(MIdx).열병합전력생산량 * Result1o.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.난방등유 * Result1o.E변환계수.등유 + Me.난방LNG * Result1o.E변환계수.LNG + _
|
||||
Me.난방LPG * Result1o.E변환계수.LPG + Me.난방지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result1o.E변환계수.전력
|
||||
|
||||
Return R - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.난방전력 * Result1o.E변환계수.전력
|
||||
Else
|
||||
Return Me.난방등유 * Result1o.E변환계수.등유 + Me.난방LNG * Result1o.E변환계수.LNG + _
|
||||
Me.난방LPG * Result1o.E변환계수.LPG + Me.난방지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result1o.E변환계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 난방소요량2() As Decimal '//140112(?)
|
||||
Get
|
||||
|
||||
' Dim 건물용도 As Integer = CInt(DSET1.tbl_myoun.Select("존분류 <> '0'")(0)("존분류").ToString())
|
||||
If MIdx = 0 Then
|
||||
|
||||
If Pub.Program = EProgram.친환경평가 Then
|
||||
'//친환경
|
||||
Dim R As Decimal = Me.난방등유 * Result1o.E변환계수.지역난방 + Me.난방LNG * Result1o.E변환계수.지역난방 + _
|
||||
Me.난방LPG * Result1o.E변환계수.지역난방 + Me.난방지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result1o.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.난방전력 * Result1o.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
Else
|
||||
Dim R As Decimal = Me.난방등유 * Result1o.E변환계수.등유 + Me.난방LNG * Result1o.E변환계수.LNG + _
|
||||
Me.난방LPG * Result1o.E변환계수.LPG + Me.난방지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result1o.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.난방전력 * Result1o.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
|
||||
|
||||
If Pub.Program = EProgram.친환경평가 Then
|
||||
Return Me.난방등유 * Result1o.E변환계수.지역난방 + Me.난방LNG * Result1o.E변환계수.지역난방 + _
|
||||
Me.난방LPG * Result1o.E변환계수.지역난방 + Me.난방지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result1o.E변환계수.전력
|
||||
Else
|
||||
Return Me.난방등유 * Result1o.E변환계수.등유 + Me.난방LNG * Result1o.E변환계수.LNG + _
|
||||
Me.난방LPG * Result1o.E변환계수.LPG + Me.난방지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.난방전력 * Result1o.E변환계수.전력
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property 난방등유() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("난방등유"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("난방등유") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 난방LNG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("난방LNG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("난방LNG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 난방LPG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("난방LPG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("난방LPG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
'Property 난방펠렛() As Decimal
|
||||
' Get
|
||||
' Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
' If DR.GetUpperBound(0) = -1 Then
|
||||
' MsgBox(ErrMsg)
|
||||
' Return 0
|
||||
' Else
|
||||
' Return TOSG(T,DR(0)("난방펠렛"))
|
||||
' End If
|
||||
' End Get
|
||||
' Set(ByVal value As Decimal)
|
||||
' Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
' 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.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("난방지역"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
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.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("난방전력"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("난방전력") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 난방면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방소요량 / Result1o.사용면적.H
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 난방면적2() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방소요량2 / Result1o.사용면적.H
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "냉방"
|
||||
ReadOnly Property 냉방소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.냉방등유 * Result1o.E변환계수.등유 + Me.냉방LNG * Result1o.E변환계수.LNG + _
|
||||
Me.냉방LPG * Result1o.E변환계수.LPG + Me.냉방지역난방열 * Result1o.E변환계수.지역난방 + _
|
||||
Me.냉방지역냉방열 * Result1o.E변환계수.지역냉방 + Me.냉방전력 * Result1o.E변환계수.전력
|
||||
|
||||
Return R - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.냉방전력 * Result1o.E변환계수.전력
|
||||
Else
|
||||
Return Me.냉방등유 * Result1o.E변환계수.등유 + Me.냉방LNG * Result1o.E변환계수.LNG + _
|
||||
Me.냉방LPG * Result1o.E변환계수.LPG + Me.냉방지역난방열 * Result1o.E변환계수.지역난방 + _
|
||||
Me.냉방지역냉방열 * Result1o.E변환계수.지역냉방 + Me.냉방전력 * Result1o.E변환계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Property 냉방등유() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방등유"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방등유") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방LNG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방LNG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방LNG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방펠렛() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방펠렛"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방펠렛") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방LPG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방LPG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방LPG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방지역난방열() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방지역"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
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.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방지역2"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방지역2") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 냉방전력() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방전력"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("냉방전력") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 냉방면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.C = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방소요량 / Result1o.사용면적.C
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "급탕"
|
||||
ReadOnly Property 급탕소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.급탕등유 * Result1o.E변환계수.등유 + Me.급탕LNG * Result1o.E변환계수.LNG + _
|
||||
Me.급탕LPG * Result1o.E변환계수.LPG + Me.급탕지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result1o.E변환계수.전력
|
||||
|
||||
Return R - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.급탕전력 * Result1o.E변환계수.전력
|
||||
Else
|
||||
Return Me.급탕등유 * Result1o.E변환계수.등유 + Me.급탕LNG * Result1o.E변환계수.LNG + _
|
||||
Me.급탕LPG * Result1o.E변환계수.LPG + Me.급탕지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result1o.E변환계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 급탕소요량2() As Decimal
|
||||
Get
|
||||
' Dim 건물용도 As Integer = CInt(DSET1.tbl_myoun.Select("존분류 <> '0'")(0)("존분류").ToString())
|
||||
|
||||
|
||||
If MIdx = 0 Then
|
||||
If Pub.Program = EProgram.친환경평가 Then
|
||||
Dim R As Decimal = Me.급탕등유 * Result1o.E변환계수.지역난방 + Me.급탕LNG * Result1o.E변환계수.지역난방 + _
|
||||
Me.급탕LPG * Result1o.E변환계수.지역난방 + Me.급탕지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result1o.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.급탕전력 * Result1o.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Else
|
||||
Dim R As Decimal = Me.급탕등유 * Result1o.E변환계수.등유 + Me.급탕LNG * Result1o.E변환계수.LNG + _
|
||||
Me.급탕LPG * Result1o.E변환계수.LPG + Me.급탕지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result1o.E변환계수.전력
|
||||
Try
|
||||
Return R - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.급탕전력 * Result1o.E변환계수.전력
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If Pub.Program = EProgram.친환경평가 Then
|
||||
Return Me.급탕등유 * Result1o.E변환계수.지역난방 + Me.급탕LNG * Result1o.E변환계수.지역난방 + _
|
||||
Me.급탕LPG * Result1o.E변환계수.지역난방 + Me.급탕지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result1o.E변환계수.전력
|
||||
Else
|
||||
Return Me.급탕등유 * Result1o.E변환계수.등유 + Me.급탕LNG * Result1o.E변환계수.LNG + _
|
||||
Me.급탕LPG * Result1o.E변환계수.LPG + Me.급탕지역 * Result1o.E변환계수.지역난방 + _
|
||||
Me.급탕전력 * Result1o.E변환계수.전력
|
||||
End If
|
||||
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Property 급탕등유() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("급탕등유"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("급탕등유") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕LNG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("급탕LNG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("급탕LNG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕펠렛() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("급탕펠렛"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("급탕펠렛") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕LPG() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("급탕LPG"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("급탕LPG") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property 급탕지역() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("급탕지역"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
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.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("급탕전력"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량1Row = CType(DSETR1.에너지소요량1.Select("mon='" & Mon & "'"), DSR.에너지소요량1Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Else
|
||||
DR(0)("급탕전력") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property 급탕면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕소요량 / Result1o.사용면적.W
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 급탕면적2() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕소요량2 / Result1o.사용면적.W
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "조명부분(읽기전용)"
|
||||
ReadOnly Property 조명소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = 조명전력 * Result1o.E변환계수.전력
|
||||
|
||||
Return R - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.조명전력 * Result1o.E변환계수.전력
|
||||
Else
|
||||
Return 조명전력 * Result1o.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 += Result1o.일차E소요량(i).조명전력
|
||||
Next
|
||||
Return i1
|
||||
Else
|
||||
Return Result1o.E소요량(Me.MIdx).조명S
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 조명면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명소요량 / Result1o.사용면적.L
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "환기부분(읽기전용)"
|
||||
ReadOnly Property 환기소요량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = 환기전력 * Result1o.E변환계수.전력
|
||||
|
||||
Return R - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / _
|
||||
(Me.난방전력 + Me.냉방전력 + Me.급탕전력 + Me.조명전력 + Me.환기전력) * Me.환기전력 * Result1o.E변환계수.전력
|
||||
Else
|
||||
Return 환기전력 * Result1o.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 += Result1o.일차E소요량(i).환기전력
|
||||
Next
|
||||
Return i1
|
||||
Else
|
||||
Return Result1o.E소요량(Me.MIdx).환기S
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 환기면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.V = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.환기소요량 / Result1o.사용면적.V
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
425
ArinWarev1/Calculator-OD/Result/CCo2발생량.vb
Normal file
425
ArinWarev1/Calculator-OD/Result/CCo2발생량.vb
Normal file
@@ -0,0 +1,425 @@
|
||||
Public Class CCo2발생량OD
|
||||
Public Mon As String
|
||||
Private ErrMsg As String = "에너지소요량 계산되지 않았습니다"
|
||||
Private MIdx As Integer
|
||||
Public Sub New(Optional ByVal pmIdx As Integer = 0)
|
||||
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.난방전력
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.난방전력
|
||||
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 += Result1o.Co2발생량(i).난방등유
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).난방등유 * Result1o.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 += Result1o.Co2발생량(i).난방LNG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).난방LNG * Result1o.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 += Result1o.Co2발생량(i).난방LPG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).난방LPG * Result1o.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 += Result1o.Co2발생량(i).난방지역
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).난방지역 * Result1o.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 += Result1o.Co2발생량(i).난방전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).난방전력 * Result1o.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 += Result1o.Co2발생량(i).난방펠렛
|
||||
' Next
|
||||
' Return Res
|
||||
' Else
|
||||
' Return Result1o.일차E소요량(MIdx).난방펠렛 * Result1o.Co2배출계수.펠렛
|
||||
' End If
|
||||
' End Get
|
||||
'End Property
|
||||
ReadOnly Property 난방면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방발생량 / Result1o.사용면적.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
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.냉방전력
|
||||
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 += Result1o.Co2발생량(i).냉방등유
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).냉방등유 * Result1o.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 += Result1o.Co2발생량(i).냉방LNG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).냉방LNG * Result1o.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 += Result1o.Co2발생량(i).냉방펠렛
|
||||
' Next
|
||||
' Return Res
|
||||
' Else
|
||||
' Return Result1o.일차E소요량(MIdx).냉방펠렛 * Result1o.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 += Result1o.Co2발생량(i).냉방LPG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).냉방LPG * Result1o.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 += Result1o.Co2발생량(i).냉방지역난방열
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).냉방지역난방열 * Result1o.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 += Result1o.Co2발생량(i).냉방지역냉방열
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).냉방지역냉방열 * Result1o.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 += Result1o.Co2발생량(i).냉방전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).냉방전력 * Result1o.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 냉방면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.C = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방발생량 / Result1o.사용면적.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.급탕전력
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.급탕전력
|
||||
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 += Result1o.Co2발생량(i).급탕등유
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).급탕등유 * Result1o.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 += Result1o.Co2발생량(i).급탕펠렛
|
||||
' Next
|
||||
' Return Res
|
||||
' Else
|
||||
' Return Result1o.일차E소요량(MIdx).급탕펠렛 * Result1o.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 += Result1o.Co2발생량(i).급탕LNG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).급탕LNG * Result1o.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 += Result1o.Co2발생량(i).급탕LPG
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).급탕LPG * Result1o.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 += Result1o.Co2발생량(i).급탕지역
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).급탕지역 * Result1o.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 += Result1o.Co2발생량(i).급탕전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).급탕전력 * Result1o.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 급탕면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕발생량 / Result1o.사용면적.W
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 조명발생량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.조명전력
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.조명전력
|
||||
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 += Result1o.Co2발생량(i).조명전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).조명전력 * Result1o.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 조명면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명발생량 / Result1o.사용면적.L
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property 환기발생량() As Decimal
|
||||
Get
|
||||
If MIdx = 0 Then
|
||||
Dim R As Decimal = Me.환기전력
|
||||
Return R - (Me.저감량열병합 + Me.저감량태양광) / (Me.난방전력 + Me.냉방전력 + Me.조명전력 + Me.환기전력 + Me.급탕전력) * Me.환기전력
|
||||
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 += Result1o.Co2발생량(i).환기전력
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.일차E소요량(MIdx).환기전력 * Result1o.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property 환기면적() As Decimal
|
||||
Get
|
||||
If Result1o.사용면적.V = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.환기발생량 / Result1o.사용면적.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 += Result1o.Co2발생량(i).저감량태양광
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.생산E(MIdx).태양광전력생산량 * Result1o.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 += Result1o.Co2발생량(i).저감량열병합
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return Result1o.생산E(MIdx).열병합전력생산량 * Result1o.Co2배출계수.전력
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
43
ArinWarev1/Calculator-OD/Result/CResult.vb
Normal file
43
ArinWarev1/Calculator-OD/Result/CResult.vb
Normal file
@@ -0,0 +1,43 @@
|
||||
Public Class CResultOD
|
||||
|
||||
|
||||
' Public Zones As CZonesOD
|
||||
|
||||
Public E요구량(12) As C에너지요구량OD
|
||||
Public E소요량(12) As C에너지소요량OD
|
||||
Public 일차E소요량(12) As C1차소요량OD
|
||||
Public 생산E(12) As C생산에너지OD
|
||||
Public Co2발생량(12) As CCo2발생량OD
|
||||
Public E분석(12) As C에너지분석OD '//여기는 유일하게 0번 인덱스를 쓸수없다
|
||||
|
||||
Public Co2배출계수 As CCo2배출계수OD
|
||||
Public E변환계수 As C1차에너지변환계수OD
|
||||
|
||||
Public 사용면적 As C사용면적OD
|
||||
Public 최대부하 As C최대냉난방부하OD
|
||||
|
||||
Public Sub New()
|
||||
'//공용
|
||||
Co2배출계수 = New CCo2배출계수OD
|
||||
E변환계수 = New C1차에너지변환계수OD
|
||||
|
||||
'//단일
|
||||
사용면적 = New C사용면적OD
|
||||
최대부하 = New C최대냉난방부하OD
|
||||
|
||||
'//서브추가항목
|
||||
'Zones = New CZonesOD
|
||||
|
||||
'//월별로 들어가는 배열항목
|
||||
For i As Integer = 0 To 12
|
||||
Me.E요구량(i) = New C에너지요구량OD(i)
|
||||
Me.E소요량(i) = New C에너지소요량OD(i)
|
||||
Me.일차E소요량(i) = New C1차소요량OD(i)
|
||||
Me.생산E(i) = New C생산에너지OD(i)
|
||||
Me.Co2발생량(i) = New CCo2발생량OD(i)
|
||||
Me.E분석(i) = New C에너지분석OD(i)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
59
ArinWarev1/Calculator-OD/Result/CZones.vb
Normal file
59
ArinWarev1/Calculator-OD/Result/CZones.vb
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
' ''' <summary>
|
||||
' ''' 각존의 데이터를 참조한다
|
||||
' ''' </summary>
|
||||
'Public Class CZonesOD
|
||||
' Dim ErrMsg As String = "최대냉난방부하가 계산되지 않았습니다"
|
||||
' Public Items() As Citem
|
||||
|
||||
' Public Sub New() '//존은초기화값을 가지고 생성한다.
|
||||
' ReDim Items(Me.CountR) '//결과내의 존을 초기화한다.
|
||||
' Dim idx As Integer = 0
|
||||
' For Each It As DSR.최대냉난방부하Row In DSETR1.최대냉난방부하.Select("zone<>'00'")
|
||||
' Items(idx) = New Citem(idx, It.Zone)
|
||||
' idx += 1
|
||||
' Next
|
||||
' '//해당존의 코드값을 가지고 결과가 게산되어있따.
|
||||
' End Sub
|
||||
' Public Function Count() As Integer
|
||||
' Return DSET1.tbl_zone.Rows.Count '//현재 시스템의 존 카운터를 반환
|
||||
' End Function
|
||||
' Public Function CountR() As Integer
|
||||
' Return DSETR1.최대냉난방부하.Select("zone<>'00'").GetUpperBound(0) + 1 '//계산결과내의 존의 갯수를 반환
|
||||
' End Function
|
||||
|
||||
' Public Class Citem
|
||||
' Public Index As Integer
|
||||
' Public Code As String
|
||||
' Public 최대냉난방부하 As C최대냉난방부하OD.Citem
|
||||
' Public 월에너지분석(11) As C에너지분석OD '//이존의 12달의 내역을 참조한다.
|
||||
' Public Sub New(ByVal pidx As Integer, ByVal pcode As String)
|
||||
' Me.Index = pidx
|
||||
' Me.Code = pcode
|
||||
' 최대냉난방부하 = New C최대냉난방부하OD.Citem(pcode)
|
||||
|
||||
' Dim Idx As Integer = 0
|
||||
' For Each DR As C에너지분석OD In Me.월에너지분석
|
||||
' DR = New C에너지분석OD(Idx, pcode)
|
||||
' Idx += 1
|
||||
' Next
|
||||
' End Sub
|
||||
' Public Function Name() As String
|
||||
' Dim dR() As DataRow = DSET1.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(DSET1.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
|
||||
|
||||
76
ArinWarev1/Calculator-OD/Result/C범용.vb
Normal file
76
ArinWarev1/Calculator-OD/Result/C범용.vb
Normal file
@@ -0,0 +1,76 @@
|
||||
Public Class CCo2배출계수OD
|
||||
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차에너지변환계수OD
|
||||
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
|
||||
'//Return 0.614 '//170518
|
||||
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
|
||||
358
ArinWarev1/Calculator-OD/Result/C사용면적.vb
Normal file
358
ArinWarev1/Calculator-OD/Result/C사용면적.vb
Normal file
@@ -0,0 +1,358 @@
|
||||
''' <summary>
|
||||
''' 전체존의 사용면적을 계산및 확인(냉,난,조,급,환)
|
||||
''' </summary>
|
||||
''' <remarks>전체존의 사용면적을 계산및 확인(냉,난,조,급,환)</remarks>
|
||||
Public Class C사용면적OD
|
||||
|
||||
Dim T As String = "사용면적"
|
||||
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 난방
|
||||
''' </summary>
|
||||
''' <remarks>난방</remarks>
|
||||
Property H() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("H"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("H") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 냉방
|
||||
''' </summary>
|
||||
''' <remarks>냉방</remarks>
|
||||
Property C() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("C"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("C") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 조명
|
||||
''' </summary>
|
||||
''' <remarks>조명</remarks>
|
||||
Property L() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("L"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("L") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 급탕
|
||||
''' </summary>
|
||||
''' <remarks>급탕</remarks>
|
||||
Property W() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("W"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("W") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 환기
|
||||
''' </summary>
|
||||
''' <remarks>환기</remarks>
|
||||
Property V() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("V"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("V") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 난방_WF
|
||||
''' </summary>
|
||||
''' <remarks>난방</remarks>
|
||||
Property H_WF() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("H_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("H_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 냉방_WF
|
||||
''' </summary>
|
||||
''' <remarks>냉방</remarks>
|
||||
Property C_WF() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("C_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("C_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 조명_WF
|
||||
''' </summary>
|
||||
''' <remarks>조명</remarks>
|
||||
Property L_WF() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("L_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("L_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 급탕_WF
|
||||
''' </summary>
|
||||
''' <remarks>급탕</remarks>
|
||||
Property W_WF() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("W_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("W_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
''' <summary>
|
||||
''' 환기_WF
|
||||
''' </summary>
|
||||
''' <remarks>환기</remarks>
|
||||
Property V_WF() As Decimal
|
||||
Get
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DSETR1.사용면적(0)("V_WF"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
If DSETR1.사용면적.Rows.Count = 0 Then
|
||||
Log.AppendLine("사용면적이 계산되지않았습니다" & vbCrLf & "값을 가져올 수 없습니다")
|
||||
Else
|
||||
DSETR1.사용면적(0)("V_WF") = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overridable Sub Calc()
|
||||
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 DSETR1.사용면적.Rows.Count = 0 Then '//데결과가 없으면 신규줄을 기록한다.
|
||||
Dim Dr As DSR.사용면적Row = DSETR1.사용면적.New사용면적Row
|
||||
Dr.H = 0 : Dr.C = 0 : Dr.L = 0 : Dr.W = 0 : Dr.V = 0
|
||||
DSETR1.사용면적.Add사용면적Row(Dr)
|
||||
DSETR1.AcceptChanges()
|
||||
End If
|
||||
|
||||
'//A_H,C,W,L,V 의 누적값을 계산(사용면적) '//모든존을 대상으로
|
||||
|
||||
For Each Dr존 As DS.tbl_zoneRow In DSET1.tbl_zone.Select("code<>'0'", "code")
|
||||
Dim Dr프로필 As DS.tbl_profile_odRow = CType(DSET1.tbl_profile_od.Select("code='0'")(0), DS.tbl_profile_odRow)
|
||||
Dim 건물용도 As Integer = CInt(Dr존.code)
|
||||
|
||||
Dim offset As Integer = 1
|
||||
If Dr프로필.설명 = "판매시설" 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
|
||||
|
||||
'//냉난방(HC) 이거나 난방(H)일경우 난방면적 누적
|
||||
If Dr존.냉난방방식.IndexOf("난") <> -1 OrElse Dr존.냉난방공조.IndexOf("난") <> -1 Then
|
||||
A_H += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수)
|
||||
If 건물용도 < 10 Then '//주거일경우에
|
||||
|
||||
'//연
|
||||
|
||||
A_H_wf = A_H
|
||||
|
||||
Else
|
||||
day_year = TOSG(T, Dr프로필.day01) + TOSG(T, Dr프로필.day02) + TOSG(T, Dr프로필.day03) + TOSG(T, Dr프로필.day04) + TOSG(T, Dr프로필.day05) + TOSG(T, Dr프로필.day06) + TOSG(T, Dr프로필.day07) + TOSG(T, Dr프로필.day08) + TOSG(T, Dr프로필.day09) + TOSG(T, Dr프로필.day10) + TOSG(T, Dr프로필.day11) + TOSG(T, Dr프로필.day12)
|
||||
A_H_wf += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수) * (TOSG(T, Dr프로필.일일운전시간) * Math.Round(day_year / (11 * 250), 3))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'//냉난방(hC) 이거나 냉방(C)일경우 냉방면적 누적
|
||||
If Dr존.냉난방방식.IndexOf("냉") <> -1 OrElse Dr존.냉난방공조.IndexOf("냉") <> -1 Then
|
||||
A_C += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수)
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
A_C_wf = A_C
|
||||
Else
|
||||
day_year = TOSG(T, Dr프로필.day01) + TOSG(T, Dr프로필.day02) + TOSG(T, Dr프로필.day03) + TOSG(T, Dr프로필.day04) + TOSG(T, Dr프로필.day05) + TOSG(T, Dr프로필.day06) + TOSG(T, Dr프로필.day07) + TOSG(T, Dr프로필.day08) + TOSG(T, Dr프로필.day09) + TOSG(T, Dr프로필.day10) + TOSG(T, Dr프로필.day11) + TOSG(T, Dr프로필.day12)
|
||||
A_C_wf += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수) * (TOSG(T, Dr프로필.일일운전시간) * Math.Round(day_year / (11 * 250), 3))
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'//급탕요구량이 있다면 급탕면적 누적
|
||||
If TOSG(T, Dr프로필.일일급탕요구량) > 0 Then
|
||||
|
||||
A_W += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수)
|
||||
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
A_W_wf = A_W
|
||||
Else
|
||||
day_year = TOSG(T, Dr프로필.day01) + TOSG(T, Dr프로필.day02) + TOSG(T, Dr프로필.day03) + TOSG(T, Dr프로필.day04) + TOSG(T, Dr프로필.day05) + TOSG(T, Dr프로필.day06) + TOSG(T, Dr프로필.day07) + TOSG(T, Dr프로필.day08) + TOSG(T, Dr프로필.day09) + TOSG(T, Dr프로필.day10) + TOSG(T, Dr프로필.day11) + TOSG(T, Dr프로필.day12)
|
||||
A_W_wf += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수) * (TOSG(T, Dr프로필.일일급탕요구량) * Math.Round(day_year / (30 * 250), 3))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'//조명의 에너지부하율값이 있으면 조명면적 누적
|
||||
If Dr존.조명에너지부하율계산치 <> "0" OrElse Dr존.조명에너지부하율입력치 <> "0" Then
|
||||
A_L += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수)
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
'//가스를쓰는 난방 급탕은 계가 발생
|
||||
A_L_wf = A_L
|
||||
Else
|
||||
day_year = TOSG(T, Dr프로필.day01) + TOSG(T, Dr프로필.day02) + TOSG(T, Dr프로필.day03) + TOSG(T, Dr프로필.day04) + TOSG(T, Dr프로필.day05) + TOSG(T, Dr프로필.day06) + TOSG(T, Dr프로필.day07) + TOSG(T, Dr프로필.day08) + TOSG(T, Dr프로필.day09) + TOSG(T, Dr프로필.day10) + TOSG(T, Dr프로필.day11) + TOSG(T, Dr프로필.day12)
|
||||
A_L_wf += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수) * (TOSG(T, Dr프로필.일일사용시간) * Math.Round(day_year / (9 * 250), 3) * offset)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'//냉난방공조를 사용하고있다면 환기면적 누적(ZZ:기능없음)
|
||||
If (Dr존.냉난방공조 <> "기능없음") Then
|
||||
A_V += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수)
|
||||
|
||||
If 건물용도 < 10 Then
|
||||
A_V_wf = A_V
|
||||
Else
|
||||
day_year = TOSG(T, Dr프로필.day01) + TOSG(T, Dr프로필.day02) + TOSG(T, Dr프로필.day03) + TOSG(T, Dr프로필.day04) + TOSG(T, Dr프로필.day05) + TOSG(T, Dr프로필.day06) + TOSG(T, Dr프로필.day07) + TOSG(T, Dr프로필.day08) + TOSG(T, Dr프로필.day09) + TOSG(T, Dr프로필.day10) + TOSG(T, Dr프로필.day11) + TOSG(T, Dr프로필.day12)
|
||||
A_V_wf += TOSG(T, Dr존.면적) * TOSG(T, Dr존.입력존의수) * (TOSG(T, Dr프로필.일일운전시간) * Math.Round(day_year / (11 * 250), 3))
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'//저장소에 보관한다.
|
||||
Result1o.사용면적.H = A_H
|
||||
Result1o.사용면적.C = A_C
|
||||
Result1o.사용면적.L = A_L
|
||||
Result1o.사용면적.W = A_W
|
||||
Result1o.사용면적.V = A_V
|
||||
|
||||
'// 가중치 있는 사용면적 '2013.07.01
|
||||
Result1o.사용면적.H_WF = A_H_wf
|
||||
Result1o.사용면적.C_WF = A_C_wf
|
||||
Result1o.사용면적.L_WF = A_L_wf
|
||||
Result1o.사용면적.W_WF = A_W_wf
|
||||
Result1o.사용면적.V_WF = A_V_wf
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
272
ArinWarev1/Calculator-OD/Result/C생산에너지.vb
Normal file
272
ArinWarev1/Calculator-OD/Result/C생산에너지.vb
Normal file
@@ -0,0 +1,272 @@
|
||||
'// 0월합계에대한 처리는 하였음
|
||||
'// 완료일자 : 2010-03-08
|
||||
|
||||
Public Class C생산에너지OD
|
||||
|
||||
Dim T As String = "생산에너지"
|
||||
|
||||
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 += Result1o.생산E(i).태양광전력생산량
|
||||
' I2 += Result1o.생산E(i).열병합전력생산량
|
||||
' I3 += Result1o.생산E(i).태양열생산량
|
||||
' I4 += Result1o.생산E(i).지열생산량
|
||||
' I5 += Result1o.생산E(i).면적당생산량태양열
|
||||
' I6 += Result1o.생산E(i).면적당생산량지열
|
||||
' Next
|
||||
' Me.태양광전력생산량 = I1
|
||||
' Me.열병합전력생산량 = I2
|
||||
' Me.태양열생산량 = I3
|
||||
' Me.지열생산량 = I4
|
||||
' Me.면적당생산량태양열 = I5
|
||||
' Me.면적당생산량지열 = I6
|
||||
'End Sub
|
||||
|
||||
Public Sub New(Optional ByVal pmIdx As Integer = 0)
|
||||
MIdx = pmIdx
|
||||
Mon = "M" & Format(MIdx, "00")
|
||||
End Sub
|
||||
Property 태양광전력생산량() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR1.생산에너지.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 += Result1o.생산E(i).태양광전력생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(T, DR(0)("전력태양광"))
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR1.생산에너지.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(DSETR1.생산에너지.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 += Result1o.생산E(i).열병합전력생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(T, DR(0)("전력열병합"))
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR1.생산에너지.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(DSETR1.생산에너지.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 += Result1o.생산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(DSETR1.생산에너지.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(DSETR1.생산에너지.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 += Result1o.생산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(DSETR1.생산에너지.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(DSETR1.생산에너지.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 += Result1o.생산E(i).태양열생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(T, DR(0)("생산량태양열"))
|
||||
End If
|
||||
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR1.생산에너지.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(DSETR1.생산에너지.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 += Result1o.생산E(i).지열생산량
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(T, DR(0)("생산량지열"))
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR1.생산에너지.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(DSETR1.생산에너지.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 += Result1o.생산E(i).면적당생산량태양열
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(T, DR(0)("면적당생산량태양열"))
|
||||
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR1.생산에너지.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(DSETR1.생산에너지.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 += Result1o.생산E(i).면적당생산량지열
|
||||
Next
|
||||
Return Res
|
||||
Else
|
||||
Return TOSG(T, DR(0)("면적당생산량지열"))
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.생산에너지Row = CType(DSETR1.생산에너지.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-OD/Result/C에너지분석.vb
Normal file
355
ArinWarev1/Calculator-OD/Result/C에너지분석.vb
Normal file
@@ -0,0 +1,355 @@
|
||||
Public Class C에너지분석OD
|
||||
|
||||
Dim T As String = "에너지분석"
|
||||
|
||||
|
||||
Public ZZone As String
|
||||
Public Mon As String
|
||||
Private ErrMsg As String = "월에너지분석이 계산되지 않았습니다"
|
||||
Public Sub New(ByVal mIdx As Integer, Optional ByVal pZone As String = "00")
|
||||
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(DSETR1.월별에너지분석.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 Result1o.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방에너지요구량 / Result1o.사용면적.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(DSETR1.월별에너지분석.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(T, DR(0)("난방요구량열"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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(DSETR1.월별에너지분석.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(T, DR(0)("난방요구량공조"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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 Result1o.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방에너지요구량 / Result1o.사용면적.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(DSETR1.월별에너지분석.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(T, DR(0)("냉방요구량열"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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(DSETR1.월별에너지분석.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(T, DR(0)("냉방요구량공조"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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(DSETR1.월별에너지분석.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(T, DR(0)("조명요구량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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 Result1o.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명에너지요구량 / Result1o.사용면적.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(DSETR1.월별에너지분석.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(T, DR(0)("급탕요구량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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 Result1o.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕에너지요구량 / Result1o.사용면적.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(DSETR1.월별에너지분석.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(T, DR(0)("공조풍량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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(DSETR1.월별에너지분석.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(T, DR(0)("공조요구량난방"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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(DSETR1.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("공조요구량냉방"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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(DSETR1.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone <> "00", Zone, ZZone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("공조요구량가습"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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(DSETR1.월별에너지분석.Select("월='" & Mon & "' and 존='" & IIf(Zone = "00", ZZone, Zone).ToString & "'"), DSR.월별에너지분석Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("환기요구량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.월별에너지분석Row = CType(DSETR1.월별에너지분석.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 DSETR1.월별에너지분석.Select("월='" & Mon & "' and 존='00'").GetUpperBound(0) = -1 Then
|
||||
Drow = DSETR1.월별에너지분석.New월별에너지분석Row
|
||||
Drow.존 = "00"
|
||||
Drow.월 = Mon
|
||||
DSETR1.월별에너지분석.Add월별에너지분석Row(Drow) '//기본줄을 추가함
|
||||
DSETR1.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 DSETR1.월별에너지분석.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
|
||||
402
ArinWarev1/Calculator-OD/Result/C에너지소요량.vb
Normal file
402
ArinWarev1/Calculator-OD/Result/C에너지소요량.vb
Normal file
@@ -0,0 +1,402 @@
|
||||
Public Class C에너지소요량OD
|
||||
Dim T As String = "에너지소요량"
|
||||
|
||||
Dim Midx As Integer
|
||||
Public Mon As String
|
||||
Private ErrMsg As String = "에너지소요량 계산되지 않았습니다"
|
||||
Public Sub New(Optional ByVal pmIdx As Integer = 0)
|
||||
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 += Result1o.E소요량(i).난방
|
||||
I20 += Result1o.E소요량(i).난방보조
|
||||
I30 += Result1o.E소요량(i).냉방
|
||||
I40 += Result1o.E소요량(i).냉방보조
|
||||
I50 += Result1o.E소요량(i).급탕
|
||||
I60 += Result1o.E소요량(i).급탕보조
|
||||
|
||||
IH += Result1o.E소요량(i).난방S
|
||||
IC += Result1o.E소요량(i).냉방S
|
||||
IL += Result1o.E소요량(i).조명S
|
||||
IW += Result1o.E소요량(i).급탕S
|
||||
IV += Result1o.E소요량(i).환기S
|
||||
|
||||
I4 += Result1o.일차E소요량(i).난방전력
|
||||
I5 += Result1o.일차E소요량(i).냉방전력
|
||||
I6 += Result1o.일차E소요량(i).조명전력
|
||||
I7 += Result1o.일차E소요량(i).급탕전력
|
||||
I8 += Result1o.일차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 - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I4
|
||||
Me.냉방S = IC - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I5
|
||||
Me.조명S = IL - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I6
|
||||
Me.급탕S = IW - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I7
|
||||
Me.환기S = IV - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I8
|
||||
Else
|
||||
Me.난방S = IH
|
||||
Me.냉방S = IC
|
||||
Me.조명S = IL
|
||||
Me.급탕S = IW
|
||||
Me.환기S = IV
|
||||
End If
|
||||
|
||||
'If I4 = 0 Then
|
||||
' Me.난방S = 0
|
||||
'Else
|
||||
' Me.난방S = IH - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I4
|
||||
'End If
|
||||
'If I5 = 0 Then
|
||||
' Me.냉방S = 0
|
||||
'Else
|
||||
' Me.냉방S = IC - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I5
|
||||
'End If
|
||||
'If I6 = 0 Then
|
||||
' Me.조명S = 0
|
||||
'Else
|
||||
' Me.조명S = IL - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I6
|
||||
'End If
|
||||
'If I7 = 0 Then
|
||||
' Me.급탕S = 0
|
||||
'Else
|
||||
' Me.급탕S = IW - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산E(0).열병합전력생산량) / (I4 + I5 + I6 + I7 + I8) * I7
|
||||
'End If
|
||||
'If I8 = 0 Then
|
||||
' Me.환기S = 0
|
||||
'Else
|
||||
' Me.환기S = IV - (Result1o.생산E(0).태양광전력생산량 + Result1o.생산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(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("난방"))
|
||||
End If
|
||||
Else
|
||||
Return 난방 + 난방보조
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("난방에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("난방보조에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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 Result1o.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방S / Result1o.사용면적.H
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Property 냉방S() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방"))
|
||||
End If
|
||||
Else
|
||||
Return 냉방 + 냉방보조
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방보조에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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 Result1o.사용면적.C = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방S / Result1o.사용면적.C
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Property 조명S() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("조명"))
|
||||
End If
|
||||
Else
|
||||
Return Result1o.E분석(Midx).조명에너지요구량
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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 Result1o.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명S / Result1o.사용면적.L
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property 급탕S() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("급탕"))
|
||||
End If
|
||||
Else
|
||||
Return 급탕 + 급탕보조
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("급탕에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("급탕보조에너지소요량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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 Result1o.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return 급탕S / Result1o.사용면적.W
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property 환기S() As Decimal
|
||||
Get
|
||||
If Midx = 0 Then
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.Select("mon='" & Mon & "'"), DSR.에너지소요량Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("환기"))
|
||||
End If
|
||||
Else
|
||||
Return Result1o.E분석(Midx).환기에너지요구량
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.에너지소요량Row = CType(DSETR1.에너지소요량.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 Result1o.사용면적.V = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return 환기S / Result1o.사용면적.V
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
222
ArinWarev1/Calculator-OD/Result/C에너지요구량.vb
Normal file
222
ArinWarev1/Calculator-OD/Result/C에너지요구량.vb
Normal file
@@ -0,0 +1,222 @@
|
||||
Public Class C에너지요구량OD
|
||||
|
||||
Dim Midx As Integer
|
||||
Public Mon As String
|
||||
Private ErrMsg As String = "에너지요구량 계산되지 않았습니다"
|
||||
Public Sub New(Optional ByVal pmIdx As Integer = 0)
|
||||
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 += Result1o.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 += Result1o.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 += Result1o.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 += Result1o.E분석(i).난방에너지요구량열
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result1o.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 += Result1o.E분석(i).난방에너지요구량공조환기
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result1o.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 += Result1o.E요구량(i).난방면적
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
If Result1o.사용면적.H = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.난방요구량 / Result1o.사용면적.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 += Result1o.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 += Result1o.E분석(i).냉방에너지요구량열
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result1o.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 += Result1o.E분석(i).냉방에너지요구량공조환기
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result1o.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 += Result1o.E요구량(i).냉방면적
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
If Result1o.사용면적.C = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.냉방요구량 / Result1o.사용면적.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 += Result1o.E요구량(i).조명요구량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result1o.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 += Result1o.E요구량(i).조명면적
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
If Result1o.사용면적.L = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.조명요구량 / Result1o.사용면적.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 += Result1o.E요구량(i).급탕요구량
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
Return Result1o.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 += Result1o.E요구량(i).급탕면적
|
||||
Next
|
||||
Return R
|
||||
Else
|
||||
If Result1o.사용면적.W = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return Me.급탕요구량 / Result1o.사용면적.W
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
268
ArinWarev1/Calculator-OD/Result/C최대냉난방부하.vb
Normal file
268
ArinWarev1/Calculator-OD/Result/C최대냉난방부하.vb
Normal file
@@ -0,0 +1,268 @@
|
||||
|
||||
Public Class C최대냉난방부하OD
|
||||
|
||||
Dim T As String = "최대냉난방부하"
|
||||
|
||||
Public Sub New() '//존은초기화값을 가지고 생성한다.
|
||||
|
||||
End Sub
|
||||
Public Function Item(Optional ByVal ZoneCode As String = "00") As Citem
|
||||
Return New Citem(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 DSETR1.최대냉난방부하.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
|
||||
|
||||
Dim T As String = "최대냉난방부하"
|
||||
|
||||
Private Zone As String
|
||||
Dim ErrMsg As String = "최대냉난방부하가 계산되지 않았습니다"
|
||||
|
||||
Public Sub New(Optional ByVal pZone As String = "00") '//존은초기화값을 가지고 생성한다.
|
||||
Zone = pZone
|
||||
End Sub
|
||||
ReadOnly Property 최대냉난방부하() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, Me.최대난방기기부하 + Me.최대냉방기기부하)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Property 최대난방기기부하() As Decimal
|
||||
Get
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("최대난방기기부하"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("최대난방실내부하"))
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("난방최대가동시간"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("최대가열성능"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("최대냉방기기부하"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("최대냉방실내부하"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("냉방최대가동시간"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("최대냉각성능"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("최대가습성능"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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(DSETR1.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row())
|
||||
If DR.GetUpperBound(0) = -1 Then
|
||||
MsgBox(ErrMsg)
|
||||
Return 0
|
||||
Else
|
||||
Return TOSG(T, DR(0)("공조풍량"))
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Decimal)
|
||||
Dim DR() As DSR.최대냉난방부하Row = CType(DSETR1.최대냉난방부하.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