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) | :: | ControlledZoneNum | |||
integer, | intent(in) | :: | ActualZoneNum |
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 SetZoneEquipSimOrder(ControlledZoneNum, ActualZoneNum)
! SUBROUTINE INFORMATION:
! AUTHOR Russ Taylor
! DATE WRITTEN May 1997
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Set simulation priorities based on user specified priorities and
! required conditions (heating or cooling).
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataZoneEnergyDemands, ONLY: ZoneSysEnergyDemand
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ControlledZoneNum
INTEGER, INTENT(IN) :: ActualZoneNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=MaxNameLength) :: EquipTypeTemp
CHARACTER(len=MaxNameLength) :: EquipNameTemp
INTEGER :: EquipTypeNum
INTEGER :: EquipPtrTemp
INTEGER :: ComparedEquipTypeNum
INTEGER :: TempNum
INTEGER :: CurEqHeatingPriority ! Used to make sure "optimization features" on compilers don't defeat purpose of this routine
INTEGER :: CurEqCoolingPriority ! Used to make sure "optimization features" on compilers don't defeat purpose of this routine
INTEGER :: NumOfEquipTypes ! For improved readability
NumOfEquipTypes = ZoneEquipList(ControlledZoneNum)%NumOfEquipTypes
PrioritySimOrder%EquipType=' '
PrioritySimOrder%EquipType_Num=0
PrioritySimOrder%EquipName=' '
PrioritySimOrder%EquipPtr=0
PrioritySimOrder(1:NumOfEquipTypes)%EquipType = ZoneEquipList(ControlledZoneNum)%EquipType(1:NumOfEquipTypes)
PrioritySimOrder(1:NumOfEquipTypes)%EquipName = ZoneEquipList(ControlledZoneNum)%EquipName(1:NumOfEquipTypes)
PrioritySimOrder(1:NumOfEquipTypes)%EquipType_Num = ZoneEquipList(ControlledZoneNum)%EquipType_Num(1:NumOfEquipTypes)
PrioritySimOrder(1:NumOfEquipTypes)%CoolingPriority = ZoneEquipList(ControlledZoneNum)%CoolingPriority(1:NumOfEquipTypes)
PrioritySimOrder(1:NumOfEquipTypes)%HeatingPriority = ZoneEquipList(ControlledZoneNum)%HeatingPriority(1:NumOfEquipTypes)
PrioritySimOrder(1:NumOfEquipTypes)%EquipPtr = DefaultSimOrder(1:NumOfEquipTypes)
DO EquipTypeNum = 1, NumOfEquipTypes
CurEqHeatingPriority = PrioritySimOrder(EquipTypeNum)%HeatingPriority
CurEqCoolingPriority = PrioritySimOrder(EquipTypeNum)%CoolingPriority
DO ComparedEquipTypeNum = EquipTypeNum, NumOfEquipTypes
IF (CurEqCoolingPriority > PrioritySimOrder(ComparedEquipTypeNum)%CoolingPriority .AND. &
ZoneSysEnergyDemand(ActualZoneNum)%RemainingOutputRequired .LT. 0.0d0 &
.OR. &
CurEqHeatingPriority > PrioritySimOrder(ComparedEquipTypeNum)%HeatingPriority .AND. &
ZoneSysEnergyDemand(ActualZoneNum)%RemainingOutputRequired .GE. 0.0d0) THEN
EquipTypeTemp = PrioritySimOrder(EquipTypeNum)%EquipType
PrioritySimOrder(EquipTypeNum)%EquipType = PrioritySimOrder(ComparedEquipTypeNum)%EquipType
PrioritySimOrder(ComparedEquipTypeNum)%EquipType = EquipTypeTemp
EquipNameTemp = PrioritySimOrder(EquipTypeNum)%EquipName
PrioritySimOrder(EquipTypeNum)%EquipName = PrioritySimOrder(ComparedEquipTypeNum)%EquipName
PrioritySimOrder(ComparedEquipTypeNum)%EquipName = EquipNameTemp
EquipPtrTemp = PrioritySimOrder(EquipTypeNum)%EquipPtr
PrioritySimOrder(EquipTypeNum)%EquipPtr = PrioritySimOrder(ComparedEquipTypeNum)%EquipPtr
PrioritySimOrder(ComparedEquipTypeNum)%EquipPtr = EquipPtrTemp
EquipPtrTemp = PrioritySimOrder(EquipTypeNum)%EquipType_Num
PrioritySimOrder(EquipTypeNum)%EquipType_Num = PrioritySimOrder(ComparedEquipTypeNum)%EquipType_Num
PrioritySimOrder(ComparedEquipTypeNum)%EquipType_Num = EquipPtrTemp
TempNum = PrioritySimOrder(EquipTypeNum)%CoolingPriority
PrioritySimOrder(EquipTypeNum)%CoolingPriority = PrioritySimOrder(ComparedEquipTypeNum)%CoolingPriority
PrioritySimOrder(ComparedEquipTypeNum)%CoolingPriority = TempNum
CurEqCoolingPriority = PrioritySimOrder(EquipTypeNum)%CoolingPriority
TempNum = PrioritySimOrder(EquipTypeNum)%HeatingPriority
PrioritySimOrder(EquipTypeNum)%HeatingPriority = PrioritySimOrder(ComparedEquipTypeNum)%HeatingPriority
PrioritySimOrder(ComparedEquipTypeNum)%HeatingPriority = TempNum
CurEqHeatingPriority = PrioritySimOrder(EquipTypeNum)%HeatingPriority
END IF
END DO
END DO
RETURN
END SUBROUTINE SetZoneEquipSimOrder