SUBROUTINE GetZoneAirSetpoints
! SUBROUTINE INFORMATION:
! AUTHOR Russell Taylor
! DATE WRITTEN September 1998
! MODIFIED L.Gu, May 2006, B. Griffith June 2006
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine gets the inputs related to thermostatic control.
! METHODOLOGY EMPLOYED:
! Uses the status flags to trigger events.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataIPShortCuts
USE InputProcessor
USE ScheduleManager, ONLY: GetScheduleIndex, CheckScheduleValueMinMax, GetScheduleMinValue, GetScheduleMaxValue, &
CheckScheduleValue
USE General, ONLY: TrimSigDigits, FindNumberInList, RoundSigDigits, CheckCreatedZoneItemName
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetZoneAirSetpoints: '
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
TYPE NeededControlTypes
LOGICAL, DIMENSION(4) :: MustHave=.false. ! 4= the four control types
LOGICAL, DIMENSION(4) :: DidHave =.false.
END TYPE
TYPE NeededComfortControlTypes
LOGICAL, DIMENSION(12) :: MustHave=.false. ! 4= the four control types
LOGICAL, DIMENSION(12) :: DidHave =.false.
END TYPE
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: TempControlledZoneNum ! The Splitter that you are currently loading input into
INTEGER :: NumAlphas
INTEGER :: NumNums
INTEGER :: SingleTempHeatingControlNum
INTEGER :: SingleTempCoolingControlNum
INTEGER :: SingleTempHeatCoolControlNum
INTEGER :: DualTempHeatCoolControlNum
INTEGER :: ControlTypeNum
INTEGER :: IOSTAT
!unused1208 REAL(r64), DIMENSION(2) :: NumArray
!unused1208 CHARACTER(len=MaxNameLength), DIMENSION(29) :: AlphArray
LOGICAL :: ErrorsFound = .FALSE.
LOGICAL :: ErrFlag
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
INTEGER :: CTIndex
INTEGER :: HumidControlledZoneNum ! The Humidity Controller that information is being loaded into
LOGICAL :: ValidScheduleControlType
LOGICAL :: ValidRadFractSched ! check for if radiative fraction schedule has valid numbers
LOGICAL :: ValidZoneOvercoolRangeSched ! check for if Zone Overcool range schedule has valid numbers
INTEGER :: TempIndex
INTEGER :: SchedMin
INTEGER :: SchedMax
INTEGER :: ActualZoneNum
INTEGER :: SchedTypeIndex
INTEGER :: ComfortControlledZoneNum ! The Splitter that you are currently loading input into
INTEGER :: I, IZoneCount
INTEGER :: OpTempContrlNum ! do loop index
INTEGER :: found
INTEGER :: TempHumidityCntrlNum ! do loop index for overcooled controlled zone
INTEGER :: SingleFangerHeatingControlNum
INTEGER :: SingleFangerCoolingControlNum
INTEGER :: SingleFangerHeatCoolControlNum
INTEGER :: DualFangerHeatCoolControlNum
INTEGER :: ComfortIndex
INTEGER :: ZoneAssigned
INTEGER :: NumStageControlledZones ! Number of staged controlled objects
INTEGER :: StageControlledZoneNum ! Index for staged controlled zones
TYPE (NeededControlTypes), ALLOCATABLE, DIMENSION(:) :: TStatControlTypes
TYPE (NeededComfortControlTypes), ALLOCATABLE, DIMENSION(:) :: TComfortControlTypes
INTEGER, ALLOCATABLE, DIMENSION(:) :: CTSchedMapToControlledZone
INTEGER, ALLOCATABLE, DIMENSION(:) :: CCmSchedMapToControlledZone
INTEGER :: Item
INTEGER :: Item1
INTEGER :: ZLItem
! FLOW:
cCurrentModuleObject=cZControlTypes(iZC_TStat)
NumTStatStatements = GetNumObjectsFound(cCurrentModuleObject)
ALLOCATE(TStatObjects(NumTStatStatements))
! Pre-scan for use of Zone lists in TStat statements (i.e. Global application of TStat)
NumTempControlledZones=0
DO Item=1,NumTStatStatements
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),TStatObjects%Name,Item-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
TStatObjects(Item)%Name=cAlphaArgs(1)
Item1=FindItemInList(cAlphaArgs(2),Zone%Name,NumOfZones)
ZLItem=0
IF (Item1 == 0 .and. NumOfZoneLists > 0) &
ZLItem=FindItemInList(cAlphaArgs(2),ZoneList%Name,NumOfZoneLists)
IF (Item1 > 0) THEN
TStatObjects(Item)%TempControlledZoneStartPtr=NumTempControlledZones+1
NumTempControlledZones=NumTempControlledZones+1
TStatObjects(Item)%NumOfZones=1
TStatObjects(Item)%ZoneListActive=.false.
TStatObjects(Item)%ZoneOrZoneListPtr=Item1
ELSEIF (ZLItem > 0) THEN
TStatObjects(Item)%TempControlledZoneStartPtr=NumTempControlledZones+1
NumTempControlledZones=NumTempControlledZones+ZoneList(ZLItem)%NumOfZones
TStatObjects(Item)%NumOfZones=ZoneList(ZLItem)%NumOfZones
TStatObjects(Item)%ZoneListActive=.true.
TStatObjects(Item)%ZoneOrZoneListPtr=ZLItem
ELSE
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound=.true.
ENDIF
ENDDO
IF (ErrorsFound) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Errors with invalid names in '//trim(cCurrentModuleObject)// &
' objects.')
CALL ShowContinueError('...These will not be read in. Other errors may occur.')
NumTempControlledZones=0
ENDIF
IF (NumTempControlledZones > 0) THEN
ALLOCATE(TempControlledZone(NumTempControlledZones))
ALLOCATE(TStatControlTypes(NumTempControlledZones)) ! Number of set point types
ALLOCATE(CTSchedMapToControlledZone(NumTempControlledZones))
CTSchedMapToControlledZone=0
TempControlledZoneNum = 0
DO Item = 1, NumTStatStatements
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
DO Item1=1,TStatObjects(Item)%NumOfZones
TempControlledZoneNum=TempControlledZoneNum+1
IF (TStatObjects(Item)%ZoneListActive) THEN
cAlphaArgs(2)=Zone(ZoneList(TStatObjects(Item)%ZoneOrZoneListPtr)%Zone(Item1))%Name
ENDIF
ZoneAssigned=FindItemInList(cAlphaArgs(2),TempControlledZone%ZoneName,TempControlledZoneNum-1)
IF (ZoneAssigned == 0) THEN
TempControlledZone(TempControlledZoneNum)%ZoneName = cAlphaArgs(2)
TempControlledZone(TempControlledZoneNum)%ActualZoneNum = FindIteminList(cAlphaArgs(2),Zone%Name,NumOfZones)
IF (TempControlledZone(TempControlledZoneNum)%ActualZoneNum == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
ELSE
Zone(TempControlledZone(TempControlledZoneNum)%ActualZoneNum)%TempControlledZoneIndex = TempControlledZoneNum
END IF
ELSE
TempControlledZone(TempControlledZoneNum)%ZoneName = cAlphaArgs(2) ! for continuity
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" zone previously assigned.')
CALL ShowContinueError('...Zone was previously assigned to Thermostat="'// &
trim(TempControlledZone(ZoneAssigned)%Name)//'".')
ErrorsFound = .TRUE.
CYCLE
ENDIF
IF (.not. TStatObjects(Item)%ZoneListActive) THEN
TempControlledZone(TempControlledZoneNum)%Name = cAlphaArgs(1)
ELSE
CALL CheckCreatedZoneItemName(RoutineName,cCurrentModuleObject, &
Zone(ZoneList(TStatObjects(Item)%ZoneOrZoneListPtr)%Zone(Item1))%Name, &
ZoneList(TStatObjects(Item)%ZoneOrZoneListPtr)%MaxZoneNameLength, &
TStatObjects(Item)%Name, &
TempControlledZone%Name, &
TempControlledZoneNum-1, &
TempControlledZone(TempControlledZoneNum)%Name, &
ErrFlag)
IF (ErrFlag) ErrorsFound=.true.
ENDIF
TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName = cAlphaArgs(3)
TempControlledZone(TempControlledZoneNum)%CTSchedIndex=GetScheduleIndex(cAlphaArgs(3))
IF (Item1 == 1) THEN ! only show error on first of several if zone list
IF (TempControlledZone(TempControlledZoneNum)%CTSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'" not found.')
ErrorsFound = .TRUE.
ELSE
! Check validity of control types.
ValidScheduleControlType=CheckScheduleValueMinMax(TempControlledZone(TempControlledZoneNum)%CTSchedIndex, &
'>=',0.0d0,'<=',4.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid range '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'"')
CALL ShowContinueError('..contains values outside of range [0,4].')
ErrorsFound=.TRUE.
ENDIF
END IF
ENDIF
TempControlledZone(TempControlledZoneNum)%NumControlTypes = NINT((NumAlphas - 3.0d0)/2.0d0)
ALLOCATE(TempControlledZone(TempControlledZoneNum)%ControlType(TempControlledZone( &
TempControlledZoneNum)%NumControlTypes))
ALLOCATE(TempControlledZone(TempControlledZoneNum)%ControlTypeName(TempControlledZone( &
TempControlledZoneNum)%NumControlTypes))
ALLOCATE(TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(TempControlledZone( &
TempControlledZoneNum)%NumControlTypes))
DO ControlTypeNum = 1, TempControlledZone(TempControlledZoneNum)%NumControlTypes
TempControlledZone(TempControlledZoneNum)%ControlType(ControlTypeNum) = cAlphaArgs(NINT(2.0d0*ControlTypeNum-1+3))
TempControlledZone(TempControlledZoneNum)%ControlTypeName(ControlTypeNum) = cAlphaArgs(NINT(2.0d0*ControlTypeNum+3))
IF (TempControlledZone(TempControlledZoneNum)%ControlType(ControlTypeNum) /= ' ') THEN
CTIndex=FindItem(TempControlledZone(TempControlledZoneNum)%ControlType(ControlTypeNum),ValidControlTypes,4)
IF (CTIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(NINT(2.0d0*ControlTypeNum-1+3)))//'="'// &
trim(cAlphaArgs(NINT(2.0d0*ControlTypeNum-1+3)))//'"')
ErrorsFound = .TRUE.
END IF
ELSE
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(NINT(2.0d0*ControlTypeNum-1+3)))//'="<blank>"')
ErrorsFound = .TRUE.
ENDIF
TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(ControlTypeNum) = 0
END DO
END DO
END DO ! NumTStatStatements
ENDIF ! Check on number of TempControlledZones
cCurrentModuleObject=ValidControlTypes(SglHeatSetPoint)
NumSingleTempHeatingControls = GetNumObjectsFound(cCurrentModuleObject)
IF (NumSingleTempHeatingControls .GT. 0) ALLOCATE(SetPointSingleHeating(NumSingleTempHeatingControls))
DO SingleTempHeatingControlNum = 1, NumSingleTempHeatingControls
CALL GetObjectItem(cCurrentModuleObject,SingleTempHeatingControlNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),SetPointSingleHeating%Name,SingleTempHeatingControlNum-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
SetPointSingleHeating(SingleTempHeatingControlNum)%Name = cAlphaArgs(1)
SetPointSingleHeating(SingleTempHeatingControlNum)%TempSchedName = cAlphaArgs(2)
SetPointSingleHeating(SingleTempHeatingControlNum)%TempSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (SetPointSingleHeating(SingleTempHeatingControlNum)%TempSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
END IF
END DO ! SingleTempHeatingControlNum
cCurrentModuleObject=ValidControlTypes(SglCoolSetPoint)
NumSingleTempCoolingControls = GetNumObjectsFound(cCurrentModuleObject)
IF (NumSingleTempCoolingControls .GT. 0) ALLOCATE(SetPointSingleCooling(NumSingleTempCoolingControls))
DO SingleTempCoolingControlNum = 1, NumSingleTempCoolingControls
CALL GetObjectItem(cCurrentModuleObject,SingleTempCoolingControlNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),SetPointSingleCooling%Name,SingleTempCoolingControlNum-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
SetPointSingleCooling(SingleTempCoolingControlNum)%Name = cAlphaArgs(1)
SetPointSingleCooling(SingleTempCoolingControlNum)%TempSchedName = cAlphaArgs(2)
SetPointSingleCooling(SingleTempCoolingControlNum)%TempSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (SetPointSingleCooling(SingleTempCoolingControlNum)%TempSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
END IF
END DO ! SingleTempCoolingControlNum
cCurrentModuleObject=ValidControlTypes(SglHCSetPoint)
NumSingleTempHeatCoolControls = GetNumObjectsFound(cCurrentModuleObject)
IF (NumSingleTempHeatCoolControls .GT. 0) ALLOCATE(SetPointSingleHeatCool(NumSingleTempHeatCoolControls))
DO SingleTempHeatCoolControlNum = 1, NumSingleTempHeatCoolControls
CALL GetObjectItem(cCurrentModuleObject,SingleTempHeatCoolControlNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
SetPointSingleHeatCool(SingleTempHeatCoolControlNum)%Name = cAlphaArgs(1)
SetPointSingleHeatCool(SingleTempHeatCoolControlNum)%TempSchedName = cAlphaArgs(2)
SetPointSingleHeatCool(SingleTempHeatCoolControlNum)%TempSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (SetPointSingleHeatCool(SingleTempHeatCoolControlNum)%TempSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
END IF
END DO ! SingleTempHeatCoolControlNum
cCurrentModuleObject=ValidControlTypes(DualSetPoint)
NumDualTempHeatCoolControls = GetNumObjectsFound(cCurrentModuleObject)
IF (NumDualTempHeatCoolControls .GT. 0) ALLOCATE(SetPointDualHeatCool(NumDualTempHeatCoolControls))
DO DualTempHeatCoolControlNum = 1, NumDualTempHeatCoolControls
CALL GetObjectItem(cCurrentModuleObject,DualTempHeatCoolControlNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),SetPointDualHeatCool%Name,DualTempHeatCoolControlNum-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
SetPointDualHeatCool(DualTempHeatCoolControlNum)%Name = cAlphaArgs(1)
SetPointDualHeatCool(DualTempHeatCoolControlNum)%HeatTempSetptSchedName = cAlphaArgs(2)
SetPointDualHeatCool(DualTempHeatCoolControlNum)%HeatTempSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (SetPointDualHeatCool(DualTempHeatCoolControlNum)%HeatTempSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
END IF
SetPointDualHeatCool(DualTempHeatCoolControlNum)%CoolTempSetptSchedName = cAlphaArgs(3)
SetPointDualHeatCool(DualTempHeatCoolControlNum)%CoolTempSchedIndex = GetScheduleIndex(cAlphaArgs(3))
IF (SetPointDualHeatCool(DualTempHeatCoolControlNum)%CoolTempSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'" not found.')
ErrorsFound = .TRUE.
END IF
END DO ! DualTempHeatCoolControlNum
! Finish filling in Schedule pointing indexes
DO TempControlledZoneNum = 1, NumTempControlledZones
TempIndex = FindItem(trim(ValidControlTypes(SglHeatSetPoint)), &
TempControlledZone(TempControlledZoneNum)%ControlType,TempControlledZone(TempControlledZoneNum)%NumControlTypes)
TempControlledZone(TempControlledZoneNum)%SchIndx_SingleHeatSetPoint = TempIndex
IF (TempIndex > 0) THEN
TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(TempIndex) = &
FindItem(TempControlledZone(TempControlledZoneNum)%ControlTypeName(TempIndex), &
SetPointSingleHeating%Name, NumSingleTempHeatingControls)
TStatControlTypes(TempControlledZoneNum)%MustHave(SingleHeatingSetpoint)=.true.
ENDIF
TempIndex = FindItem(trim(ValidControlTypes(SglCoolSetPoint)), &
TempControlledZone(TempControlledZoneNum)%ControlType,TempControlledZone(TempControlledZoneNum)%NumControlTypes)
TempControlledZone(TempControlledZoneNum)%SchIndx_SingleCoolSetPoint = TempIndex
IF (TempIndex > 0) THEN
TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(TempIndex) = &
FindItem(TempControlledZone(TempControlledZoneNum)%ControlTypeName(TempIndex), &
SetPointSingleCooling%Name, NumSingleTempCoolingControls)
TStatControlTypes(TempControlledZoneNum)%MustHave(SingleCoolingSetpoint)=.true.
ENDIF
TempIndex = FindItem(trim(ValidControlTypes(SglHCSetPoint)), &
TempControlledZone(TempControlledZoneNum)%ControlType,TempControlledZone(TempControlledZoneNum)%NumControlTypes)
TempControlledZone(TempControlledZoneNum)%SchIndx_SingleHeatCoolSetPoint = TempIndex
IF (TempIndex > 0) THEN
TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(TempIndex) = &
FindItem(TempControlledZone(TempControlledZoneNum)%ControlTypeName(TempIndex), &
SetPointSingleHeatCool%Name, NumSingleTempHeatCoolControls)
TStatControlTypes(TempControlledZoneNum)%MustHave(SingleHeatCoolSetPoint)=.true.
ENDIF
TempIndex = FindItem(trim(ValidControlTypes(DualSetPoint)), &
TempControlledZone(TempControlledZoneNum)%ControlType,TempControlledZone(TempControlledZoneNum)%NumControlTypes)
TempControlledZone(TempControlledZoneNum)%SchIndx_DualSetPointWDeadBand = TempIndex
IF (TempIndex > 0) THEN
TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(TempIndex) = &
FindItem(TempControlledZone(TempControlledZoneNum)%ControlTypeName(TempIndex), &
SetPointDualHeatCool%Name, NumDualTempHeatCoolControls)
TStatControlTypes(TempControlledZoneNum)%MustHave(DualSetPointWithDeadBand)=.true.
ENDIF
ENDDO
! Now, Check the schedule values/indices for validity
DO TempControlledZoneNum = 1, NumTempControlledZones
ActualZoneNum = TempControlledZone(TempControlledZoneNum)%ActualZoneNum
CTIndex = TempControlledZone(TempControlledZoneNum)%CTSchedIndex
IF (CTIndex == 0) CYCLE ! error will be caught elsewhere
SchedMin=GetScheduleMinValue(CTIndex)
SchedMax=GetScheduleMaxValue(CTIndex)
IF (SchedMin == 0 .and. SchedMax == 0) THEN
IF (FindNumberInList(CTIndex,CTSchedMapToControlledZone,NumTempControlledZones) == 0) THEN
CALL ShowSevereError('Control Type Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies control type 0 for all entries.')
CALL ShowContinueError('All zones using this Control Type Schedule have no heating or cooling available.')
ENDIF
CTSchedMapToControlledZone(TempControlledZoneNum)=CTIndex
ENDIF
DO ControlTypeNum=SchedMin,SchedMax
SELECT CASE (ControlTypeNum)
CASE (0) ! Uncontrolled
CASE (SingleHeatingSetPoint)
TempIndex=TempControlledZone(TempControlledZoneNum)%SchIndx_SingleHeatSetPoint
TStatControlTypes(TempControlledZoneNum)%DidHave(SingleHeatingSetPoint)=.true.
IF (TempIndex /= 0) THEN
SchedTypeIndex = TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(TempIndex)
IF (SchedTypeIndex == 0) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Could not find '//trim(ValidControlTypes(SglHeatSetPoint))// &
' Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeName(TempIndex)))
ErrorsFound=.true.
END IF
ELSE ! TempIndex = 0
IF (CheckScheduleValue(CTIndex,SingleHeatingSetPoint)) THEN
CALL ShowSevereError('Control Type Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies control type 1 ('//trim(ValidControlTypes(SglHeatSetPoint))// &
') as the control type. Not valid for this zone.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TStat))//'='// &
TRIM(TempControlledZone(TempControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(TempControlledZone(TempControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
ENDIF
CASE (SingleCoolingSetPoint)
TempIndex = TempControlledZone(TempControlledZoneNum)%SchIndx_SingleCoolSetPoint
TStatControlTypes(TempControlledZoneNum)%DidHave(SingleCoolingSetPoint)=.true.
IF (TempIndex /= 0) THEN
SchedTypeIndex = TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(TempIndex)
IF (SchedTypeIndex == 0) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Could not find '//trim(ValidControlTypes(SglCoolSetPoint))// &
' Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeName(TempIndex)))
ErrorsFound=.true.
END IF
ELSE ! TempIndex = 0
IF (CheckScheduleValue(CTIndex,SingleCoolingSetPoint)) THEN
CALL ShowSevereError('Control Type Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies control type 2 ('//trim(ValidControlTypes(SglCoolSetPoint))// &
') as the control type. Not valid for this zone.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TStat))//'='// &
TRIM(TempControlledZone(TempControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(TempControlledZone(TempControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
ENDIF
CASE (SingleHeatCoolSetPoint)
TempIndex = TempControlledZone(TempControlledZoneNum)%SchIndx_SingleHeatCoolSetPoint
TStatControlTypes(TempControlledZoneNum)%DidHave(SingleHeatCoolSetPoint)=.true.
IF (TempIndex /= 0) THEN
SchedTypeIndex = TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(TempIndex)
IF (SchedTypeIndex == 0) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Could not find '//trim(ValidControlTypes(SglHCSetPoint))// &
' Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeName(TempIndex)))
ErrorsFound=.true.
END IF
ELSE ! TempIndex = 0
IF (CheckScheduleValue(CTIndex,SingleHeatCoolSetPoint)) THEN
CALL ShowSevereError('Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies control type 3 ('//trim(ValidControlTypes(SglHCSetPoint))// &
') as the control type. Not valid for this zone.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TStat))//'='// &
TRIM(TempControlledZone(TempControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(TempControlledZone(TempControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
ENDIF
CASE (DualSetPointWithDeadBand)
TempIndex = TempControlledZone(TempControlledZoneNum)%SchIndx_DualSetPointWDeadBand
TStatControlTypes(TempControlledZoneNum)%DidHave(DualSetPointWithDeadBand)=.true.
IF (TempIndex /= 0) THEN
SchedTypeIndex = TempControlledZone(TempControlledZoneNum)%ControlTypeSchIndx(TempIndex)
IF (SchedTypeIndex == 0) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Could not find '//trim(ValidControlTypes(DualSetPoint))// &
' Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeName(TempIndex)))
ErrorsFound=.true.
END IF
ELSE ! TempIndex = 0
IF (CheckScheduleValue(CTIndex,DualSetPointWithDeadBand)) THEN
CALL ShowSevereError('Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies control type 4 ('//trim(ValidControlTypes(DualSetPoint))// &
') as the control type. Not valid for this zone.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TStat))//'='// &
TRIM(TempControlledZone(TempControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(TempControlledZone(TempControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
ENDIF
CASE DEFAULT
CALL ShowSevereError('GetZoneAirSetpoints: Illegal control type for Zone='//TRIM(Zone(ActualZoneNum)%Name)// &
', Found value='//TRIM(TrimSigDigits(ControlTypeNum))//', in Schedule='// &
TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..valid range values are [0,4].')
ErrorsFound=.true.
END SELECT
END DO
END DO
DO TempControlledZoneNum = 1, NumTempControlledZones
ActualZoneNum = TempControlledZone(TempControlledZoneNum)%ActualZoneNum
CTIndex = TempControlledZone(TempControlledZoneNum)%CTSchedIndex
IF (CTIndex == 0) CYCLE ! error caught elsewhere -- would just be confusing here
DO ControlTypeNum=1,4
IF (TStatControlTypes(TempControlledZoneNum)%MustHave(ControlTypeNum) .and. &
TStatControlTypes(TempControlledZoneNum)%DidHave(ControlTypeNum)) CYCLE
SELECT CASE (ControlTypeNum)
CASE (SingleHeatingSetPoint)
IF (.not. TStatControlTypes(TempControlledZoneNum)%MustHave(ControlTypeNum)) CYCLE
CALL ShowWarningError('Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('...should include control type 1 ('//trim(ValidControlTypes(SglHeatSetPoint))// &
') but does not.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TStat))//'='// &
TRIM(TempControlledZone(TempControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(TempControlledZone(TempControlledZoneNum)%ZoneName))
CASE (SingleCoolingSetPoint)
IF (.not. TStatControlTypes(TempControlledZoneNum)%MustHave(ControlTypeNum)) CYCLE
CALL ShowWarningError('Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('...should include control type 2 ('//trim(ValidControlTypes(SglCoolSetPoint))// &
') but does not.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TStat))//'='// &
TRIM(TempControlledZone(TempControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(TempControlledZone(TempControlledZoneNum)%ZoneName))
CASE (SingleHeatCoolSetPoint)
IF (.not. TStatControlTypes(TempControlledZoneNum)%MustHave(ControlTypeNum)) CYCLE
CALL ShowWarningError('Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('...should include control type 3 ('//trim(ValidControlTypes(SglHCSetPoint))// &
') but does not.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TStat))//'='// &
TRIM(TempControlledZone(TempControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(TempControlledZone(TempControlledZoneNum)%ZoneName))
CASE (DualSetPointWithDeadBand)
IF (.not. TStatControlTypes(TempControlledZoneNum)%MustHave(ControlTypeNum)) CYCLE
CALL ShowWarningError('Schedule='//TRIM(TempControlledZone(TempControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('...should include control type 4 ('//trim(ValidControlTypes(DualSetPoint))// &
') but does not.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TStat))//'='// &
TRIM(TempControlledZone(TempControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(TempControlledZone(TempControlledZoneNum)%ZoneName))
CASE DEFAULT
END SELECT
ENDDO
ENDDO
IF (ALLOCATED(TStatControlTypes)) DEALLOCATE(TStatControlTypes)
! This starts the Humidity Control Get Input section
cCurrentModuleObject=cZControlTypes(iZC_HStat)
NumHumidityControlZones = GetNumObjectsFound(cCurrentModuleObject)
IF (NumHumidityControlZones .GT. 0) ALLOCATE(HumidityControlZone(NumHumidityControlZones))
DO HumidControlledZoneNum = 1, NumHumidityControlZones
CALL GetObjectItem(cCurrentModuleObject,HumidControlledZoneNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),HumidityControlZone%ControlName,HumidControlledZoneNum-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
HumidityControlZone(HumidControlledZoneNum)%ControlName = cAlphaArgs(1)
! Ensure unique zone name
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(2),HumidityControlZone%ZoneName,HumidControlledZoneNum-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Zone Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(2) = 'xxxxx'
END IF
HumidityControlZone(HumidControlledZoneNum)%ZoneName = cAlphaArgs(2)
HumidityControlZone(HumidControlledZoneNum)%ActualZoneNum = FindItem(cAlphaArgs(2),Zone%Name,NumOfZones)
IF (HumidityControlZone(HumidControlledZoneNum)%ActualZoneNum == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
END IF
HumidityControlZone(HumidControlledZoneNum)%HumidifyingSched = cAlphaArgs(3)
HumidityControlZone(HumidControlledZoneNum)%HumidifyingSchedIndex = GetScheduleIndex(cAlphaArgs(3))
IF (HumidityControlZone(HumidControlledZoneNum)%HumidifyingSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'" not found.')
ErrorsFound = .TRUE.
END IF
If (NumAlphas .eq. 4) Then
HumidityControlZone(HumidControlledZoneNum)%DehumidifyingSched = cAlphaArgs(4)
HumidityControlZone(HumidControlledZoneNum)%DehumidifyingSchedIndex = GetScheduleIndex(cAlphaArgs(4))
IF (HumidityControlZone(HumidControlledZoneNum)%DehumidifyingSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(4))//'="'//trim(cAlphaArgs(4))//'" not found.')
ErrorsFound = .TRUE.
END IF
Else
HumidityControlZone(HumidControlledZoneNum)%DehumidifyingSched = cAlphaArgs(3)
HumidityControlZone(HumidControlledZoneNum)%DehumidifyingSchedIndex = GetScheduleIndex(cAlphaArgs(3))
End If
END DO ! HumidControlledZoneNum
! Start to read Thermal comfort control objects
cCurrentModuleObject=cZControlTypes(iZC_TCTStat)
NumComfortTStatStatements = GetNumObjectsFound(cCurrentModuleObject)
ALLOCATE(ComfortTStatObjects(NumComfortTStatStatements))
! Pre-scan for use of Zone lists in TStat statements (i.e. Global application of TStat)
NumComfortControlledZones=0
ErrFlag=.false.
DO Item=1,NumComfortTStatStatements
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
! will not do much verifying -- that will come later.
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),ComfortTStatObjects%Name,Item-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrFlag = .TRUE.
ErrorsFound=.true.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
Item1=FindItemInList(cAlphaArgs(2),Zone%Name,NumOfZones)
ZLItem=0
IF (Item1 == 0 .and. NumOfZoneLists > 0) &
ZLItem=FindItemInList(cAlphaArgs(2),ZoneList%Name,NumOfZoneLists)
ComfortTStatObjects(Item)%Name=cAlphaArgs(1)
IF (Item1 > 0) THEN
ComfortTStatObjects(Item)%ComfortControlledZoneStartPtr=NumComfortControlledZones+1
NumComfortControlledZones=NumComfortControlledZones+1
ComfortTStatObjects(Item)%NumOfZones=1
ComfortTStatObjects(Item)%ZoneListActive=.false.
ComfortTStatObjects(Item)%ZoneOrZoneListPtr=Item1
ELSEIF (ZLItem > 0) THEN
ComfortTStatObjects(Item)%ComfortControlledZoneStartPtr=NumComfortControlledZones+1
NumComfortControlledZones=NumComfortControlledZones+ZoneList(ZLItem)%NumOfZones
ComfortTStatObjects(Item)%NumOfZones=ZoneList(ZLItem)%NumOfZones
ComfortTStatObjects(Item)%ZoneListActive=.true.
ComfortTStatObjects(Item)%ZoneOrZoneListPtr=ZLItem
ELSE
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrFlag=.true.
ErrorsFound=.true.
ENDIF
ENDDO
IF (ErrFlag) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Errors with invalid names in '//trim(cCurrentModuleObject)// &
' objects.')
CALL ShowContinueError('...These will not be read in. Other errors may occur.')
NumComfortControlledZones=0
ENDIF
IF (NumComfortControlledZones > 0) THEN
ALLOCATE(ComfortControlledZone(NumComfortControlledZones))
ALLOCATE(TComfortControlTypes(NumComfortControlledZones)) ! Number of set point types
ALLOCATE(CCmSchedMapToControlledZone(NumComfortControlledZones))
CCmSchedMapToControlledZone=0
ComfortControlledZoneNum=0
DO Item = 1, NumComfortTStatStatements
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
DO Item1=1,ComfortTStatObjects(Item)%NumOfZones
ComfortControlledZoneNum=ComfortControlledZoneNum+1
IF (ComfortTStatObjects(Item)%ZoneListActive) THEN
cAlphaArgs(2)=Zone(ZoneList(ComfortTStatObjects(Item)%ZoneOrZoneListPtr)%Zone(Item1))%Name
ENDIF
ZoneAssigned=FindItemInList(cAlphaArgs(2),ComfortControlledZone%ZoneName,ComfortControlledZoneNum-1)
IF (ZoneAssigned == 0) THEN
ComfortControlledZone(ComfortControlledZoneNum)%ZoneName = cAlphaArgs(2)
ComfortControlledZone(ComfortControlledZoneNum)%ActualZoneNum = FindIteminList(cAlphaArgs(2),Zone%Name,NumOfZones)
IF (ComfortControlledZone(ComfortControlledZoneNum)%ActualZoneNum == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
END IF
ELSE
ComfortControlledZone(ComfortControlledZoneNum)%ZoneName = cAlphaArgs(2) ! for continuity
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" zone previously assigned.')
CALL ShowContinueError('...Zone was previously assigned to Thermostat="'// &
trim(ComfortControlledZone(ZoneAssigned)%Name)//'".')
ErrorsFound = .TRUE.
CYCLE
ENDIF
IF (.not. ComfortTStatObjects(Item)%ZoneListActive) THEN
ComfortControlledZone(ComfortControlledZoneNum)%Name = cAlphaArgs(1)
ELSE
ComfortControlledZone(ComfortControlledZoneNum)%Name = &
trim(Zone(ZoneList(ComfortTStatObjects(Item)%ZoneOrZoneListPtr)%Zone(Item1))%Name)// &
' '//trim(ComfortTStatObjects(Item)%Name)
ENDIF
! Read Fields A3 and A4 for averaging method
IZoneCount = 0
Do i=1,TotPeople
If (ComfortControlledZone(ComfortControlledZoneNum)%ActualZoneNum == People(I)%ZonePtr) then
IZoneCount = IZoneCount+1
End If
End Do
! Could not find a people object for this particular zone
If (IZoneCount == 0 .and. ComfortControlledZone(ComfortControlledZoneNum)%ActualZoneNum > 0) then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' no PEOPLE in '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" - cannot use Comfort Control.')
ErrorsFound=.true.
End If
ComfortControlledZone(ComfortControlledZoneNum)%AverageMethodNum = AverageMethodNum_NO
If (IZoneCount > 1) then
ComfortControlledZone(ComfortControlledZoneNum)%AverageMethodName = cAlphaArgs(3)
If (SameString(cAlphaArgs(3),'SpecificObject')) then
ComfortControlledZone(ComfortControlledZoneNum)%AverageMethodNum = AverageMethodNum_SPE
End If
If (SameString(cAlphaArgs(3),'ObjectAverage')) then
ComfortControlledZone(ComfortControlledZoneNum)%AverageMethodNum = AverageMethodNum_OBJ
End If
If (SameString(cAlphaArgs(3),'PeopleAverage')) then
ComfortControlledZone(ComfortControlledZoneNum)%AverageMethodNum = AverageMethodNum_PEO
End If
If (ComfortControlledZone(ComfortControlledZoneNum)%AverageMethodNum == 0) then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'".')
CALL ShowContinueError('Allowed keys are SpecificObject, ObjectAverage, or PeopleAverage')
ErrorsFound=.true.
End If
If (ComfortControlledZone(ComfortControlledZoneNum)%AverageMethodNum == AverageMethodNum_SPE) then
ComfortControlledZone(ComfortControlledZoneNum)%AverageObjectName = cAlphaArgs(4)
If (FindItem(cAlphaArgs(4),People%Name,TotPeople) == 0) then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(4))//'="'//trim(cAlphaArgs(4))//'".')
ErrorsFound=.true.
Else
ComfortControlledZone(ComfortControlledZoneNum)%SpecificObjectNum = &
FindItem(cAlphaArgs(4),People%Name,TotPeople)
End If
End If
Else
Do i=1,TotPeople
If (ComfortControlledZone(ComfortControlledZoneNum)%ActualZoneNum == People(I)%ZonePtr) Exit
End Do
ComfortControlledZone(ComfortControlledZoneNum)%SpecificObjectNum = i
End If
! Check values used for thermal comfort calculation
Do i=1,TotPeople
If (ComfortControlledZone(ComfortControlledZoneNum)%ActualZoneNum == People(I)%ZonePtr) then
! Check activity level
If (People(i)%ActivityLevelPtr > 0) then
ValidScheduleControlType=CheckScheduleValueMinMax( &
People(i)%ActivityLevelPtr, '>=',72.0d0, '<=',909.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError('GetPeople Activity Level: Invalid activity level values entered '// &
'for thermal comfort calculation')
CALL ShowContinueError('Outside of range values [72,909], Reference object='//TRIM(People(i)%Name))
ErrorsFound=.TRUE.
ENDIF
Else
CALL ShowSevereError('GetPeople Activity Level: Activity level schedule is not found='//TRIM(People(i)%Name))
CALL ShowContinueError('Required when the zone has Thermal Comfort Controls.')
ErrorsFound=.TRUE.
End If
! Check Work Efficiency
If (People(i)%WorkEffPtr > 0) then
ValidScheduleControlType=CheckScheduleValueMinMax( &
People(i)%WorkEffPtr, '>=',0.0d0, '<=',1.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError('GetPeople work efficiency: Invalid work efficiency values entered '// &
'for thermal comfort calculation')
CALL ShowContinueError('Outside of range values [0,1], Reference object='//TRIM(People(i)%Name))
ErrorsFound=.TRUE.
ENDIF
Else
CALL ShowSevereError('GetPeople work efficiency: Work efficiency schedule is not found='//TRIM(People(i)%Name))
CALL ShowContinueError('Required when the zone has Thermal Comfort Controls.')
ErrorsFound=.TRUE.
End If
! Check Clothing Insulation
If (People(i)%ClothingPtr > 0) then
ValidScheduleControlType=CheckScheduleValueMinMax( &
People(i)%ClothingPtr, '>',0.0d0, '<=',2.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError('GetPeople Clothing Insulation: Invalid Clothing Insulation values entered '// &
'for thermal comfort calculation')
CALL ShowContinueError('Outside of range values [0.0,2.0], Reference object='//TRIM(People(i)%Name))
ErrorsFound=.TRUE.
ENDIF
Else
CALL ShowSevereError('GetPeople Clothing Insulation: Clothing Insulation schedule is not found='// &
TRIM(People(i)%Name))
CALL ShowContinueError('Required when the zone has Thermal Comfort Controls.')
ErrorsFound=.TRUE.
End If
! Check Air velocity
If (People(i)%AirVelocityPtr .LE. 0) then
CALL ShowSevereError('GetPeople Air Velocity: Air velocity schedule is not found='//TRIM(People(i)%Name))
CALL ShowContinueError('Required when the zone has Thermal Comfort Controls.')
ErrorsFound=.TRUE.
End If
End If
End Do
! Read Max and Min temperature setpoint
If (NumNums > 0) then
ComfortControlledZone(ComfortControlledZoneNum)%TdbMinSetPoint = rNumericArgs(1)
If (rNumericArgs(1) > 50 .OR. rNumericArgs(1) < 0) then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid '// &
trim(cNumericFieldNames(1))//'=['//trim(TrimSigDigits(rNumericArgs(1),0))//'].')
CALL ShowContinueError('..Allowable values must be between 0 C and 50 C')
ErrorsFound = .TRUE.
End If
End If
If (NumNums > 1) then
ComfortControlledZone(ComfortControlledZoneNum)%TdbMaxSetPoint = rNumericArgs(2)
If (rNumericArgs(2) > 50 .OR. rNumericArgs(2) < 0) then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid '// &
trim(cNumericFieldNames(2))//'=['//trim(TrimSigDigits(rNumericArgs(2),0))//'].')
CALL ShowContinueError('..Allowable values must be between 0 C and 50 C')
ErrorsFound = .TRUE.
End If
End If
! Ensure MaxTemp >= MinTemp
If (ComfortControlledZone(ComfortControlledZoneNum)%TdbMinSetPoint > &
ComfortControlledZone(ComfortControlledZoneNum)%TdbMaxSetPoint) then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1)))
CALL ShowContinueError('..'//trim(cNumericFieldNames(1))//' > '//trim(cNumericFieldNames(2)))
CALL ShowContinueError('..['//trim(TrimSigDigits(rNumericArgs(1),0))//'] > ['// &
trim(TrimSigDigits(rNumericArgs(2),0))//'].')
ErrorsFound = .TRUE.
End If
! If MaxTemp = MinTemp, no thermal comfort control
If (ComfortControlledZone(ComfortControlledZoneNum)%TdbMinSetPoint == &
ComfortControlledZone(ComfortControlledZoneNum)%TdbMaxSetPoint) then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1)))
CALL ShowContinueError('..'//trim(cNumericFieldNames(1))//' = '//trim(cNumericFieldNames(2)))
CALL ShowContinueError('The zone will be controlled using this dry-bulb temperature setpoint.')
End If
! read Thermal comfort type schedule name
ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName = cAlphaArgs(5)
ComfortControlledZone(ComfortControlledZoneNum)%ComfortSchedIndex=GetScheduleIndex(cAlphaArgs(5))
IF (ComfortControlledZone(ComfortControlledZoneNum)%ComfortSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(5))//'="'//trim(cAlphaArgs(5))//'" not found.')
ErrorsFound = .TRUE.
ELSE
! Check validity of control types.
ValidScheduleControlType=CheckScheduleValueMinMax(ComfortControlledZone(ComfortControlledZoneNum)%ComfortSchedIndex, &
'>=',0.0d0, '<=',4.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid range '// &
trim(cAlphaFieldNames(5))//'="'//trim(cAlphaArgs(5))//'"')
CALL ShowContinueError('..contains values outside of range [0,4].')
ErrorsFound=.TRUE.
ENDIF
END IF
ComfortControlledZone(ComfortControlledZoneNum)%NumControlTypes = NINT((NumAlphas - 5.0d0)/2.0d0)
ALLOCATE(ComfortControlledZone(ComfortControlledZoneNum)%ControlType(ComfortControlledZone( &
ComfortControlledZoneNum)%NumControlTypes))
ALLOCATE(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ComfortControlledZone( &
ComfortControlledZoneNum)%NumControlTypes))
ALLOCATE(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ComfortControlledZone( &
ComfortControlledZoneNum)%NumControlTypes))
DO ControlTypeNum = 1, ComfortControlledZone(ComfortControlledZoneNum)%NumControlTypes
ComfortControlledZone(ComfortControlledZoneNum)%ControlType(ControlTypeNum) = cAlphaArgs(NINT(2.0d0*ControlTypeNum-1+5))
ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ControlTypeNum) = cAlphaArgs(NINT(2.0d0*ControlTypeNum+5))
IF (ComfortControlledZone(ComfortControlledZoneNum)%ControlType(ControlTypeNum) /= ' ') THEN
CTIndex=FindItem(ComfortControlledZone(ComfortControlledZoneNum)%ControlType(ControlTypeNum), &
ValidComfortControlTypes,12)
IF (CTIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(NINT(2.0d0*ControlTypeNum-1+5)))//'="'// &
trim(cAlphaArgs(NINT(2.0d0*ControlTypeNum-1+5)))//'"')
ErrorsFound = .TRUE.
END IF
IF (CTIndex > 4) THEN ! For Fanger control only for the time being
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(NINT(2.0d0*ControlTypeNum-1+5)))//'="'// &
trim(cAlphaArgs(NINT(2.0d0*ControlTypeNum-1+5)))//'"')
CALL ShowContinueError('..Fanger is the only valid model.')
ErrorsFound = .TRUE.
END IF
ELSE
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(NINT(2.0d0*ControlTypeNum-1+5)))//'="<blank>"')
ErrorsFound = .TRUE.
ENDIF
ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ControlTypeNum) = 0
END DO
END DO
END DO ! NumComfortTStatStatements
ENDIF
! End of Thermal comfort control reading and checking
cCurrentModuleObject=ValidComfortControlTypes(SglHeatSetPointFanger)
NumSingleFangerHeatingControls = GetNumObjectsFound(cCurrentModuleObject)
IF (NumSingleFangerHeatingControls .GT. 0) ALLOCATE(SetPointSingleHeatingFanger(NumSingleFangerHeatingControls))
DO SingleFangerHeatingControlNum = 1, NumSingleFangerHeatingControls
CALL GetObjectItem(cCurrentModuleObject,SingleFangerHeatingControlNum, &
cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),SetPointSingleHeatingFanger%Name,SingleFangerHeatingControlNum-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
SetPointSingleHeatingFanger(SingleFangerHeatingControlNum)%Name = cAlphaArgs(1)
SetPointSingleHeatingFanger(SingleFangerHeatingControlNum)%PMVSchedName = cAlphaArgs(2)
SetPointSingleHeatingFanger(SingleFangerHeatingControlNum)%PMVSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (SetPointSingleHeatingFanger(SingleFangerHeatingControlNum)%PMVSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
ELSE
ValidScheduleControlType=CheckScheduleValueMinMax( &
SetPointSingleHeatingFanger(SingleFangerHeatingControlNum)%PMVSchedIndex, '>=',-3.0d0, '<=',3.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid PMV values '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" entered.')
CALL ShowContinueError('..Values outside of range [-3,+3].')
ErrorsFound=.TRUE.
ENDIF
END IF
END DO ! SingleFangerHeatingControlNum
cCurrentModuleObject=ValidComfortControlTypes(SglCoolSetPointFanger)
NumSingleFangerCoolingControls = GetNumObjectsFound(cCurrentModuleObject)
IF (NumSingleFangerCoolingControls .GT. 0) ALLOCATE(SetPointSingleCoolingFanger(NumSingleFangerCoolingControls))
DO SingleFangerCoolingControlNum = 1, NumSingleFangerCoolingControls
CALL GetObjectItem(cCurrentModuleObject,SingleFangerCoolingControlNum, &
cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),SetPointSingleCoolingFanger%Name,SingleFangerCoolingControlNum-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
SetPointSingleCoolingFanger(SingleFangerCoolingControlNum)%Name = cAlphaArgs(1)
SetPointSingleCoolingFanger(SingleFangerCoolingControlNum)%PMVSchedName = cAlphaArgs(2)
SetPointSingleCoolingFanger(SingleFangerCoolingControlNum)%PMVSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (SetPointSingleCoolingFanger(SingleFangerCoolingControlNum)%PMVSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
ELSE
ValidScheduleControlType=CheckScheduleValueMinMax( &
SetPointSingleCoolingFanger(SingleFangerCoolingControlNum)%PMVSchedIndex, '>=',-3.0d0, '<=',3.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid PMV values '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" entered.')
CALL ShowContinueError('..Values outside of range [-3,+3].')
ErrorsFound=.TRUE.
ENDIF
END IF
END DO ! SingleFangerCoolingControlNum
cCurrentModuleObject=ValidComfortControlTypes(SglHCSetPointFanger)
NumSingleFangerHeatCoolControls = GetNumObjectsFound(cCurrentModuleObject)
IF (NumSingleFangerHeatCoolControls .GT. 0) ALLOCATE(SetPointSingleHeatCoolFanger(NumSingleFangerHeatCoolControls))
DO SingleFangerHeatCoolControlNum = 1, NumSingleFangerHeatCoolControls
CALL GetObjectItem(cCurrentModuleObject,SingleFangerHeatCoolControlNum, &
cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),SetPointSingleCoolingFanger%Name,SingleFangerCoolingControlNum-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
SetPointSingleHeatCoolFanger(SingleFangerHeatCoolControlNum)%Name = cAlphaArgs(1)
SetPointSingleHeatCoolFanger(SingleFangerHeatCoolControlNum)%PMVSchedName = cAlphaArgs(2)
SetPointSingleHeatCoolFanger(SingleFangerHeatCoolControlNum)%PMVSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (SetPointSingleHeatCoolFanger(SingleFangerHeatCoolControlNum)%PMVSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
ELSE
ValidScheduleControlType=CheckScheduleValueMinMax( &
SetPointSingleHeatCoolFanger(SingleFangerHeatCoolControlNum)%PMVSchedIndex, '>=',-3.0d0, '<=',3.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid PMV values '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" entered.')
CALL ShowContinueError('..Values outside of range [-3,+3].')
ErrorsFound=.TRUE.
ENDIF
END IF
END DO ! SingleFangerHeatCoolControlNum
cCurrentModuleObject=ValidComfortControlTypes(DualSetPointFanger)
NumDualFangerHeatCoolControls = GetNumObjectsFound(cCurrentModuleObject)
IF (NumDualFangerHeatCoolControls .GT. 0) ALLOCATE(SetPointDualHeatCoolFanger(NumDualFangerHeatCoolControls))
DO DualFangerHeatCoolControlNum = 1, NumDualFangerHeatCoolControls
CALL GetObjectItem(cCurrentModuleObject,DualFangerHeatCoolControlNum, &
cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),SetPointDualHeatCoolFanger%Name,DualFangerHeatCoolControlNum-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
SetPointDualHeatCoolFanger(DualFangerHeatCoolControlNum)%Name = cAlphaArgs(1)
SetPointDualHeatCoolFanger(DualFangerHeatCoolControlNum)%HeatPMVSetptSchedName = cAlphaArgs(2)
SetPointDualHeatCoolFanger(DualFangerHeatCoolControlNum)%HeatPMVSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (SetPointDualHeatCoolFanger(DualFangerHeatCoolControlNum)%HeatPMVSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
END IF
SetPointDualHeatCoolFanger(DualFangerHeatCoolControlNum)%CoolPMVSetptSchedName = cAlphaArgs(3)
SetPointDualHeatCoolFanger(DualFangerHeatCoolControlNum)%CoolPMVSchedIndex = GetScheduleIndex(cAlphaArgs(3))
IF (SetPointDualHeatCoolFanger(DualFangerHeatCoolControlNum)%CoolPMVSchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'" not found.')
ErrorsFound = .TRUE.
ELSE
ValidScheduleControlType=CheckScheduleValueMinMax( &
SetPointDualHeatCoolFanger(DualFangerHeatCoolControlNum)%HeatPMVSchedIndex, '>=',-3.0d0, '<=',3.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid PMV values '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" entered.')
CALL ShowContinueError('..Values outside of range [-3,+3].')
ErrorsFound=.TRUE.
ENDIF
ValidScheduleControlType=CheckScheduleValueMinMax( &
SetPointDualHeatCoolFanger(DualFangerHeatCoolControlNum)%CoolPMVSchedIndex, '>=',-3.0d0, '<=',3.0d0)
IF (.not. ValidScheduleControlType) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid PMV values '// &
trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'" entered.')
CALL ShowContinueError('..Values outside of range [-3,+3].')
ErrorsFound=.TRUE.
ENDIF
END IF
END DO ! DualFangerHeatCoolControlNum
! Finish filling in Schedule pointing indexes for Thermal Comfort Control
DO ComfortControlledZoneNum = 1, NumComfortControlledZones
ComfortIndex = FindItem(trim(ValidComfortControlTypes(SglHeatSetPointFanger)), &
ComfortControlledZone(ComfortControlledZoneNum)%ControlType, &
ComfortControlledZone(ComfortControlledZoneNum)%NumControlTypes)
ComfortControlledZone(ComfortControlledZoneNum)%SchIndx_SglHeatSetPointFanger = ComfortIndex
IF (ComfortIndex > 0) THEN
ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ComfortIndex) = &
FindItem(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ComfortIndex), &
SetPointSingleHeatingFanger%Name, NumSingleFangerHeatingControls)
TComfortControlTypes(ComfortControlledZoneNum)%MustHave(SglHeatSetPointFanger)=.true.
ENDIF
ComfortIndex = FindItem(trim(ValidComfortControlTypes(SglCoolSetPointFanger)), &
ComfortControlledZone(ComfortControlledZoneNum)%ControlType, &
ComfortControlledZone(ComfortControlledZoneNum)%NumControlTypes)
ComfortControlledZone(ComfortControlledZoneNum)%SchIndx_SglCoolSetPointFanger = ComfortIndex
IF (ComfortIndex > 0) THEN
ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ComfortIndex) = &
FindItem(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ComfortIndex), &
SetPointSingleCoolingFanger%Name, NumSingleFangerCoolingControls)
TComfortControlTypes(ComfortControlledZoneNum)%MustHave(SglCoolSetpointFanger)=.true.
ENDIF
ComfortIndex = FindItem(trim(ValidComfortControlTypes(SglHCSetPointFanger)), &
ComfortControlledZone(ComfortControlledZoneNum)%ControlType, &
ComfortControlledZone(ComfortControlledZoneNum)%NumControlTypes)
ComfortControlledZone(ComfortControlledZoneNum)%SchIndx_SglHCSetPointFanger = ComfortIndex
IF (ComfortIndex > 0) THEN
ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ComfortIndex) = &
FindItem(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ComfortIndex), &
SetPointSingleHeatCoolFanger%Name, NumSingleFangerHeatCoolControls)
TComfortControlTypes(ComfortControlledZoneNum)%MustHave(SglHCSetPointFanger)=.true.
ENDIF
ComfortIndex = FindItem(trim(ValidComfortControlTypes(DualSetPointFanger)), &
ComfortControlledZone(ComfortControlledZoneNum)%ControlType, &
ComfortControlledZone(ComfortControlledZoneNum)%NumControlTypes)
ComfortControlledZone(ComfortControlledZoneNum)%SchIndx_DualSetPointFanger = ComfortIndex
IF (ComfortIndex > 0) THEN
ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ComfortIndex) = &
FindItem(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ComfortIndex), &
SetPointDualHeatCoolFanger%Name, NumDualFangerHeatCoolControls)
TComfortControlTypes(ComfortControlledZoneNum)%MustHave(DualSetPointFanger)=.true.
ENDIF
ENDDO
! Now, Check the schedule values/indices for validity for Thermal Comfort Control
DO ComfortControlledZoneNum = 1, NumComfortControlledZones
ActualZoneNum = ComfortControlledZone(ComfortControlledZoneNum)%ActualZoneNum
CTIndex = ComfortControlledZone(ComfortControlledZoneNum)%ComfortSchedIndex
IF (CTIndex == 0) CYCLE ! error will be caught elsewhere
SchedMin=GetScheduleMinValue(CTIndex)
SchedMax=GetScheduleMaxValue(CTIndex)
IF (SchedMin == 0 .and. SchedMax == 0) THEN
IF (FindNumberInList(CTIndex,CCmSchedMapToControlledZone,NumComfortControlledZones) == 0) THEN
CALL ShowWarningError('Control Type Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies control type 0 for all entries.')
CALL ShowContinueError('All zones using this Control Type Schedule have no thermal comfort control.')
ENDIF
CCmSchedMapToControlledZone(ComfortControlledZoneNum)=CTIndex
END IF
DO ControlTypeNum=SchedMin,SchedMax
SELECT CASE (ControlTypeNum)
CASE (0) ! Thermal comfort uncontrolled
CASE (SglHeatSetpointFanger)
ComfortIndex=ComfortControlledZone(ComfortControlledZoneNum)%SchIndx_SglHeatSetPointFanger
TComfortControlTypes(ComfortControlledZoneNum)%DidHave(SglHeatSetPointFanger)=.true.
IF (ComfortIndex /= 0) THEN
SchedTypeIndex = ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ComfortIndex)
IF (SchedTypeIndex == 0) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Could not find '// &
trim(ValidComfortControlTypes(SglHeatSetPointFanger))// &
' Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ComfortIndex)))
ErrorsFound=.true.
END IF
ELSE ! ComfortIndex = 0
IF (CheckScheduleValue(CTIndex,SglHeatSetPointFanger)) THEN
CALL ShowSevereError('Control Type Schedule='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies thermal control type 1 ('// &
trim(ValidComfortControlTypes(SglHeatSetPointFanger))// &
') as the control type. Not valid for this zone.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TCTStat))//'='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
ENDIF
CASE (SglCoolSetPointFanger)
ComfortIndex = ComfortControlledZone(ComfortControlledZoneNum)%SchIndx_SglCoolSetPointFanger
TComfortControlTypes(ComfortControlledZoneNum)%DidHave(SglCoolSetPointFanger)=.true.
IF (ComfortIndex /= 0) THEN
SchedTypeIndex = ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ComfortIndex)
IF (SchedTypeIndex == 0) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Could not find '// &
trim(ValidComfortControlTypes(SglCoolSetPointFanger))// &
' Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ComfortIndex)))
ErrorsFound=.true.
END IF
ELSE ! ComfortIndex = 0
IF (CheckScheduleValue(CTIndex,SglCoolSetPointFanger)) THEN
CALL ShowSevereError('Control Type Schedule='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies thermal control type 2 ('// &
trim(ValidComfortControlTypes(SglCoolSetPointFanger))// &
') as the control type. Not valid for this zone.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TCTStat))//'='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
ENDIF
CASE (SglHCSetPointFanger)
ComfortIndex = ComfortControlledZone(ComfortControlledZoneNum)%SchIndx_SglHCSetPointFanger
TComfortControlTypes(ComfortControlledZoneNum)%DidHave(SglHCSetPointFanger)=.true.
IF (ComfortIndex /= 0) THEN
SchedTypeIndex = ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ComfortIndex)
IF (SchedTypeIndex == 0) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Could not find '//trim(ValidComfortControlTypes(SglHCSetPointFanger))// &
' Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ComfortIndex)))
ErrorsFound=.true.
END IF
ELSE ! ComfortIndex = 0
IF (CheckScheduleValue(CTIndex,SglHCSetPointFanger)) THEN
CALL ShowSevereError('Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies thermal control type 3 ('// &
trim(ValidComfortControlTypes(SglHCSetPointFanger))// &
') as the control type. Not valid for this zone.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TCTStat))//'='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
ENDIF
CASE (DualSetPointFanger)
ComfortIndex = ComfortControlledZone(ComfortControlledZoneNum)%SchIndx_DualSetPointFanger
TComfortControlTypes(ComfortControlledZoneNum)%DidHave(DualSetPointFanger)=.true.
IF (ComfortIndex /= 0) THEN
SchedTypeIndex = ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchIndx(ComfortIndex)
IF (SchedTypeIndex == 0) THEN
CALL ShowSevereError('GetZoneAirSetpoints: Could not find '//trim(ValidComfortControlTypes(DualSetPointFanger))// &
' Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeName(ComfortIndex)))
ErrorsFound=.true.
END IF
ELSE ! ComfortIndex = 0
IF (CheckScheduleValue(CTIndex,DualSetPointFanger)) THEN
CALL ShowSevereError('Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..specifies thermal control type 4 ('//trim(ValidComfortControlTypes(DualSetPointFanger))// &
') as the control type. Not valid for this zone.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TCTStat))//'='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ZoneName))
ErrorsFound=.true.
ENDIF
ENDIF
! CASE PIERCE
! CASE KSU
CASE DEFAULT
CALL ShowSevereError('GetZoneAirSetpoints: Illegal control type for Zone='//TRIM(Zone(ActualZoneNum)%Name)// &
', Found value='//TRIM(TrimSigDigits(ControlTypeNum))//', in Schedule='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('..valid range values are [0,4].')
ErrorsFound=.true.
END SELECT
END DO
END DO
DO ComfortControlledZoneNum = 1, NumComfortControlledZones
ActualZoneNum = ComfortControlledZone(ComfortControlledZoneNum)%ActualZoneNum
CTIndex = ComfortControlledZone(ComfortControlledZoneNum)%ComfortSchedIndex
IF (CTIndex == 0) CYCLE ! error caught elsewhere -- would just be confusing here
DO ControlTypeNum=1,12
IF (TComfortControlTypes(ComfortControlledZoneNum)%MustHave(ControlTypeNum) .and. &
TComfortControlTypes(ComfortControlledZoneNum)%DidHave(ControlTypeNum)) CYCLE
SELECT CASE (ControlTypeNum)
CASE (SglHeatSetpointFanger)
IF (.not. TComfortControlTypes(ComfortControlledZoneNum)%MustHave(ControlTypeNum)) CYCLE
CALL ShowWarningError('Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('...should include control type 1 ('//trim(ValidComfortControlTypes(SglHeatSetpointFanger))// &
') but does not.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TCTStat))//'='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ZoneName))
CASE (SglCoolSetpointFanger)
IF (.not. TComfortControlTypes(ComfortControlledZoneNum)%MustHave(ControlTypeNum)) CYCLE
CALL ShowWarningError('Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('...should include control type 2 ('//trim(ValidComfortControlTypes(SglCoolSetpointFanger))// &
') but does not.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TCTStat))//'='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ZoneName))
CASE (SglHCSetpointFanger)
IF (.not. TComfortControlTypes(ComfortControlledZoneNum)%MustHave(ControlTypeNum)) CYCLE
CALL ShowWarningError('Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('...should include control type 3 ('//trim(ValidComfortControlTypes(SglHCSetpointFanger))// &
') but does not.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TCTStat))//'='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ZoneName))
CASE (DualSetPointFanger)
IF (.not. TComfortControlTypes(ComfortControlledZoneNum)%MustHave(ControlTypeNum)) CYCLE
CALL ShowWarningError('Schedule='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ControlTypeSchedName))
CALL ShowContinueError('...should include control type 4 ('//trim(ValidComfortControlTypes(DualSetPointFanger))// &
') but does not.')
CALL ShowContinueError('..reference '//trim(cZControlTypes(iZC_TCTStat))//'='// &
TRIM(ComfortControlledZone(ComfortControlledZoneNum)%Name))
CALL ShowContinueError('..reference ZONE='//TRIM(ComfortControlledZone(ComfortControlledZoneNum)%ZoneName))
! CASE PIERCE
! CASE KSU
CASE DEFAULT
END SELECT
ENDDO
ENDDO
IF (ALLOCATED(TComfortControlTypes)) DEALLOCATE(TComfortControlTypes)
! Get the Zone Air Capacitance Multiplier for use in the Predictor-Corrrector Procedure
cCurrentModuleObject='ZoneCapacitanceMultiplier:ResearchSpecial'
NumNums=GetNumObjectsFound(cCurrentModuleObject)
IF (NumNums == 0) THEN
ZoneVolCapMultpSens = 1.d0
ZoneVolCapMultpMoist = 1.d0
ZoneVolCapMultpCO2 = 1.d0
ZoneVolCapMultpGenContam = 1.0d0
ELSE
CALL GetObjectItem(cCurrentModuleObject,1,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOStat, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
ZoneVolCapMultpSens = rNumericArgs(1)
ZoneVolCapMultpMoist = rNumericArgs(2)
ZoneVolCapMultpCO2 = rNumericArgs(3)
ZoneVolCapMultpGenContam = rNumericArgs(4)
END IF
WRITE(OutputFileInits, 700)
WRITE(OutputFileInits,701) ZoneVolCapMultpSens, ZoneVolCapMultpMoist, ZoneVolCapMultpCO2, ZoneVolCapMultpGenContam
700 FORMAT ('! <Zone Volume Capacitance Multiplier>, Sensible Heat Capacity Multiplier, Moisture Capacity Multiplier, ', &
'Carbon Dioxide Capacity Multiplier, Generic Contaminant Capacity Multiplier')
701 FORMAT( 'Zone Volume Capacitance Multiplier,' , F8.3,' ,', F8.3,',', F8.3,',', F8.3)
cCurrentModuleObject=cZControlTypes(iZC_OTTStat)
NumOpTempControlledZones = GetNumObjectsFound(cCurrentModuleObject)
IF (NumOpTempControlledZones > 0) then
AnyOpTempControl = .TRUE.
DO OpTempContrlNum = 1, NumOpTempControlledZones
CALL GetObjectItem(cCurrentModuleObject,OpTempContrlNum, &
cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
! find matching name of ZONECONTROL:THERMOSTAT object
found = FindItem(cAlphaArgs(1),TStatObjects%Name,NumTStatStatements)
IF (found == 0) THEN
! It might be in the TempControlledZones
found=FindItem(cAlphaArgs(1),TempControlledZone%Name,NumTempControlledZones)
IF (found == 0) THEN ! throw error
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid '// &
trim(cZControlTypes(iZC_TStat))//' reference not found.')
ErrorsFound = .TRUE.
ELSE
TempControlledZoneNum = found
TempControlledZone(TempControlledZoneNum)%OperativeTempControl = .TRUE.
IF (SameString(cAlphaArgs(2), 'Scheduled')) THEN
TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled=.TRUE.
ENDIF
IF ( ( .NOT. (SameString(cAlphaArgs(2), 'Scheduled'))) .AND. ( .NOT. (SameString(cAlphaArgs(2), 'Constant'))) ) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'".')
ErrorsFound = .TRUE.
ENDIF
TempControlledZone(TempControlledZoneNum)%FixedRadiativeFraction = rNumericArgs(1)
TempControlledZone(TempControlledZoneNum)%OpTempRadiativeFractionSched = GetScheduleIndex(cAlphaArgs(3))
If ( (TempControlledZone(TempControlledZoneNum)%OpTempRadiativeFractionSched == 0) &
.AND. (TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled) ) THEN !throw error
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'" not found.')
ErrorsFound = .TRUE.
ENDIF
!check validity of fixed radiative fraction
IF ( (TempControlledZone(TempControlledZoneNum)%FixedRadiativeFraction < 0.0d0) &
.AND. (.NOT. (TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled)) ) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid '// &
trim(cNumericFieldNames(1))//'=['//trim(TrimSigDigits(rNumericArgs(1),2))//'" cannot be negative.')
ErrorsFound = .TRUE.
ENDIF
IF ( (TempControlledZone(TempControlledZoneNum)%FixedRadiativeFraction >= 0.9d0) &
.AND. (.NOT. (TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled)) ) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid '// &
trim(cNumericFieldNames(1))//'=['//trim(TrimSigDigits(rNumericArgs(1),2))//'" cannot >= .9.')
ErrorsFound = .TRUE.
ENDIF
! check schedule min max.
IF (TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled) THEN
ValidRadFractSched = &
CheckScheduleValueMinMax(TempControlledZone(TempControlledZoneNum)%OpTempRadiativeFractionSched, &
'>=',0.0,'<',0.9)
IF (.not. ValidRadFractSched) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid values '// &
trim(cAlphaFieldNames(3))//'=['//trim(cAlphaArgs(3))//'".')
CALL ShowContinueError('..Values outside of range [0.0,0.9).')
ErrorsFound=.TRUE.
ENDIF
ENDIF
! CurrentModuleObject='ZoneControl:Thermostat:OperativeTemperature'
CALL SetupOutputVariable('Zone Thermostat Operative Temperature [C]', &
ZnAirRpt(TempControlledZone(TempControlledZoneNum)%ActualZoneNum)%ThermOperativeTemp, &
'Zone','Average',Zone(TempControlledZone(TempControlledZoneNum)%ActualZoneNum)%Name)
ENDIF
ELSE
DO Item=1,TStatObjects(found)%NumOfZones
TempControlledZoneNum = TStatObjects(found)%TempControlledZoneStartPtr+Item-1
IF (NumTempControlledZones == 0) CYCLE
TempControlledZone(TempControlledZoneNum)%OperativeTempControl = .TRUE.
IF (SameString(cAlphaArgs(2), 'Scheduled')) THEN
TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled=.TRUE.
ENDIF
IF (Item == 1) THEN
IF ( ( .NOT. (SameString(cAlphaArgs(2), 'Scheduled'))) .AND. ( .NOT. (SameString(cAlphaArgs(2), 'Constant'))) ) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'".')
ErrorsFound = .TRUE.
ENDIF
ENDIF
TempControlledZone(TempControlledZoneNum)%FixedRadiativeFraction = rNumericArgs(1)
TempControlledZone(TempControlledZoneNum)%OpTempRadiativeFractionSched = GetScheduleIndex(cAlphaArgs(3))
IF (Item == 1) THEN
If ( (TempControlledZone(TempControlledZoneNum)%OpTempRadiativeFractionSched == 0) &
.AND. (TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled) ) THEN !throw error
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'" not found.')
ErrorsFound = .TRUE.
ENDIF
ENDIF
!check validity of fixed radiative fraction
IF (Item == 1) THEN
IF ( (TempControlledZone(TempControlledZoneNum)%FixedRadiativeFraction < 0.0d0) &
.AND. (.NOT. (TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled)) ) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid '// &
trim(cNumericFieldNames(1))//'=['//trim(TrimSigDigits(rNumericArgs(1),2))//'" cannot be negative.')
ErrorsFound = .TRUE.
ENDIF
ENDIF
IF (Item == 1) THEN
IF ( (TempControlledZone(TempControlledZoneNum)%FixedRadiativeFraction >= 0.9d0) &
.AND. (.NOT. (TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled)) ) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid '// &
trim(cNumericFieldNames(1))//'=['//trim(TrimSigDigits(rNumericArgs(1),2))//'" cannot >= .9.')
ErrorsFound = .TRUE.
ENDIF
ENDIF
! check schedule min max.
IF (Item == 1) THEN
IF (TempControlledZone(TempControlledZoneNum)%OpTempCntrlModeScheduled) THEN
ValidRadFractSched = &
CheckScheduleValueMinMax(TempControlledZone(TempControlledZoneNum)%OpTempRadiativeFractionSched, &
'>=',0.0,'<',0.9)
IF (.not. ValidRadFractSched) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid values '// &
trim(cAlphaFieldNames(3))//'=['//trim(cAlphaArgs(3))//'".')
CALL ShowContinueError('..Values outside of range [0.0,0.9).')
ErrorsFound=.TRUE.
ENDIF
ENDIF
ENDIF
! CurrentModuleObject='ZoneControl:Thermostat:OperativeTemperature'
CALL SetupOutputVariable('Zone Thermostat Operative Temperature [C]', &
ZnAirRpt(TempControlledZone(TempControlledZoneNum)%ActualZoneNum)%ThermOperativeTemp, &
'Zone','Average',Zone(TempControlledZone(TempControlledZoneNum)%ActualZoneNum)%Name)
ENDDO ! TStat Objects Loop
ENDIF ! found thermostat referene
ENDDO !loop over NumOpTempControlledZones
ENDIF ! NumOpTempControlledZones > 0
! Overcool dehumidificaton GetInput starts here
cCurrentModuleObject=cZControlTypes(iZC_TandHStat)
NumTempAndHumidityControlledZones = GetNumObjectsFound(cCurrentModuleObject)
IF (NumTempAndHumidityControlledZones > 0) THEN
AnyZoneTempAndHumidityControl = .TRUE.
DO TempHumidityCntrlNum = 1, NumTempAndHumidityControlledZones
CALL GetObjectItem(cCurrentModuleObject,TempHumidityCntrlNum, &
cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
! find matching name of ZONECONTROL:THERMOSTAT object
found = FindItem(cAlphaArgs(1),TStatObjects%Name,NumTStatStatements)
IF (found == 0) THEN
! It might be in the TempControlledZones
found=FindItem(cAlphaArgs(1),TempControlledZone%Name,NumTempControlledZones)
IF (found == 0) THEN ! throw error
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid '// &
TRIM(cZControlTypes(iZC_TStat))//' reference not found.')
ErrorsFound = .TRUE.
ELSE
TempControlledZoneNum = found
TempControlledZone(TempControlledZoneNum)%DehumidifyingSched = cAlphaArgs(2)
TempControlledZone(TempControlledZoneNum)%DehumidifyingSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (TempControlledZone(TempControlledZoneNum)%DehumidifyingSchedIndex == 0) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))//' invalid '// &
TRIM(cAlphaFieldNames(2))//'="'//TRIM(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
END IF
TempControlledZone(TempControlledZoneNum)%ZoneOvercoolControl =.TRUE.
IF ( (SameString(cAlphaArgs(3), 'None')) ) THEN
TempControlledZone(TempControlledZoneNum)%ZoneOvercoolControl =.FALSE.
ENDIF
IF (SameString(cAlphaArgs(4), 'Scheduled')) THEN
TempControlledZone(TempControlledZoneNum)%OverCoolCntrlModeScheduled=.TRUE.
ENDIF
IF ( ( .NOT. (SameString(cAlphaArgs(4), 'Scheduled'))) .AND. ( .NOT. (SameString(cAlphaArgs(4), 'Constant'))) ) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(4))//'="'//TRIM(cAlphaArgs(4))//'".')
ErrorsFound = .TRUE.
ENDIF
TempControlledZone(TempControlledZoneNum)%ZoneOvercoolConstRange = rNumericArgs(1)
TempControlledZone(TempControlledZoneNum)%ZoneOverCoolRangeSchedIndex = GetScheduleIndex(cAlphaArgs(4))
IF ( (TempControlledZone(TempControlledZoneNum)%ZoneOverCoolRangeSchedIndex == 0) &
.AND. (TempControlledZone(TempControlledZoneNum)%OverCoolCntrlModeScheduled) ) THEN !throw error
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid '// &
trim(cAlphaFieldNames(5))//'="'//TRIM(cAlphaArgs(5))//'" not found.')
ErrorsFound = .TRUE.
ENDIF
!check validity of zone Overcool constant range
IF ( (TempControlledZone(TempControlledZoneNum)%ZoneOvercoolConstRange < 0.0d0) &
.AND. (.NOT. (TempControlledZone(TempControlledZoneNum)%OverCoolCntrlModeScheduled)) ) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid '// &
TRIM(cNumericFieldNames(1))//'=['//TRIM(TrimSigDigits(rNumericArgs(1),2))//'" cannot be negative.')
ErrorsFound = .TRUE.
ENDIF
IF ( (TempControlledZone(TempControlledZoneNum)%ZoneOvercoolConstRange > 3.0d0) &
.AND. (.NOT. (TempControlledZone(TempControlledZoneNum)%OvercoolCntrlModeScheduled)) ) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid '// &
TRIM(cNumericFieldNames(1))//'=['//TRIM(TrimSigDigits(rNumericArgs(1),2))//'" cannot be > 3.0')
ErrorsFound = .TRUE.
ENDIF
! check zone Overcool range schedule min/max values.
IF (TempControlledZone(TempControlledZoneNum)%OvercoolCntrlModeScheduled) THEN
ValidZoneOvercoolRangeSched = &
CheckScheduleValueMinMax(TempControlledZone(TempControlledZoneNum)%ZoneOvercoolRangeSchedIndex, &
'>=',0.0d0,'<=',3.0d0)
IF (.not. ValidZoneOvercoolRangeSched) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'='//trim(cAlphaArgs(1))//' invalid values '// &
trim(cAlphaFieldNames(5))//'=['//trim(cAlphaArgs(5))//'".')
CALL ShowContinueError('..Values outside of range [0.0,3.0].')
ErrorsFound=.TRUE.
ENDIF
ENDIF
! check Overcool Control Ratio limits
TempControlledZone(TempControlledZoneNum)%ZoneOvercoolControlRatio = rNumericArgs(2)
IF (TempControlledZone(TempControlledZoneNum)%ZoneOvercoolControlRatio < 0.0d0) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(2))//' invalid '// &
trim(cNumericFieldNames(2))//'=['//TRIM(TrimSigDigits(rNumericArgs(2),2))//'" cannot be negative.')
ErrorsFound = .TRUE.
ENDIF
ENDIF
ELSE
DO Item=1,TStatObjects(found)%NumOfZones
TempControlledZoneNum = TStatObjects(found)%TempControlledZoneStartPtr+Item-1
TempControlledZone(TempControlledZoneNum)%DehumidifyingSched = cAlphaArgs(2)
TempControlledZone(TempControlledZoneNum)%DehumidifyingSchedIndex = GetScheduleIndex(cAlphaArgs(2))
IF (TempControlledZone(TempControlledZoneNum)%DehumidifyingSchedIndex == 0) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))//' invalid '// &
TRIM(cAlphaFieldNames(2))//'="'//TRIM(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
ENDIF
TempControlledZone(TempControlledZoneNum)%ZoneOvercoolControl =.TRUE.
IF ( (SameString(cAlphaArgs(3), 'None'))) THEN
TempControlledZone(TempControlledZoneNum)%ZoneOvercoolControl =.FALSE.
ENDIF
IF (SameString(cAlphaArgs(4), 'Scheduled')) THEN
TempControlledZone(TempControlledZoneNum)%OvercoolCntrlModeScheduled =.FALSE.
ENDIF
IF (Item == 1) THEN
IF ( ( .NOT. (SameString(cAlphaArgs(4), 'Scheduled'))) .AND. ( .NOT. (SameString(cAlphaArgs(4), 'Constant'))) ) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid '// &
TRIM(cAlphaFieldNames(4))//'="'//TRIM(cAlphaArgs(4))//'".')
ErrorsFound = .TRUE.
ENDIF
ENDIF
TempControlledZone(TempControlledZoneNum)%ZoneOvercoolConstRange = rNumericArgs(1)
TempControlledZone(TempControlledZoneNum)%ZoneOvercoolRangeSchedIndex = GetScheduleIndex(cAlphaArgs(6))
IF (Item == 1) THEN
If ( (TempControlledZone(TempControlledZoneNum)%ZoneOvercoolRangeSchedIndex == 0) &
.AND. (TempControlledZone(TempControlledZoneNum)%OvercoolCntrlModeScheduled) ) THEN !throw error
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid '// &
TRIM(cAlphaFieldNames(5))//'="'//TRIM(cAlphaArgs(5))//'" not found.')
ErrorsFound = .TRUE.
ENDIF
ENDIF
!check validity of zone Overcool constant range
IF (Item == 1) THEN
IF ( (TempControlledZone(TempControlledZoneNum)%ZoneOvercoolConstRange < 0.0d0) &
.AND. (.NOT. (TempControlledZone(TempControlledZoneNum)%OvercoolCntrlModeScheduled)) ) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid '// &
TRIM(cNumericFieldNames(1))//'=['//TRIM(TrimSigDigits(rNumericArgs(1),2))//'" cannot be negative.')
ErrorsFound = .TRUE.
ENDIF
ENDIF
IF (Item == 1) THEN
IF ( (TempControlledZone(TempControlledZoneNum)%ZoneOvercoolConstRange > 3.0d0) &
.AND. (.NOT. (TempControlledZone(TempControlledZoneNum)%OvercoolCntrlModeScheduled)) ) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid '// &
TRIM(cNumericFieldNames(1))//'=['//TRIM(TrimSigDigits(rNumericArgs(1),2))//'" cannot > 3.0')
ErrorsFound = .TRUE.
ENDIF
ENDIF
! check zone Overcool range schedule min/max values.
IF (Item == 1) THEN
IF (TempControlledZone(TempControlledZoneNum)%OvercoolCntrlModeScheduled) THEN
ValidZoneOverCoolRangeSched = &
CheckScheduleValueMinMax(TempControlledZone(TempControlledZoneNum)%ZoneOvercoolRangeSchedIndex, &
'>=',0.0d0,'<=',3.0d0)
IF (.not. ValidZoneOverCoolRangeSched) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1))//' invalid values '// &
TRIM(cAlphaFieldNames(5))//'=['//TRIM(cAlphaArgs(5))//'".')
CALL ShowContinueError('..Values outside of range [0.0,3.0].')
ErrorsFound=.TRUE.
ENDIF
ENDIF
ENDIF
TempControlledZone(TempControlledZoneNum)%ZoneOvercoolControlRatio = rNumericArgs(2)
! check Overcool Control Ratio limits
IF (Item == 1) THEN
IF (TempControlledZone(TempControlledZoneNum)%ZoneOvercoolControlRatio < 0.0d0) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(2))//' invalid '// &
trim(cNumericFieldNames(2))//'=['//TRIM(TrimSigDigits(rNumericArgs(2),2))//'" cannot be negative.')
ErrorsFound = .TRUE.
ENDIF
ENDIF
ENDDO ! TStat Objects Loop
ENDIF ! found thermostat reference
ENDDO !loop over NumTempAndHumidityControlledZones
ENDIF ! NumTempAndHumidityControlledZones > 0
! Staged thermostat control inputs start
cCurrentModuleObject=cZControlTypes(iZC_StagedDual)
NumStageControlledZones = GetNumObjectsFound(cCurrentModuleObject)
If (NumStageControlledZones > 0) ALLOCATE(StagedTStatObjects(NumStageControlledZones))
! Pre-scan for use of Zone lists in TStat statements (i.e. Global application of TStat)
NumStageCtrZone=0
DO Item=1,NumStageControlledZones
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1),StagedTStatObjects%Name,Item-1,IsNotOK,IsBlank, &
trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
StagedTStatObjects(Item)%Name=cAlphaArgs(1)
Item1=FindItemInList(cAlphaArgs(2),Zone%Name,NumOfZones)
ZLItem=0
IF (Item1 == 0 .and. NumOfZoneLists > 0) &
ZLItem=FindItemInList(cAlphaArgs(2),ZoneList%Name,NumOfZoneLists)
IF (Item1 > 0) THEN
StagedTStatObjects(Item)%StageControlledZoneStartPtr=NumStageCtrZone+1
NumStageCtrZone=NumStageCtrZone+1
StagedTStatObjects(Item)%NumOfZones=1
StagedTStatObjects(Item)%ZoneListActive=.false.
StagedTStatObjects(Item)%ZoneOrZoneListPtr=Item1
ELSEIF (ZLItem > 0) THEN
StagedTStatObjects(Item)%TempControlledZoneStartPtr=NumStageCtrZone+1
NumStageCtrZone=NumStageCtrZone+ZoneList(ZLItem)%NumOfZones
StagedTStatObjects(Item)%NumOfZones=ZoneList(ZLItem)%NumOfZones
StagedTStatObjects(Item)%ZoneListActive=.true.
StagedTStatObjects(Item)%ZoneOrZoneListPtr=ZLItem
ELSE
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound=.true.
ENDIF
ENDDO
IF (ErrorsFound) THEN
CALL ShowSevereError('GetStagedDualSetpoint: Errors with invalid names in '//trim(cCurrentModuleObject)// &
' objects.')
CALL ShowContinueError('...These will not be read in. Other errors may occur.')
NumStageCtrZone=0
ENDIF
IF (NumStageCtrZone > 0) THEN
ALLOCATE(StageControlledZone(NumStageCtrZone))
ALLOCATE(StageZoneLogic(NumOfZones))
StageZoneLogic = .FALSE.
StageControlledZoneNum = 0
DO Item = 1, NumStageControlledZones
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNums,IOSTAT, &
NumBlank=lNumericFieldBlanks,AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
DO Item1=1,StagedTStatObjects(Item)%NumOfZones
StageControlledZoneNum=StageControlledZoneNum+1
IF (StagedTStatObjects(Item)%ZoneListActive) THEN
cAlphaArgs(2)=Zone(ZoneList(StagedTStatObjects(Item)%ZoneOrZoneListPtr)%Zone(Item1))%Name
ENDIF
ZoneAssigned=FindItemInList(cAlphaArgs(2),StageControlledZone%ZoneName,StageControlledZoneNum-1)
IF (ZoneAssigned == 0) THEN
StageControlledZone(StageControlledZoneNum)%ZoneName = cAlphaArgs(2)
StageControlledZone(StageControlledZoneNum)%ActualZoneNum = FindIteminList(cAlphaArgs(2),Zone%Name,NumOfZones)
IF (StageControlledZone(StageControlledZoneNum)%ActualZoneNum == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
ELSE
! Zone(StageControlledZone(StageControlledZoneNum)%ActualZoneNum)%StageControlledZoneIndex = StageControlledZoneNum
END IF
StageZoneLogic(StageControlledZone(StageControlledZoneNum)%ActualZoneNum) = .TRUE.
ELSE
StageControlledZone(StageControlledZoneNum)%ZoneName = cAlphaArgs(2) ! for continuity
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(2))//'="'//trim(cAlphaArgs(2))//'" zone previously assigned.')
CALL ShowContinueError('...Zone was previously assigned to Thermostat="'// &
trim(StageControlledZone(ZoneAssigned)%Name)//'".')
ErrorsFound = .TRUE.
CYCLE
ENDIF
IF (.not. StagedTStatObjects(Item)%ZoneListActive) THEN
StageControlledZone(StageControlledZoneNum)%Name = cAlphaArgs(1)
ELSE
CALL CheckCreatedZoneItemName(RoutineName,cCurrentModuleObject, &
Zone(ZoneList(StagedTStatObjects(Item)%ZoneOrZoneListPtr)%Zone(Item1))%Name, &
ZoneList(StagedTStatObjects(Item)%ZoneOrZoneListPtr)%MaxZoneNameLength, &
StagedTStatObjects(Item)%Name, &
StageControlledZone%Name, &
StageControlledZoneNum-1, &
StageControlledZone(StageControlledZoneNum)%Name, &
ErrFlag)
IF (ErrFlag) ErrorsFound=.true.
ENDIF
StageControlledZone(StageControlledZoneNum)%NumOfHeatStages = rNumericArgs(1)
If (rNumericArgs(1) .LT. 1 .or. rNumericArgs(1) .GT. 4) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid range '// &
trim(cNumericFieldNames(1))//'="'//trim(RoundSigDigits(rNumericArgs(1),0))//'"')
CALL ShowContinueError('..contains values outside of range [1,4].')
ErrorsFound=.TRUE.
End If
StageControlledZone(StageControlledZoneNum)%HeatSetBaseSchedName = cAlphaArgs(3)
StageControlledZone(StageControlledZoneNum)%HSBchedIndex=GetScheduleIndex(cAlphaArgs(3))
IF (Item1 == 1) THEN ! only show error on first of several if zone list
IF (StageControlledZone(StageControlledZoneNum)%HSBchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(3))//'="'//trim(cAlphaArgs(3))//'" not found.')
ErrorsFound = .TRUE.
END IF
ENDIF
StageControlledZone(StageControlledZoneNum)%HeatThroRange = rNumericArgs(2)
If (rNumericArgs(1) .LT. 0.d0) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" negative value is found at '// &
trim(cNumericFieldNames(2))//'="'//trim(RoundSigDigits(rNumericArgs(2),1))//'"')
CALL ShowContinueError('.. The minumum value is 0.')
ErrorsFound=.TRUE.
End If
If (StageControlledZone(StageControlledZoneNum)%NumOfHeatStages .GT. 0) Then
ALLOCATE(StageControlledZone(StageControlledZoneNum)%HeatTOffset( &
StageControlledZone(StageControlledZoneNum)%NumOfHeatStages))
Do i=1, StageControlledZone(StageControlledZoneNum)%NumOfHeatStages
StageControlledZone(StageControlledZoneNum)%HeatTOffset(i) = rNumericArgs(2+i)
If (rNumericArgs(2+i) .GT. 0.d0) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" positive value is found at '// &
trim(cNumericFieldNames(2+i))//'="'//trim(RoundSigDigits(rNumericArgs(2+i),1))//'"')
CALL ShowContinueError('.. The maximum value is 0.')
ErrorsFound=.TRUE.
End If
If (lNumericFieldBlanks(2+i)) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//' object ='//TRIM(cAlphaArgs(1))// &
'. The input of ' //TRIM(cNumericFieldNames(2+i))//' is required, but a blank is found.')
ErrorsFound=.TRUE.
End If
If (i > 1) Then
If (rNumericArgs(2+i) >= rNumericArgs(1+i)) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" The value at '// &
trim(cNumericFieldNames(2+i))//'="'//trim(RoundSigDigits(rNumericArgs(2+i),1))//'" has to be less than ')
CALL ShowContinueError(trim(cNumericFieldNames(1+i))//'="'//trim(RoundSigDigits(rNumericArgs(1+i),1)))
ErrorsFound=.TRUE.
End If
End If
End Do
End If
StageControlledZone(StageControlledZoneNum)%NumOfCoolStages = rNumericArgs(7)
If (rNumericArgs(7) .LT. 1 .or. rNumericArgs(7) .GT. 4) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid range '// &
trim(cNumericFieldNames(7))//'="'//trim(RoundSigDigits(rNumericArgs(7),0))//'"')
CALL ShowContinueError('..contains values outside of range [1,4].')
ErrorsFound=.TRUE.
End If
StageControlledZone(StageControlledZoneNum)%CoolSetBaseSchedName = cAlphaArgs(4)
StageControlledZone(StageControlledZoneNum)%CSBchedIndex=GetScheduleIndex(cAlphaArgs(4))
IF (Item1 == 1) THEN ! only show error on first of several if zone list
IF (StageControlledZone(StageControlledZoneNum)%CSBchedIndex == 0) THEN
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFieldNames(4))//'="'//trim(cAlphaArgs(4))//'" not found.')
ErrorsFound = .TRUE.
END IF
ENDIF
StageControlledZone(StageControlledZoneNum)%CoolThroRange = rNumericArgs(8)
If (rNumericArgs(8) .LT. 0.d0) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" negative value is found at '// &
trim(cNumericFieldNames(8))//'="'//trim(RoundSigDigits(rNumericArgs(8),1))//'"')
CALL ShowContinueError('.. The minumum value is 0.')
ErrorsFound=.TRUE.
End If
If (StageControlledZone(StageControlledZoneNum)%NumOfCoolStages .GT. 0) Then
ALLOCATE(StageControlledZone(StageControlledZoneNum)%CoolTOffset( &
StageControlledZone(StageControlledZoneNum)%NumOfCoolStages))
Do i=1, StageControlledZone(StageControlledZoneNum)%NumOfCoolStages
StageControlledZone(StageControlledZoneNum)%CoolTOffset(i) = rNumericArgs(8+i)
If (rNumericArgs(8+i) .LT. 0.d0) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" negative value is found at '// &
trim(cNumericFieldNames(8+i))//'="'//trim(RoundSigDigits(rNumericArgs(8+i),1))//'"')
CALL ShowContinueError('.. The minimum value is 0.')
ErrorsFound=.TRUE.
End If
If (lNumericFieldBlanks(8+i)) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//' object ='//TRIM(cAlphaArgs(1))// &
'. The input of ' //TRIM(cNumericFieldNames(8+i))//' is required, but a blank is found.')
ErrorsFound=.TRUE.
End If
If (i > 1) Then
If (rNumericArgs(8+i) <= rNumericArgs(7+i)) Then
CALL ShowSevereError(trim(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" The value at '// &
trim(cNumericFieldNames(8+i))//'="'//trim(RoundSigDigits(rNumericArgs(8+i),1))//'" has to be greater than ')
CALL ShowContinueError(trim(cNumericFieldNames(7+i))//'="'//trim(RoundSigDigits(rNumericArgs(7+i),1)))
ErrorsFound=.TRUE.
End If
End If
End Do
End If
End Do
ENDDO !loop over NumStageControlledZones
If ((GetNumObjectsFound('AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed') .EQ. 0) .AND. &
(GetNumObjectsFound('AirLoopHVAC:UnitarySystem') .EQ. 0) .AND. &
(GetNumObjectsFound('SetpointManager:SingleZone:OneStageCooling') == 0) .AND. &
(GetNumObjectsFound('SetpointManager:SingleZone:OneStageHeating') == 0) ) THEN
CALL ShowWarningError(Trim(cCurrentModuleObject)// &
' is applicable to only selected HVAC objects which are missing from input.' )
CALL ShowContinueError('Model should include one or more of the following objects: ')
CALL ShowContinueError('AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed, AirLoopHVAC:UnitarySystem, ')
CALL ShowContinueError('SetpointManager:SingleZone:OneStageCooling, '// &
'and/or SetpointManager:SingleZone:OneStageHeating. The simulation continues...')
End If
ENDIF ! NumStageControlledZones > 0
IF (ErrorsFound) THEN
CALL ShowFatalError('Errors getting Zone Control input data. Preceding condition(s) cause termination.')
END IF
RETURN
END SUBROUTINE GetZoneAirSetpoints