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 SetupInitialPlantCallingOrder
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Feb 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! setup the order that plant loops are to be called
! METHODOLOGY EMPLOYED:
! simple rule-based allocation of which order to call the half loops
! initially just mimicing historical practice until a better set of rules is
! developed
! 1. first call all plant demand sides
! 2. second call all plant supply sides
! 3. third call all condenser demand sides
! 4. fourth call all condenser supply sides
! REFERENCES:
! na
! USE STATEMENTS:
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:
INTEGER :: OrderIndex ! local
INTEGER :: I ! local loop
TotNumHalfLoops = 2*TotNumLoops
IF (TotNumHalfLoops <= 0) Return
! first allocate to total number of plant half loops
IF (.not. ALLOCATED(PlantCallingOrderInfo) ) ALLOCATE ( PlantCallingOrderInfo(TotNumHalfLoops))
! set plant loop demand sides
Do I = 1, NumPlantLoops
PlantCallingOrderInfo(I)%LoopIndex = I
PlantCallingOrderInfo(I)%LoopSide = DemandSide
ENDDO
! set plant loop supply sides
Do I = 1, NumPlantLoops
OrderIndex = I + NumPlantLoops
PlantCallingOrderInfo(OrderIndex)%LoopIndex = I
PlantCallingOrderInfo(OrderIndex)%LoopSide = SupplySide
ENDDO
! set condenser Loop demand sides
Do I = 1, NumCondLoops
OrderIndex = 2 * NumPlantLoops + I
PlantCallingOrderInfo(OrderIndex)%LoopIndex = NumPlantLoops + I
PlantCallingOrderInfo(OrderIndex)%LoopSide = DemandSide
ENDDO
! set condenser Loop supply sides
Do I = 1, NumCondLoops
OrderIndex = 2 * NumPlantLoops + NumCondLoops + I
PlantCallingOrderInfo(OrderIndex)%LoopIndex = NumPlantLoops + I
PlantCallingOrderInfo(OrderIndex)%LoopSide = SupplySide
ENDDO
! legacy one-time calling control stuff moved here from manager routine, hopefully remove
IF(.NOT. ALLOCATED(LoadChangeDownStream)) ALLOCATE(LoadChangeDownStream(TotNumLoops))
RETURN
END SUBROUTINE SetupInitialPlantCallingOrder