| 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) { |
nothing calls this directly
no test coverage detected