| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | LoadCenterNum | 
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 UpdateLoadCenterRecords(LoadCenterNum)
            ! SUBROUTINE INFORMATION:
            !       AUTHOR:          B. Griffith
            !       DATE WRITTEN:    February 2008
            !       MODIFIED
            !       RE-ENGINEERED  na
            ! PURPOSE OF THIS SUBROUTINE:
            ! reporting
            ! METHODOLOGY EMPLOYED: na
            ! REFERENCES: na
            ! USE STATEMENTS: na
  IMPLICIT NONE
          ! SUBROUTINE ARGUMENT DEFINITIONS:
  INTEGER, INTENT(IN)   :: LoadCenterNum    ! Load Center index
          ! SUBROUTINE PARAMETER DEFINITIONS:
          ! na
          ! DERIVED TYPE DEFINITIONS
          ! na
          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
  INTEGER     :: InvertNum      ! inverter index
  INTEGER     :: StorNum        ! electrical storage index
        ! Flow
  IF (ElecLoadCenter(LoadCenterNum)%NumGenerators <= 0) RETURN
  SELECT CASE (ElecLoadCenter(LoadCenterNum)%BussType)
  CASE (ACBuss)
    ElecLoadCenter(LoadCenterNum)%ElectProdRate   = Sum(ElecLoadCenter(LoadCenterNum)%ElecGen%ElectProdRate)
    ElecLoadCenter(LoadCenterNum)%ElectricityProd = Sum(ElecLoadCenter(LoadCenterNum)%ElecGen%ElectricityProd)
  CASE (ACBussStorage)
    StorNum = ElecLoadCenter(LoadCenterNum)%StorageModelNum
    If (StorNum > 0) Then
      ElecLoadCenter(LoadCenterNum)%ElectProdRate  = Sum(ElecLoadCenter(LoadCenterNum)%ElecGen%ElectProdRate)  &
                                                    + ElecStorage(StorNum)%DrawnPower  - ElecStorage(StorNum)%StoredPower
      ElecLoadCenter(LoadCenterNum)%ElectricityProd = Sum(ElecLoadCenter(LoadCenterNum)%ElecGen%ElectricityProd) &
                                                    + ElecStorage(StorNum)%DrawnEnergy  - ElecStorage(StorNum)%StoredEnergy
    ENDIF
  CASE (DCBussInverter, DCBussInverterDCStorage)
    InvertNum = ElecLoadCenter(LoadCenterNum)%InverterModelNum
    IF (InvertNum > 0) THEN
      ElecLoadCenter(LoadCenterNum)%ElectProdRate   = Inverter(InvertNum)%ACPowerOut
      ElecLoadCenter(LoadCenterNum)%ElectricityProd = Inverter(InvertNum)%ACEnergyOut
    ENDIF
  CASE (DCBussInverterACStorage)
    StorNum = ElecLoadCenter(LoadCenterNum)%StorageModelNum
    InvertNum = ElecLoadCenter(LoadCenterNum)%InverterModelNum
    IF ((InvertNum > 0) .AND. (StorNum > 0)) THEN
      ElecLoadCenter(LoadCenterNum)%ElectProdRate   = Inverter(InvertNum)%ACPowerOut &
                                                   + ElecStorage(StorNum)%DrawnPower  - ElecStorage(StorNum)%StoredPower
      ElecLoadCenter(LoadCenterNum)%ElectricityProd = Inverter(InvertNum)%ACEnergyOut &
                                                 + ElecStorage(StorNum)%DrawnEnergy  - ElecStorage(StorNum)%StoredEnergy
    ENDIF
  END SELECT
  ElecLoadCenter(LoadCenterNum)%ThermalProdRate = Sum(ElecLoadCenter(LoadCenterNum)%ElecGen%ThermalProdRate)
  ElecLoadCenter(LoadCenterNum)%ThermalProd = Sum(ElecLoadCenter(LoadCenterNum)%ElecGen%ThermalProd)
RETURN
END SUBROUTINE UpdateLoadCenterRecords