Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE UpdateWholeBuildingRecords
! SUBROUTINE INFORMATION:
! AUTHOR: Richard Liesen
! DATE WRITTEN: February 2003
! MODIFIED B. Griffith Mar. 2008 multiple load centers.
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! reporting
! METHODOLOGY EMPLOYED: na
! REFERENCES: formerly called UpdateRecords when there was only one load center
! now this reporting is for the entire model.
! USE STATEMENTS: na
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64), external :: GetInstantMeterValue
REAL(r64) :: ElecProducedCoGen = 0.0d0
REAL(r64) :: ElecProducedFacility = 0.0d0
REAL(r64) :: TotalPurchased = 0.0d0
REAL(r64) :: TotalSurplus = 0.0d0
REAL(r64) :: NetPurchased = 0.0d0
! Flow
ElecProducedCoGen=GetInstantMeterValue(ElecProducedCoGenIndex,2) !whole building
ElecProducedFacility = ElecProducedCoGen + WholeBldgElectSummary%ElecProducedPVRate*TimeStepSys*SecInHour & !whole building
+ WholeBldgElectSummary%ElecProducedWTRate*TimeStepSys*SecInHour
WholeBldgElectSummary%ElectricityProd = ElecProducedFacility !whole building
WholeBldgElectSummary%ElectProdRate = ElecProducedFacility/(TimeStepSys*SecInHour) !whole building
!Report the Total Electric Power Purchased [W], If negative then there is extra power to be sold or stored.
TotalPurchased = WholeBldgElectSummary%TotalElectricDemand - WholeBldgElectSummary%ElectProdRate
!Check this value against a tolerance to aid in reporting.
If(ABS(TotalPurchased) .lt. 0.0001d0) TotalPurchased = 0.0d0
If (TotalPurchased < 0.0d0) totalPurchased = 0.0d0 ! don't want negative purchased...
WholeBldgElectSummary%ElectPurchRate = TotalPurchased
!Report the Total Electric Energy Purchased [J]
WholeBldgElectSummary%ElectricityPurch = WholeBldgElectSummary%ElectPurchRate*TimeStepSys*SecInHour
!report the total electric surplus....
TotalSurplus =WholeBldgElectSummary%ElectProdRate - WholeBldgElectSummary%TotalElectricDemand
If(ABS(TotalSurplus) .lt. 0.0001d0) TotalSurplus = 0.0d0
If (TotalSurplus < 0.0d0) TotalSurplus = 0.0d0 ! don't want negative surplus
WholeBldgElectSummary%ElectSurplusRate = TotalSurplus
WholeBldgElectSummary%ElectricitySurplus =TotalSurplus*TimeStepSys*SecInHour
!report the net electricity , + is purchased, - is surplus
NetPurchased = WholeBldgElectSummary%TotalElectricDemand - WholeBldgElectSummary%ElectProdRate
WholeBldgElectSummary%ElectricityNetRate = NetPurchased
WholeBldgElectSummary%ElectricityNet = WholeBldgElectSummary%ElectricityNetRate*TimeStepSys*SecInHour
RETURN
END SUBROUTINE UpdateWholeBuildingRecords