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) | :: | ZoneEquipType | |||
integer, | intent(in) | :: | CompNum | |||
logical, | intent(inout) | :: | ErrorsFound |
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 GetZoneEqAvailabilityManager(ZoneEquipType, CompNum, ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN April 2011
! MODIFIED Chandan Sharma, March 2011/July 2012 - FSEC: Added zone sys avail managers
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine gets the availability manager data for the indicated type of zone
! equipment component.
! If not allocated, ZoneComp structure will be allocated to "Total num of zone equip types" and
! ZoneCompAvailMgrs structure will be allocated to "Total number of components of the indicated type".
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound ! true if certain errors are detected here
INTEGER, INTENT(IN) :: ZoneEquipType ! Type of ZoneHVAC:* component
INTEGER, INTENT(IN) :: CompNum ! Index of a particular ZoneHVAC:* component
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=MaxNameLength) :: AvailabilityListName ! name that should be an Availability Manager List Name
INTEGER :: Found
INTEGER :: Num
INTEGER :: CompNumAvailManagers ! Number of availability managers associated with a ZoneHVAC:* component
IF (GetAvailListsInput) THEN
CALL GetSysAvailManagerListInputs
GetAvailListsInput=.FALSE.
ENDIF
IF (ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%Input) THEN
AvailabilityListName = ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailManagerListName
Found=0
IF (NumAvailManagerLists > 0) &
Found = FindItemInList( AvailabilityListName, SysAvailMgrListData%Name,NumAvailManagerLists)
IF (Found /= 0) THEN
ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%NumAvailManagers = SysAvailMgrListData(Found)%NumItems
CompNumAvailManagers = ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%NumAvailManagers
ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailStatus = NoAction
ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%StartTime = 0
ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%StopTime = 0
IF (.NOT. ALLOCATED(ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailManagerName)) THEN
ALLOCATE(ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailManagerName(CompNumAvailManagers))
ALLOCATE(ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailManagerType(CompNumAvailManagers))
ALLOCATE(ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailManagerNum(CompNumAvailManagers))
ENDIF
DO Num=1,ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%NumAvailManagers
ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailManagerName(Num) = &
SysAvailMgrListData(Found)%AvailManagerName(Num)
ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailManagerNum(Num) = 0
ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailManagerType(Num) = &
SysAvailMgrListData(Found)%AvailManagerType(Num)
IF (ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%AvailManagerType(Num) == 0) THEN
CALL ShowSevereError('GetZoneEqAvailabilityManager: '// &
'Invalid AvailabilityManagerAssignmentList Type entered="'// &
TRIM(SysAvailMgrListData(Found)%cAvailManagerType(Num))//'".')
CALL ShowContinueError('Occurs in AvailabilityManagerAssignmentList="'// &
TRIM(SysAvailMgrListData(Found)%AvailManagerName(Num))//'".')
ErrorsFound=.TRUE.
ENDIF
IF (SysAvailMgrListData(Found)%AvailManagerType(Num) == SysAvailMgr_DiffThermo .and. &
Num /= ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%NumAvailManagers) THEN
CALL ShowWarningError('GetZoneEqAvailabilityManager: '// &
'AvailabilityManager:DifferentialThermostat="'// &
TRIM(SysAvailMgrListData(Found)%AvailManagerName(Num))//'".')
CALL ShowContinueError('...is not the last manager on the AvailabilityManagerAssignmentList. '// &
'Any remaining managers will not be used.')
CALL ShowContinueError('Occurs in AvailabilityManagerAssignmentList="'// &
TRIM(SysAvailMgrListData(Found)%AvailManagerName(Num))//'".')
ENDIF
END DO !End of Num Loop
END IF
ZoneComp(ZoneEquipType)%ZoneCompAvailMgrs(CompNum)%Input = .FALSE.
ENDIF
RETURN
END SUBROUTINE GetZoneEqAvailabilityManager