Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE WriteAdaptiveComfortTable
! SUBROUTINE INFORMATION:
! AUTHOR Tyler Hoyt
! DATE WRITTEN August 2011
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Writes summary table for adaptive comfort models. Tabulates
! occupied hours not meeting comfort bounds for ASHRAE-55 and
! CEN-15251 adaptive models.
! METHODOLOGY EMPLOYED:
!
! REFERENCES:
!
! USE STATEMENTS:
USE DataHeatBalance, ONLY: People, TotPeople
USE SQLiteProcedures, ONLY: CreateSQLiteTabularDataRecords
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=MaxNameLength), DIMENSION(5) :: columnHead
INTEGER,ALLOCATABLE,DIMENSION(:) :: columnWidth
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: rowHead
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:,:) :: tableBody
INTEGER :: numPeopleAdaptive = 0
INTEGER :: i
INTEGER, ALLOCATABLE, DIMENSION(:) :: peopleInd ! Index the relevant people
! Should deallocate after writing table. - LKL
IF (displayAdaptiveComfort .AND. TotPeople > 0 ) THEN
ALLOCATE(peopleInd(TotPeople))
DO i=1,TotPeople
IF (People(i)%AdaptiveASH55 .or. People(i)%AdaptiveCEN15251) THEN
numPeopleAdaptive = numPeopleAdaptive + 1
peopleInd(numPeopleAdaptive) = i
END IF
END DO
ALLOCATE(rowHead(numPeopleAdaptive))
ALLOCATE(tableBody(numPeopleAdaptive,5))
CALL WriteReportHeaders('Adaptive Comfort Summary','Entire Facility',0)
CALL writeSubtitle('Time Not Meeting the Adaptive Comfort Models during Occupied Hours')
ALLOCATE(columnWidth(5))
columnWidth = 10
columnHead(1) = 'ASHRAE55 90% Acceptability Limits [Hours]'
columnHead(2) = 'ASHRAE55 80% Acceptability Limits [Hours]'
columnHead(3) = 'CEN15251 Category I Acceptability Limits [Hours]'
columnHead(4) = 'CEN15251 Category II Acceptability Limits [Hours]'
columnHead(5) = 'CEN15251 Category III Acceptability Limits [Hours]'
tableBody = ''
DO i=1,numPeopleAdaptive
rowHead(i) = People(i)%Name
IF (People(i)%AdaptiveASH55) THEN
tableBody(i,1) = TRIM(RealToStr(People(peopleInd(i))%TimeNotMetASH5590,2))
tableBody(i,2) = TRIM(RealToStr(People(peopleInd(i))%TimeNotMetASH5580,2))
END IF
IF (People(i)%AdaptiveCEN15251) THEN
tableBody(i,3) = TRIM(RealToStr(People(peopleInd(i))%TimeNotMetCEN15251CatI,2))
tableBody(i,4) = TRIM(RealToStr(People(peopleInd(i))%TimeNotMetCEN15251CatII,2))
tableBody(i,5) = TRIM(RealToStr(People(peopleInd(i))%TimeNotMetCEN15251CatIII,2))
END IF
END DO
CALL writeTable(tableBody,rowHead,columnHead,columnWidth)
CALL CreateSQLiteTabularDataRecords(tableBody,rowHead,columnHead,&
'AdaptiveComfortReport',&
'Entire Facility',&
'People Summary')
END IF
END SUBROUTINE WriteAdaptiveComfortTable