MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / annualTotalCostPerBldgArea

Method annualTotalCostPerBldgArea

src/utilities/sql/SqlFile_Impl.cpp:1054–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1052 }
1053
1054 OptionalDouble SqlFile_Impl::annualTotalCostPerBldgArea(const FuelType& fuel) const {
1055 // Get the total building area
1056 boost::optional<double> totalBuildingArea = execAndReturnFirstDouble(
1057 "SELECT Value from TabularDataWithStrings where (reportname = 'AnnualBuildingUtilityPerformanceSummary') and (ReportForString = 'Entire "
1058 "Facility') and (TableName = 'Building Area') and (ColumnName = 'Area') and (RowName = 'Total Building Area') and (Units = 'm2')");
1059
1060 // Get the annual energy cost
1061 boost::optional<double> annualEnergyCost = annualTotalCost(fuel);
1062
1063 // Return the cost per area
1064 boost::optional<double> costPerArea;
1065 if ((totalBuildingArea && annualEnergyCost) && (totalBuildingArea > 0.0)) {
1066 costPerArea = *annualEnergyCost / *totalBuildingArea;
1067 }
1068
1069 return costPerArea;
1070 }
1071
1072 OptionalDouble SqlFile_Impl::annualTotalCostPerNetConditionedBldgArea(const FuelType& fuel) const {
1073 // Get the total building area

Callers

nothing calls this directly

Calls 1

execAndReturnFirstDoubleFunction · 0.70

Tested by

no test coverage detected