hours simulated
| 920 | |
| 921 | /// hours simulated |
| 922 | boost::optional<double> SqlFile_Impl::hoursSimulated() const { |
| 923 | const std::string& s = R"(SELECT Value FROM TabularDataWithStrings |
| 924 | WHERE ReportName='InputVerificationandResultsSummary' |
| 925 | AND ReportForString='Entire Facility' |
| 926 | AND TableName='General' |
| 927 | AND RowName='Hours Simulated' |
| 928 | AND Units='hrs')"; |
| 929 | boost::optional<double> ret = execAndReturnFirstDouble(s); |
| 930 | |
| 931 | if (ret) { |
| 932 | return ret; |
| 933 | } |
| 934 | |
| 935 | // Otherwise, let's try to calculate it: |
| 936 | return execAndReturnFirstDouble( |
| 937 | "select " |
| 938 | " (select max(t.hour + ((t.simulationdays-1) * 24)) as mintime from time t join reportmeterdata r on (t.timeindex=r.timeindex))" |
| 939 | " - (select min(t.hour + ((t.simulationdays-1) * 24)) as mintime from time t join reportmeterdata r on (t.timeindex=r.timeindex))" |
| 940 | " + 1;"); |
| 941 | } |
| 942 | |
| 943 | boost::optional<double> SqlFile_Impl::netSiteEnergy() const { |
| 944 | boost::optional<double> hours = hoursSimulated(); |
nothing calls this directly
no test coverage detected