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

Method peakEnergyDemandByMonth

src/utilities/sql/SqlFile_Impl.cpp:902–919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900 }
901
902 boost::optional<double> SqlFile_Impl::peakEnergyDemandByMonth(const openstudio::EndUseFuelType& t_fuelType,
903 const openstudio::EndUseCategoryType& t_categoryType,
904 const openstudio::MonthOfYear& t_monthOfYear) const {
905 const std::string reportName = "BUILDING ENERGY PERFORMANCE - " + boost::algorithm::to_upper_copy(t_fuelType.valueDescription()) + " PEAK DEMAND";
906 const std::string columnName = boost::algorithm::to_upper_copy(t_categoryType.valueName()) + ":"
907 + boost::algorithm::to_upper_copy(boost::algorithm::erase_all_copy(t_fuelType.valueDescription(), " "))
908 + " {AT MAX/MIN}";
909 const std::string rowName = t_monthOfYear.valueDescription();
910
911 const std::string& s = R"(SELECT Value FROM TabularDataWithStrings
912 WHERE ReportName=?
913 AND ReportForString='Meter'
914 AND RowName=?
915 AND ColumnName=?
916 AND Units='W')";
917
918 return execAndReturnFirstDouble(s, reportName, rowName, columnName);
919 }
920
921 /// hours simulated
922 boost::optional<double> SqlFile_Impl::hoursSimulated() const {

Callers

nothing calls this directly

Calls 3

valueDescriptionMethod · 0.80
valueNameMethod · 0.80
execAndReturnFirstDoubleFunction · 0.70

Tested by

no test coverage detected