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

Method endUses

src/utilities/sql/SqlFile_Impl.cpp:1261–1282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1259 }
1260
1261 boost::optional<EndUses> SqlFile_Impl::endUses() const {
1262 EndUses result;
1263
1264 for (EndUseFuelType fuelType : result.fuelTypes()) {
1265 std::string units = result.getUnitsForFuelType(fuelType);
1266 for (EndUseCategoryType category : result.categories()) {
1267
1268 std::string query = "SELECT Value from TabularDataWithStrings where (reportname = 'AnnualBuildingUtilityPerformanceSummary') and "
1269 "(ReportForString = 'Entire Facility') and (TableName = 'End Uses' ) and (ColumnName ='"
1270 + fuelType.valueDescription() + "') and (RowName ='" + category.valueDescription() + "') and (Units = '" + units + "')";
1271
1272 boost::optional<double> value = execAndReturnFirstDouble(query);
1273 OS_ASSERT(value);
1274
1275 if (*value != 0.0) {
1276 result.addEndUse(*value, fuelType, category);
1277 }
1278 }
1279 }
1280
1281 return result;
1282 }
1283
1284 OptionalDouble SqlFile_Impl::electricityHeating() const {
1285 return execAndReturnFirstDouble(

Callers

nothing calls this directly

Calls 6

fuelTypesMethod · 0.80
getUnitsForFuelTypeMethod · 0.80
categoriesMethod · 0.80
valueDescriptionMethod · 0.80
addEndUseMethod · 0.80
execAndReturnFirstDoubleFunction · 0.70

Tested by

no test coverage detected