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

Method totalSourceEnergy

src/utilities/sql/SqlFile_Impl.cpp:1009–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1007 }
1008
1009 boost::optional<double> SqlFile_Impl::totalSourceEnergy() const {
1010 boost::optional<double> hours = hoursSimulated();
1011 if (!hours) {
1012 LOG(Warn, "Reporting Total Source Energy with unknown number of simulation hours");
1013 } else if (*hours != 8760) {
1014 LOG(Warn, "Reporting Total Source Energy with " << *hours << " hrs");
1015 }
1016
1017 const std::string& s = R"(SELECT Value FROM TabularDataWithStrings
1018 WHERE ReportName='AnnualBuildingUtilityPerformanceSummary'
1019 AND ReportForString='Entire Facility'
1020 AND TableName='Site and Source Energy'
1021 AND RowName='Total Source Energy'
1022 AND ColumnName='Total Energy'
1023 AND Units='GJ')";
1024 return execAndReturnFirstDouble(s);
1025 }
1026
1027 OptionalDouble SqlFile_Impl::annualTotalCost(const FuelType& fuel) const {
1028 if (fuel == FuelType::Electricity) {

Callers

nothing calls this directly

Calls 1

execAndReturnFirstDoubleFunction · 0.70

Tested by

no test coverage detected