Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | usingVariable |
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 addMonthlyCharge(usingVariable)
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer of GARD Analytics, Inc.
! DATE WRITTEN July 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Include the monthly charges in the calculations
! METHODOLOGY EMPLOYED:
! REFERENCES:
! na
! USE STATEMENTS:
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: usingVariable
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: curTariff
!INTEGER :: iMonth
!INTEGER :: curTotalEnergy
curTariff = econVar(usingVariable)%tariffIndx
!check the tariff - make sure they match
IF (tariff(curTariff)%ptServiceCharges .NE. usingVariable) THEN
CALL ShowWarningError('UtilityCost:Tariff Debugging issue. Tariff index for service charge does not match variable pointer.')
CALL ShowContinueError(' Between: ' // TRIM(tariff(curTariff)%tariffName))
CALL ShowContinueError(' And: ' // TRIM(tariff(tariff(curTariff)%ptServiceCharges)%tariffName))
END IF
IF (tariff(curTariff)%monthChgPt .NE. 0) THEN
econVar(usingVariable)%values = econVar(tariff(curTariff)%monthChgPt)%values + econVar(usingVariable)%values
ELSE
econVar(usingVariable)%values = tariff(curTariff)%monthChgVal + econVar(usingVariable)%values
END IF
!zero out months with no energy consumption
!curTotalEnergy = tariff(curTariff)%nativeTotalEnergy
!DO iMonth = 1, MaxNumMonths
! IF (econVar(curTotalEnergy)%values(iMonth) .EQ. 0) THEN
! econVar(usingVariable)%values(iMonth) = 0
! END IF
!END DO
END SUBROUTINE addMonthlyCharge