Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | AirLoopNum | |||
integer, | intent(in) | :: | WarmRestartStatus | |||
integer, | intent(in) | :: | AirLoopIterMax | |||
integer, | intent(in) | :: | AirLoopIterTot | |||
integer, | intent(in) | :: | AirLoopNumCalls |
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 TrackAirLoopControllers( &
AirLoopNum, &
WarmRestartStatus, &
AirLoopIterMax, AirLoopIterTot, AirLoopNumCalls )
! SUBROUTINE INFORMATION:
! AUTHOR Dimitri Curtil
! DATE WRITTEN April 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Updates runtime statistics for controllers on the specified air loop.
! Used to produce objective metrics when analyzing runtime performance
! of HVAC controllers for different implementations.
!
! METHODOLOGY EMPLOYED:
! Needs description, as appropriate.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHVACGlobals, ONLY : NumPrimaryAirSys
USE DataAirSystems, ONLY : PrimaryAirSystem
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, INTENT(IN) :: AirLoopNum
! See CONTROLLER_WARM_RESTART_<> parameters in DataHVACControllers.f90
! If Status<0, no speculative warm restart.
! If Status==0, speculative warm restart failed.
! If Status>0, speculative warm restart succeeded.
INTEGER, INTENT(IN) :: WarmRestartStatus
! Max number of iterations performed by controllers on this air loop (per call to SimAirLoop)
INTEGER, INTENT(IN) :: AirLoopIterMax
! Aggregated number of iterations performed by controllers on this air loop (per call to SimAirLoop)
INTEGER, INTENT(IN) :: AirLoopIterTot
! Number of times SimAirLoopComponents() has been invoked
INTEGER, INTENT(IN) :: AirLoopNumCalls
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ControllerNum
! FLOW
! If no controllers on this air loop then we have nothig to do
IF ( PrimaryAirSystem(AirLoopNum)%NumControllers == 0 ) RETURN
! To avoid tracking statistics in case of no air loop or no HVAC controllers are defined
IF ( NumAirLoopStats == 0 ) RETURN
! Update performance statistics for air loop
AirLoopStats(AirLoopNum)%NumCalls = AirLoopStats(AirLoopNum)%NumCalls + 1
SELECT CASE (WarmRestartStatus)
CASE (iControllerWarmRestartSuccess)
AirLoopStats(AirLoopNum)%NumSuccessfulWarmRestarts = &
AirLoopStats(AirLoopNum)%NumSuccessfulWarmRestarts + 1
CASE (iControllerWarmRestartFail)
AirLoopStats(AirLoopNum)%NumFailedWarmRestarts = &
AirLoopStats(AirLoopNum)%NumFailedWarmRestarts + 1
CASE DEFAULT
! Nothing to do if no speculative warm restart used
END SELECT
AirLoopStats(AirLoopNum)%TotSimAirLoopComponents = &
AirLoopStats(AirLoopNum)%TotSimAirLoopComponents + AirLoopNumCalls
AirLoopStats(AirLoopNum)%MaxSimAirLoopComponents = MAX( &
AirLoopStats(AirLoopNum)%MaxSimAirLoopComponents, &
AirLoopNumCalls &
)
AirLoopStats(AirLoopNum)%TotIterations = &
AirLoopStats(AirLoopNum)%TotIterations + AirLoopIterTot
AirLoopStats(AirLoopNum)%MaxIterations = MAX( &
AirLoopStats(AirLoopNum)%MaxIterations, &
AirLoopIterMax &
)
! Update performance statistics for each controller on air loop
DO ControllerNum=1,PrimaryAirSystem(AirLoopNum)%NumControllers
CALL TrackAirLoopController( AirLoopNum, ControllerNum )
END DO
RETURN
END SUBROUTINE TrackAirLoopControllers