Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. 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.
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 InitSysAvailManagers
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN August 2001
! MODIFIED Brent Griffith, CR8376 initialize to NoAction every timestep
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for initializations of the System Availability Manager objects.
! METHODOLOGY EMPLOYED:
! Uses the status flags to trigger initializations.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataZoneEquipment, ONLY: ZoneEquipConfig, NumValidSysAvailZoneComponents
USE InputProcessor, ONLY: FindItemInList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! NA
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL,SAVE :: MyOneTimeFlag = .TRUE. ! One time flag
INTEGER :: SysAvailNum ! DO loop indes for Sys Avail Manager objects
INTEGER :: ControlledZoneNum ! Index into the ZoneEquipConfig array
INTEGER :: ZoneEquipType
INTEGER :: ZoneListNum
INTEGER :: ScanZoneListNum
INTEGER :: ZoneNum
INTEGER :: NumOfZoneLists=1
! One time initializations
IF (MyOneTimeFlag) THEN
DO SysAvailNum = 1,NumNCycSysAvailMgrs
IF (NCycSysAvailMgrData(SysAvailNum)%CtrlType .EQ. CycleOnControlZone) THEN
! set the controlled zone numbers
DO ControlledZoneNum = 1,NumOfZones
IF (ALLOCATED(ZoneEquipConfig)) THEN
IF (ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum .EQ. NCycSysAvailMgrData(SysAvailNum)%ZoneNum ) THEN
NCycSysAvailMgrData(SysAvailNum)%ControlledZoneNum = ControlledZoneNum
EXIT
END IF
ENDIF
END DO
END IF
END DO
DO SysAvailNum = 1,NumOptStartSysAvailMgrs
SELECT CASE (OptStartSysAvailMgrData(SysAvailNum)%CtrlType)
CASE (ControlZone)
! set the controlled zone numbers
DO ControlledZoneNum = 1,NumOfZones
IF (ALLOCATED(ZoneEquipConfig)) THEN
IF (ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum .EQ. OptStartSysAvailMgrData(SysAvailNum)%ZoneNum ) THEN
OptStartSysAvailMgrData(SysAvailNum)%ControlledZoneNum = ControlledZoneNum
EXIT
END IF
ENDIF
END DO
CASE (MaximumofZoneList)
!a zone list
ZoneListNum = FindItemInList(OptStartSysAvailMgrData(SysAvailNum)%ZoneListName,ZoneList%Name,NumOfZoneLists)
IF(ZoneListNum .GT. 0)THEN
OptStartSysAvailMgrData(SysAvailNum)%NumOfZones = ZoneList(ZoneListNum)%NumofZones
IF (.NOT. ALLOCATED(OptStartSysAvailMgrData(SysAvailNum)%ZonePtrs)) THEN
ALLOCATE (OptStartSysAvailMgrData(SysAvailNum)%ZonePtrs(1:ZoneList(ZoneListNum)%NumofZones))
ENDIF
DO ScanZoneListNum = 1, ZoneList(ZoneListNum)%NumofZones
ZoneNum = ZoneList(ZoneListNum)%Zone(ScanZoneListNum)
OptStartSysAvailMgrData(SysAvailNum)%ZonePtrs(ScanZoneListNum) = ZoneNum
END DO
END IF
END SELECT
END DO
DO SysAvailNum = 1,NumNVentSysAvailMgrs
! set the controlled zone numbers
DO ControlledZoneNum = 1,NumOfZones
IF (ALLOCATED(ZoneEquipConfig)) THEN
IF (ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum .EQ. NVentSysAvailMgrData(SysAvailNum)%ZoneNum ) THEN
NVentSysAvailMgrData(SysAvailNum)%ControlledZoneNum = ControlledZoneNum
EXIT
END IF
ENDIF
END DO
END DO
MyOneTimeFlag = .FALSE.
END IF ! end 1 time initializations
! initialize individual availability managers to no action (CR 8376 reporting issue)
IF (ALLOCATED(SchedSysAvailMgrData)) SchedSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(SchedOnSysAvailMgrData)) SchedOnSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(SchedOffSysAvailMgrData)) SchedOffSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(NCycSysAvailMgrData)) NCycSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(NVentSysAvailMgrData)) NVentSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(DiffTSysAvailMgrData)) DiffTSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(HiTurnOffSysAvailMgrData)) HiTurnOffSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(HiTurnOnSysAvailMgrData)) HiTurnOnSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(LoTurnOffSysAvailMgrData)) LoTurnOffSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(LoTurnOnSysAvailMgrData)) LoTurnOnSysAvailMgrData%AvailStatus = NoAction
IF (ALLOCATED(OptStartSysAvailMgrData)) OptStartSysAvailMgrData%AvailStatus = NoAction
! HybridVentSysAvailMgrData%AvailStatus= NoAction
DO ZoneEquipType = 1,NumValidSysAvailZoneComponents ! loop over the zone equipment types
IF(ALLOCATED(ZoneComp))THEN
IF(ZoneComp(ZoneEquipType)%TotalNumComp .GT. 0) &
ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs%AvailStatus = NoAction
ENDIF
ENDDO
RETURN
END SUBROUTINE InitSysAvailManagers