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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | SysAvailType | |||
character(len=*), | intent(in) | :: | SysAvailName | |||
integer, | intent(inout) | :: | SysAvailNum | |||
integer, | intent(in) | :: | PriAirSysNum | |||
integer, | intent(in) | :: | PreviousStatus | |||
integer, | intent(out) | :: | AvailStatus | |||
integer, | intent(in), | optional | :: | ZoneEquipType | ||
integer, | intent(in), | optional | :: | CompNum |
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 SimSysAvailManager(SysAvailType,SysAvailName,SysAvailNum,PriAirSysNum,PreviousStatus,AvailStatus,ZoneEquipType, CompNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN August 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE
! Loop over all the System Availability Managers and invoke the correct
! System Availability Manager algorithm.
! METHODOLOGY EMPLOYED:
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SysAvailType
! CHARACTER(len=*), INTENT(IN) :: SysAvailType
CHARACTER(len=*), INTENT(IN) :: SysAvailName
INTEGER, INTENT(INOUT) :: SysAvailNum
INTEGER, INTENT(IN) :: PriAirSysNum ! Primary Air System index. If being called for a ZoneHVAC:* component
! then a dummyvariable is passed in to this subroutine.
INTEGER, INTENT(IN) :: PreviousStatus
INTEGER, INTENT(OUT) :: AvailStatus
INTEGER, OPTIONAL, INTENT(IN) :: ZoneEquipType ! Type of ZoneHVAC:* equipment component
INTEGER, OPTIONAL, INTENT(IN) :: CompNum ! Index of ZoneHVAC:* equipment component
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
SELECT CASE(SysAvailType)
CASE(SysAvailMgr_Scheduled) ! 'AvailabilityManager:Scheduled'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,SchedSysAvailMgrData%Name,NumSchedSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcSchedSysAvailMgr(SysAvailNum,AvailStatus)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:Scheduled not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_ScheduledOn) ! 'AvailabilityManager:ScheduledOn'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,SchedOnSysAvailMgrData%Name,NumSchedOnSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcSchedOnSysAvailMgr(SysAvailNum,AvailStatus)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:ScheduledOn not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_ScheduledOff) ! 'AvailabilityManager:ScheduledOff'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,SchedOffSysAvailMgrData%Name,NumSchedOffSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcSchedOffSysAvailMgr(SysAvailNum,AvailStatus)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:ScheduledOff not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_NightCycle) ! 'AvailabilityManager:NightCycle'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,NCycSysAvailMgrData%Name,NumNCycSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcNCycSysAvailMgr(SysAvailNum,PriAirSysNum,AvailStatus, ZoneEquipType, CompNum)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:NightCycle not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_OptimumStart) ! 'AvailabilityManager:OptimumStart'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,OptStartSysAvailMgrData%Name,NumOptStartSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcOptStartSysAvailMgr(SysAvailNum,PriAirSysNum,AvailStatus, ZoneEquipType, CompNum)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:OptimumStart not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_NightVent) ! 'AvailabilityManager:NightVentilation'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,NVentSysAvailMgrData%Name,NumNVentSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcNVentSysAvailMgr(SysAvailNum,PriAirSysNum,AvailStatus,ZoneEquipType)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:NightVentilation not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_DiffThermo) ! 'AvailabilityManager:DifferentialThermostat'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,DiffTSysAvailMgrData%Name,NumDiffTSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcDiffTSysAvailMgr(SysAvailNum,PreviousStatus,AvailStatus)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:DifferentialThermostat not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_HiTempTOff) ! 'AvailabilityManager:HighTemperatureTurnOff'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,HiTurnOffSysAvailMgrData%Name,NumHiTurnOffSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcHiTurnOffSysAvailMgr(SysAvailNum,AvailStatus)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOff not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_HiTempTOn) ! 'AvailabilityManager:HighTemperatureTurnOn'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,HiTurnOnSysAvailMgrData%Name,NumHiTurnOnSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcHiTurnOnSysAvailMgr(SysAvailNum,AvailStatus)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOn not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_LoTempTOff) ! 'AvailabilityManager:LowTemperatureTurnOff'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,LoTurnOffSysAvailMgrData%Name,NumLoTurnOffSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcLoTurnOffSysAvailMgr(SysAvailNum,AvailStatus)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOff not found: '//TRIM(SysAvailName))
ENDIF
CASE(SysAvailMgr_LoTempTOn) ! 'AvailabilityManager:LowTemperatureTurnOn'
IF (SysAvailNum == 0) THEN
SysAvailNum = FindItemInList(SysAvailName,LoTurnOnSysAvailMgrData%Name,NumLoTurnOnSysAvailMgrs)
ENDIF
IF (SysAvailNum > 0) THEN
CALL CalcLoTurnOnSysAvailMgr(SysAvailNum,AvailStatus)
ELSE
CALL ShowFatalError('SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOn not found: '//TRIM(SysAvailName))
ENDIF
CASE DEFAULT
CALL ShowSevereError('AvailabilityManager Type not found: '//TRIM(TrimSigDigits(SysAvailType)))
CALL ShowContinueError('Occurs in Manager='//TRIM(SysAvailName))
CALL ShowFatalError('Preceding condition causes termination.')
END SELECT
RETURN
END SUBROUTINE SimSysAvailManager