Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | meterName |
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.
INTEGER FUNCTION DetermineIndexGroupKeyFromMeterName (meterName)
! FUNCTION INFORMATION:
! AUTHOR Greg Stark
! DATE WRITTEN May 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function attemps to guess determine how a meter variable should be
! grouped. It does this by parsing the meter name and then assigns a
! indexGroupKey based on the name
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: meterName ! the meter name
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: indexGroupKey = -1
! Facility indices are in the 100s
IF (INDEX(meterName, 'Electricity:Facility') > 0) THEN
indexGroupKey = 100
ELSEIF (INDEX(meterName, 'Gas:Facility') > 0) THEN
indexGroupKey = 101
ELSEIF (INDEX(meterName, 'DistricHeating:Facility') > 0) THEN
indexGroupKey = 102
ELSEIF (INDEX(meterName, 'DistricCooling:Facility') > 0) THEN
indexGroupKey = 103
ELSEIF (INDEX(meterName, 'ElectricityNet:Facility') > 0) THEN
indexGroupKey = 104
! Building indices are in the 200s
ELSEIF (INDEX(meterName, 'Electricity:Building') > 0) THEN
indexGroupKey = 201
ELSEIF (INDEX(meterName, 'Gas:Building') > 0) THEN
indexGroupKey = 202
! HVAC indices are in the 300s
ELSEIF (INDEX(meterName, 'Electricity:HVAC') > 0) THEN
indexGroupKey = 301
! InteriorLights:Electricity indices are in the 400s
ELSEIF (INDEX(meterName, 'InteriorLights:Electricity') > 0) THEN
indexGroupKey = 401
! InteriorLights:Electricity:Zone indices are in the 500s
ELSEIF (INDEX(meterName, 'InteriorLights:Electricity:Zone') > 0) THEN
indexGroupKey = 501
! Unknown items have negative indices
ELSE
indexGroupKey = -11
ENDIF
DetermineIndexGroupKeyFromMeterName = indexGroupKey
RETURN
END FUNCTION DetermineIndexGroupKeyFromMeterName