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) | :: | SetPtMgrNum |
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 SetupMeteredVarsForSetPt(SetPtMgrNum)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN Sep 2013
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! For the Ideal Cond reset setpoint manager, this sets up the
! report variables used during the calculation.
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE DataPlant
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SetPtMgrNum ! number of this setpoint manager (only Ideal Cond Reset)
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
INTERFACE GetNumMeteredVariables
FUNCTION GetNumMeteredVariables(ComponentType,ComponentName) RESULT(NumVariables)
CHARACTER(len=*), INTENT(IN) :: ComponentType ! Given Component Type
CHARACTER(len=*), INTENT(IN) :: ComponentName ! Given Component Name (user defined)
INTEGER :: NumVariables
END FUNCTION
END INTERFACE
INTERFACE GetMeteredVariables
SUBROUTINE GetMeteredVariables(ComponentType,ComponentName,VarIndexes,VarTypes,IndexTypes, &
UnitsStrings,ResourceTypes,EndUses,Groups,Names,NumFound,VarIDs)
CHARACTER(len=*), INTENT(IN) :: ComponentType ! Given Component Type
CHARACTER(len=*), INTENT(IN) :: ComponentName ! Given Component Name (user defined)
INTEGER, DIMENSION(:), INTENT(OUT) :: VarIndexes ! Variable Numbers
INTEGER, DIMENSION(:), INTENT(OUT) :: VarTypes ! Variable Types (1=integer, 2=real, 3=meter)
INTEGER, DIMENSION(:), INTENT(OUT) :: IndexTypes ! Variable Index Types (1=Zone,2=HVAC)
CHARACTER(len=*), DIMENSION(:), INTENT(OUT) :: UnitsStrings ! UnitsStrings for each variable
INTEGER, DIMENSION(:), INTENT(OUT) :: ResourceTypes ! ResourceTypes for each variable
CHARACTER(len=*), DIMENSION(:), &
OPTIONAL, INTENT(OUT) :: EndUses ! EndUses for each variable
CHARACTER(len=*), DIMENSION(:), &
OPTIONAL, INTENT(OUT) :: Groups ! Groups for each variable
CHARACTER(len=*), DIMENSION(:), &
OPTIONAL, INTENT(OUT) :: Names ! Variable Names for each variable
INTEGER, OPTIONAL, INTENT(OUT) :: NumFound ! Number Found
INTEGER, DIMENSION(:), OPTIONAL, INTENT(OUT) :: VarIDs ! Variable Report Numbers
END SUBROUTINE
END INTERFACE
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=MaxNameLength) :: TypeOfComp
CHARACTER(len=MaxNameLength) :: NameOfComp
INTEGER, ALLOCATABLE, DIMENSION(:) :: VarIndexes ! Variable Numbers
INTEGER, ALLOCATABLE, DIMENSION(:) :: VarTypes ! Variable Types (1=integer, 2=real, 3=meter)
INTEGER, ALLOCATABLE, DIMENSION(:) :: IndexTypes ! Variable Index Types (1=Zone,2=HVAC)
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: UnitsStrings ! UnitsStrings for each variable
INTEGER, ALLOCATABLE, DIMENSION(:) :: ResourceTypes ! ResourceTypes for each variable
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: EndUses ! EndUses for each variable
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: Groups ! Groups for each variable
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: Names ! Variable Names for each variable
INTEGER :: NumVariables
INTEGER :: NumFound
INTEGER :: ChillerTypeNum = 0 ! Chiller type number
INTEGER :: ChillerLoopNum = 0 ! Chiller loop number
INTEGER :: ChillerBranchNum = 0 ! Chiller branch number
INTEGER :: ChillerNum = 0 ! Chiller number
INTEGER :: TowerLoopNum = 0 ! Tower loop number
INTEGER :: TowerBranchNum = 0 ! Tower branch number
INTEGER :: CondLoopNum = 0 ! Condenser loop number
INTEGER :: TowerNum = 0 ! Tower number
INTEGER :: ChilledPumpBranchNum = 0 ! Chilled water pump branch number
INTEGER :: ChilledPumpNum = 0 ! Chilled water pump number
INTEGER :: CondPumpBranchNum = 0 ! Condenser water pump branch number
INTEGER :: CondPumpNum = 0 ! Condenser pump number
ChillerTypeNum = IdealCondEntSetPtMgr(SetPtMgrNum)%TypeNum
ChillerLoopNum = IdealCondEntSetPtMgr(SetPtMgrNum)%LoopIndexPlantSide
ChillerBranchNum = IdealCondEntSetPtMgr(SetPtMgrNum)%BranchIndexPlantSide
ChillerNum = IdealCondEntSetPtMgr(SetPtMgrNum)%ChillerIndexPlantSide
TowerLoopNum = IdealCondEntSetPtMgr(SetPtMgrNum)%CondLoopNum
CondLoopNum = IdealCondEntSetPtMgr(SetPtMgrNum)%CondLoopNum
TowerBranchNum = IdealCondEntSetPtMgr(SetPtMgrNum)%CondBranchNum
TowerNum = IdealCondEntSetPtMgr(SetPtMgrNum)%TowerNum
ChilledPumpBranchNum = IdealCondEntSetPtMgr(SetPtMgrNum)%ChilledPumpBranchNum
ChilledPumpNum = IdealCondEntSetPtMgr(SetPtMgrNum)%ChilledPumpNum
CondPumpBranchNum = IdealCondEntSetPtMgr(SetPtMgrNum)%CondPumpBranchNum
CondPumpNum = IdealCondEntSetPtMgr(SetPtMgrNum)%CondPumpNum
TypeOfComp = PlantLoop(ChillerLoopNum)%LoopSide(SupplySide)%Branch(ChillerBranchNum)%Comp(ChillerNum)%TypeOf
NameOfComp = PlantLoop(ChillerLoopNum)%LoopSide(SupplySide)%Branch(ChillerBranchNum)%Comp(ChillerNum)%Name
NumVariables=GetNumMeteredVariables(TypeOfComp,NameOfComp)
ALLOCATE (VarIndexes(NumVariables))
ALLOCATE (VarTypes(NumVariables))
ALLOCATE (IndexTypes(NumVariables))
ALLOCATE (UnitsStrings(NumVariables))
ALLOCATE (ResourceTypes(NumVariables))
ALLOCATE (EndUses(NumVariables))
ALLOCATE (Groups(NumVariables))
ALLOCATE (Names(NumVariables))
CALL GetMeteredVariables(TypeOfComp, NameOfComp, &
VarIndexes, VarTypes, &
IndexTypes, UnitsStrings, &
ResourceTypes, EndUses, Groups, Names, NumFound)
IdealCondEntSetPtMgr(SetPtMgrNum)%ChllrVarType = VarTypes(1)
IdealCondEntSetPtMgr(SetPtMgrNum)%ChllrVarIndex = VarIndexes(1)
DEALLOCATE (VarIndexes)
DEALLOCATE (VarTypes)
DEALLOCATE (IndexTypes)
DEALLOCATE (UnitsStrings)
DEALLOCATE (ResourceTypes)
DEALLOCATE (EndUses)
DEALLOCATE (Groups)
DEALLOCATE (Names)
TypeOfComp = PlantLoop(ChillerLoopNum)%LoopSide(SupplySide)%Branch(ChilledPumpBranchNum)%Comp(ChilledPumpNum)%TypeOf
NameOfComp = PlantLoop(ChillerLoopNum)%LoopSide(SupplySide)%Branch(ChilledPumpBranchNum)%Comp(ChilledPumpNum)%Name
NumVariables=GetNumMeteredVariables(TypeOfComp,NameOfComp)
ALLOCATE (VarIndexes(NumVariables))
ALLOCATE (VarTypes(NumVariables))
ALLOCATE (IndexTypes(NumVariables))
ALLOCATE (UnitsStrings(NumVariables))
ALLOCATE (ResourceTypes(NumVariables))
ALLOCATE (EndUses(NumVariables))
ALLOCATE (Groups(NumVariables))
ALLOCATE (Names(NumVariables))
CALL GetMeteredVariables(TypeOfComp, NameOfComp, &
VarIndexes, VarTypes, &
IndexTypes, UnitsStrings, &
ResourceTypes, EndUses, Groups, Names, NumFound)
IdealCondEntSetPtMgr(SetPtMgrNum)%ChlPumpVarType = VarTypes(1)
IdealCondEntSetPtMgr(SetPtMgrNum)%ChlPumpVarIndex = VarIndexes(1)
DEALLOCATE (VarIndexes)
DEALLOCATE (VarTypes)
DEALLOCATE (IndexTypes)
DEALLOCATE (UnitsStrings)
DEALLOCATE (ResourceTypes)
DEALLOCATE (EndUses)
DEALLOCATE (Groups)
DEALLOCATE (Names)
TypeOfComp = PlantLoop(TowerLoopNum)%LoopSide(SupplySide)%Branch(TowerBranchNum)%Comp(TowerNum)%TypeOf
NameOfComp = PlantLoop(TowerLoopNum)%LoopSide(SupplySide)%Branch(TowerBranchNum)%Comp(TowerNum)%Name
NumVariables=GetNumMeteredVariables(TypeOfComp,NameOfComp)
ALLOCATE (VarIndexes(NumVariables))
ALLOCATE (VarTypes(NumVariables))
ALLOCATE (IndexTypes(NumVariables))
ALLOCATE (UnitsStrings(NumVariables))
ALLOCATE (ResourceTypes(NumVariables))
ALLOCATE (EndUses(NumVariables))
ALLOCATE (Groups(NumVariables))
ALLOCATE (Names(NumVariables))
CALL GetMeteredVariables(TypeOfComp, NameOfComp, &
VarIndexes, VarTypes, &
IndexTypes, UnitsStrings, &
ResourceTypes, EndUses, Groups, Names, NumFound)
IdealCondEntSetPtMgr(SetPtMgrNum)%ClTowerVarType = VarTypes(1)
IdealCondEntSetPtMgr(SetPtMgrNum)%ClTowerVarIndex = VarIndexes(1)
DEALLOCATE (VarIndexes)
DEALLOCATE (VarTypes)
DEALLOCATE (IndexTypes)
DEALLOCATE (UnitsStrings)
DEALLOCATE (ResourceTypes)
DEALLOCATE (EndUses)
DEALLOCATE (Groups)
DEALLOCATE (Names)
TypeOfComp = PlantLoop(CondLoopNum)%LoopSide(SupplySide)%Branch(CondPumpBranchNum)%Comp(CondPumpNum)%TypeOf
NameOfComp = PlantLoop(CondLoopNum)%LoopSide(SupplySide)%Branch(CondPumpBranchNum)%Comp(CondPumpNum)%Name
NumVariables=GetNumMeteredVariables(TypeOfComp,NameOfComp)
ALLOCATE (VarIndexes(NumVariables))
ALLOCATE (VarTypes(NumVariables))
ALLOCATE (IndexTypes(NumVariables))
ALLOCATE (UnitsStrings(NumVariables))
ALLOCATE (ResourceTypes(NumVariables))
ALLOCATE (EndUses(NumVariables))
ALLOCATE (Groups(NumVariables))
ALLOCATE (Names(NumVariables))
CALL GetMeteredVariables(TypeOfComp, NameOfComp, &
VarIndexes, VarTypes, &
IndexTypes, UnitsStrings, &
ResourceTypes, EndUses, Groups, Names, NumFound)
IdealCondEntSetPtMgr(SetPtMgrNum)%CndPumpVarType = VarTypes(1)
IdealCondEntSetPtMgr(SetPtMgrNum)%CndPumpVarIndex = VarIndexes(1)
DEALLOCATE (VarIndexes)
DEALLOCATE (VarTypes)
DEALLOCATE (IndexTypes)
DEALLOCATE (UnitsStrings)
DEALLOCATE (ResourceTypes)
DEALLOCATE (EndUses)
DEALLOCATE (Groups)
DEALLOCATE (Names)
RETURN
END SUBROUTINE SetupMeteredVarsForSetPt