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 SurveyDemandManagers
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN July 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Checks to see if any demand managers can reduce the load
! METHODOLOGY EMPLOYED:
!
! USE STATEMENTS:
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: MgrNum, LoadNum, LoadPtr
LOGICAL :: CanReduceDemand
! FLOW:
DO MgrNum = 1, NumDemandMgr
DemandMgr(MgrNum)%CanReduceDemand = .FALSE.
IF (.NOT. DemandMgr(MgrNum)%Available) CYCLE
IF (DemandMgr(MgrNum)%LimitControl == ManagerLimitOff) CYCLE
IF (DemandMgr(MgrNum)%Active) CYCLE ! This works for FIXED control action, but not VARIABLE
! VARIABLE control could actually reduce demand farther, even if active already
DO LoadNum = 1, DemandMgr(MgrNum)%NumOfLoads
LoadPtr = DemandMgr(MgrNum)%Load(LoadNum)
! Check if this load can reduce demand
! Assume FIXED control action for now, needs more sophisticated check for VARIABLE control
CALL LoadInterface(CheckCanReduce, MgrNum, LoadPtr, CanReduceDemand)
IF (CanReduceDemand) THEN
DemandMgr(MgrNum)%CanReduceDemand = .TRUE.
EXIT ! If any one load can reduce demand, then the whole demand manager can reduce demand
END IF
END DO ! LoadNum
END DO ! MgrNum
RETURN
END SUBROUTINE SurveyDemandManagers