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.
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 GetCostEstimateInput
! SUBROUTINE INFORMATION:
! AUTHOR BGriffith
! DATE WRITTEN April 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Get Cost Estimation object input.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem ! might also use FindItemInList
USE DataIPShortCuts
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 :: Item ! Item to be "gotten"
INTEGER :: NumCostAdjust
INTEGER :: NumRefAdjust
INTEGER :: NumAlphas ! Number of Alphas for each GetObjectItem call
INTEGER :: NumNumbers ! Number of Numbers for each GetObjectItem call
INTEGER :: IOStatus ! Used in GetObjectItem
LOGICAL :: ErrorsFound=.false. ! Set to true if errors in input, fatal at end of routine
NumLineItems=GetNumObjectsFound('ComponentCost:LineItem')
IF (NumLineItems == 0) THEN
DoCostEstimate = .FALSE.
Return
ELSE
DoCostEstimate = .TRUE.
! WriteTabularFiles = .TRUE.
ENDIF
IF (.NOT. ALLOCATED(CostLineItem)) then
ALLOCATE(CostLineItem(NumLineItems))
ENDIF
cCurrentModuleObject = 'ComponentCost:LineItem'
DO Item=1,NumLineItems
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus)
CostLineItem(item)%LineName = cAlphaArgs(1)
CostLineItem(item)%LineType = cAlphaArgs(2)
CostLineItem(item)%ParentObjType = cAlphaArgs(3)
CostLineItem(item)%ParentObjName = cAlphaArgs(4)
CostLineItem(item)%ParentObjKey = cAlphaArgs(5)
CostLineItem(item)%PerEach = rNumericArgs(1)
CostLineItem(item)%PerSquareMeter = rNumericArgs(2)
CostLineItem(item)%PerKiloWattCap = rNumericArgs(3)
CostLineItem(item)%PerKWCapPerCOP = rNumericArgs(4)
CostLineItem(item)%PerCubicMeter = rNumericArgs(5)
CostLineItem(item)%PerCubMeterPerSec = rNumericArgs(6)
CostLineItem(item)%PerUAinWattperDelK = rNumericArgs(7)
CostLineItem(item)%Qty = rNumericArgs(8)
! CostLineItem(item)%AnnualMaintFract = rNumericArgs(9)
! CostLineItem(item)%MinorOverhallFract = rNumericArgs(10)
! CostLineItem(item)%MinorOverhallYears = rNumericArgs(11)
! CostLineItem(item)%MajorOverhallFract = rNumericArgs(12)
! CostLineItem(item)%MajorOverhallYears = rNumericArgs(13)
! CostLineItem(item)%LifeYears = rNumericArgs(14)
! CostLineItem(item)%ValueAtReplacement = rNumericArgs(15)
ENDDO
!most input error checking to be performed later within Case construct in Calc routine.
! do inits that aren't in a derived type
NumCostAdjust = 0
NumRefAdjust = 0
cCurrentModuleObject = 'ComponentCost:Adjustments'
NumCostAdjust = GetNumObjectsFound(cCurrentModuleObject)
If (NumCostAdjust == 1) then
CALL GetObjectItem(cCurrentModuleObject,1,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus)
CurntBldg%MiscCostperSqMeter = rNumericArgs(1)
CurntBldg%DesignFeeFrac = rNumericArgs(2)
CurntBldg%ContractorFeeFrac = rNumericArgs(3)
CurntBldg%ContingencyFrac = rNumericArgs(4)
CurntBldg%BondCostFrac = rNumericArgs(5)
CurntBldg%CommissioningFrac = rNumericArgs(6)
CurntBldg%RegionalModifier = rNumericArgs(7)
ELSEIF (NumCostAdjust > 1) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': Only one instance of this object is allowed.')
ErrorsFound = .TRUE.
END IF
cCurrentModuleObject = 'ComponentCost:Reference'
NumRefAdjust = GetNumObjectsFound(cCurrentModuleObject)
If (NumRefAdjust == 1) then
CALL GetObjectItem(cCurrentModuleObject,1,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus)
RefrncBldg%LineItemTot = rNumericArgs(1)
RefrncBldg%MiscCostperSqMeter = rNumericArgs(2)
RefrncBldg%DesignFeeFrac = rNumericArgs(3)
RefrncBldg%ContractorFeeFrac = rNumericArgs(4)
RefrncBldg%ContingencyFrac = rNumericArgs(5)
RefrncBldg%BondCostFrac = rNumericArgs(6)
RefrncBldg%CommissioningFrac = rNumericArgs(7)
RefrncBldg%RegionalModifier = rNumericArgs(8)
ELSEIF (NumRefAdjust > 1) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//' : Only one instance of this object is allowed.')
ErrorsFound = .TRUE.
END IF
IF (ErrorsFound) THEN
CALL ShowFatalError('Errors found in processing cost estimate input')
ENDIF
CALL CheckCostEstimateInput(ErrorsFound)
IF (ErrorsFound) THEN
CALL ShowFatalError('Errors found in processing cost estimate input')
ENDIF
RETURN
END SUBROUTINE GetCostEstimateInput