src/utilities/sql/SqlFile_Impl.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #ifndef UTILITIES_SQL_SQLFILE_IMPL_HPP | ||
| 7 | #define UTILITIES_SQL_SQLFILE_IMPL_HPP | ||
| 8 | |||
| 9 | #include "../UtilitiesAPI.hpp" | ||
| 10 | |||
| 11 | #include "SummaryData.hpp" | ||
| 12 | #include "SqlFileEnums.hpp" | ||
| 13 | #include "SqlFileDataDictionary.hpp" | ||
| 14 | #include "PreparedStatement.hpp" | ||
| 15 | #include "../data/DataEnums.hpp" | ||
| 16 | #include "../data/EndUses.hpp" | ||
| 17 | #include "../core/Optional.hpp" | ||
| 18 | #include "../data/Matrix.hpp" | ||
| 19 | |||
| 20 | #include "../core/Deprecated.hpp" | ||
| 21 | |||
| 22 | #include <boost/optional.hpp> | ||
| 23 | |||
| 24 | #include <string> | ||
| 25 | #include <vector> | ||
| 26 | |||
| 27 | struct sqlite3; | ||
| 28 | |||
| 29 | namespace openstudio { | ||
| 30 | |||
| 31 | // forward declarations | ||
| 32 | class SqlFileTimeSeriesQuery; | ||
| 33 | class EpwFile; | ||
| 34 | class DateTime; | ||
| 35 | class Calendar; | ||
| 36 | |||
| 37 | // private namespace | ||
| 38 | namespace detail { | ||
| 39 | |||
| 40 | class UTILITIES_API SqlFile_Impl | ||
| 41 | { | ||
| 42 | public: | ||
| 43 | /// constructor from filesystem path, will throw ConstructorException if file does not exist | ||
| 44 | /// or if file is not valid | ||
| 45 | /// createIndexes will create useful indexes when opening an sqlite file but for faster opening | ||
| 46 | /// pass in false if those indexes are not needed | ||
| 47 | SqlFile_Impl(const openstudio::path& path, const bool createIndexes = true); | ||
| 48 | |||
| 49 | /// createIndexes will create useful indexes when creating an sqlite file but for faster creation | ||
| 50 | /// pass in false if those indexes are not needed | ||
| 51 | SqlFile_Impl(const openstudio::path& t_path, const openstudio::EpwFile& t_epwFile, const openstudio::DateTime& t_simulationTime, | ||
| 52 | const openstudio::Calendar& t_calendar, const bool createIndexes = true); | ||
| 53 | |||
| 54 | // virtual destructor | ||
| 55 | virtual ~SqlFile_Impl(); | ||
| 56 | |||
| 57 | /// remove useful indexes, good for inserting lots of data | ||
| 58 | void removeIndexes(); | ||
| 59 | |||
| 60 | /// Create useful indexes | ||
| 61 | void createIndexes(); | ||
| 62 | |||
| 63 | /// returns whether or not connection is open | ||
| 64 | bool connectionOpen() const; | ||
| 65 | |||
| 66 | /// get the path | ||
| 67 | openstudio::path path() const; | ||
| 68 | |||
| 69 | /// close the file | ||
| 70 | bool close(); | ||
| 71 | |||
| 72 | /// re-open the file | ||
| 73 | bool reopen(); | ||
| 74 | |||
| 75 | /// hours simulated | ||
| 76 | boost::optional<double> hoursSimulated() const; | ||
| 77 | |||
| 78 | /// net site energy in GJ | ||
| 79 | boost::optional<double> netSiteEnergy() const; | ||
| 80 | |||
| 81 | /// net source energy in GJ | ||
| 82 | boost::optional<double> netSourceEnergy() const; | ||
| 83 | |||
| 84 | /// total site energy in GJ | ||
| 85 | boost::optional<double> totalSiteEnergy() const; | ||
| 86 | |||
| 87 | /// total source energy in GJ | ||
| 88 | boost::optional<double> totalSourceEnergy() const; | ||
| 89 | |||
| 90 | // return a vector of all the available time series | ||
| 91 | // do not return variables only reported at run period intervals | ||
| 92 | std::vector<std::string> availableTimeSeries(); | ||
| 93 | |||
| 94 | /// Returns the annual total cost associated with the given fuel type in dollars. | ||
| 95 | /// Requires EnergyPlus simulation output to calculate. | ||
| 96 | boost::optional<double> annualTotalCost(const FuelType& fuel) const; | ||
| 97 | |||
| 98 | /// Returns the annual total cost per total building area associated with the given fuel type in dollars per square meter. | ||
| 99 | /// Requires EnergyPlus simulation output to calculate. | ||
| 100 | boost::optional<double> annualTotalCostPerBldgArea(const FuelType& fuel) const; | ||
| 101 | |||
| 102 | /// Returns the annual total cost per net conditioned building area associated with the given fuel type in dollars per square meter. | ||
| 103 | /// Requires EnergyPlus simulation output to calculate. | ||
| 104 | boost::optional<double> annualTotalCostPerNetConditionedBldgArea(const FuelType& fuel) const; | ||
| 105 | |||
| 106 | /// Returns the annual total cost for all fuel types in dollars. Requires EnergyPlus simulation output to calculate. | ||
| 107 | boost::optional<double> annualTotalUtilityCost() const; | ||
| 108 | |||
| 109 | /// Returns an EndUses object containing all end uses for the simulation. | ||
| 110 | boost::optional<EndUses> endUses() const; | ||
| 111 | |||
| 112 | OptionalDouble getElecOrGasUse(bool getGas = true) const; | ||
| 113 | OptionalDouble getElecOrGasCost(bool bGetGas = true) const; | ||
| 114 | |||
| 115 | /// Returns the energy consumption for the given fuel type, category and month | ||
| 116 | /// Requires BUILDING ENERGY PERFORMANCE tabular report | ||
| 117 | boost::optional<double> energyConsumptionByMonth(const openstudio::EndUseFuelType& t_fuelType, | ||
| 118 | const openstudio::EndUseCategoryType& t_categoryType, | ||
| 119 | const openstudio::MonthOfYear& t_monthOfYear) const; | ||
| 120 | |||
| 121 | /// Returns the energy demand for the given fuel type, category and month. | ||
| 122 | /// Requires BUILDING ENERGY PERFORMANCE tabular report. Value is energy use in W. | ||
| 123 | boost::optional<double> peakEnergyDemandByMonth(const openstudio::EndUseFuelType& t_fuelType, | ||
| 124 | const openstudio::EndUseCategoryType& t_categoryType, | ||
| 125 | const openstudio::MonthOfYear& t_monthOfYear) const; | ||
| 126 | |||
| 127 | /// Returns the total energy cost over the analysis period in dollars according to the discounting convention. | ||
| 128 | /// Requires EnergyPlus simulation output and LifeCycleCost_Parameters input object to calculate. | ||
| 129 | boost::optional<double> economicsEnergyCost() const; | ||
| 130 | |||
| 131 | /// Returns the electric energy used for heating in gigajoules. | ||
| 132 | /// Requires EnergyPlus simulation output to calculate. | ||
| 133 | boost::optional<double> electricityHeating() const; | ||
| 134 | |||
| 135 | /// Returns the electric energy used for cooling in gigajoules. | ||
| 136 | /// Requires EnergyPlus simulation output to calculate. | ||
| 137 | boost::optional<double> electricityCooling() const; | ||
| 138 | |||
| 139 | /// Returns the electric energy used for interior lighting in gigajoules. | ||
| 140 | /// Requires EnergyPlus simulation output to calculate. | ||
| 141 | boost::optional<double> electricityInteriorLighting() const; | ||
| 142 | |||
| 143 | /// Returns the electric energy used for exterior lighting in gigajoules. | ||
| 144 | /// Requires EnergyPlus simulation output to calculate. | ||
| 145 | boost::optional<double> electricityExteriorLighting() const; | ||
| 146 | |||
| 147 | /// Returns the electric energy used for interior equipment in gigajoules. | ||
| 148 | /// Requires EnergyPlus simulation output to calculate. | ||
| 149 | boost::optional<double> electricityInteriorEquipment() const; | ||
| 150 | |||
| 151 | /// Returns the electric energy used for exterior equipment in gigajoules. | ||
| 152 | /// Requires EnergyPlus simulation output to calculate. | ||
| 153 | boost::optional<double> electricityExteriorEquipment() const; | ||
| 154 | |||
| 155 | /// Returns the electric energy used for fans in gigajoules. | ||
| 156 | /// Requires EnergyPlus simulation output to calculate. | ||
| 157 | boost::optional<double> electricityFans() const; | ||
| 158 | |||
| 159 | /// Returns the electric energy used for pumps in gigajoules. | ||
| 160 | /// Requires EnergyPlus simulation output to calculate. | ||
| 161 | boost::optional<double> electricityPumps() const; | ||
| 162 | |||
| 163 | /// Returns the electric energy used for heat rejection in gigajoules. | ||
| 164 | /// Requires EnergyPlus simulation output to calculate. | ||
| 165 | boost::optional<double> electricityHeatRejection() const; | ||
| 166 | |||
| 167 | /// Returns the electric energy used for humidification in gigajoules. | ||
| 168 | /// Requires EnergyPlus simulation output to calculate. | ||
| 169 | boost::optional<double> electricityHumidification() const; | ||
| 170 | |||
| 171 | /// Returns the electric energy used for heat recovery in gigajoules. | ||
| 172 | /// Requires EnergyPlus simulation output to calculate. | ||
| 173 | boost::optional<double> electricityHeatRecovery() const; | ||
| 174 | |||
| 175 | /// Returns the electric energy used for water systems in gigajoules. | ||
| 176 | /// Requires EnergyPlus simulation output to calculate. | ||
| 177 | boost::optional<double> electricityWaterSystems() const; | ||
| 178 | |||
| 179 | /// Returns the electric energy used for refrigeration in gigajoules. | ||
| 180 | /// Requires EnergyPlus simulation output to calculate. | ||
| 181 | boost::optional<double> electricityRefrigeration() const; | ||
| 182 | |||
| 183 | /// Returns the electric energy used for generators in gigajoules. | ||
| 184 | /// Requires EnergyPlus simulation output to calculate. | ||
| 185 | boost::optional<double> electricityGenerators() const; | ||
| 186 | |||
| 187 | /// Returns the electric energy used for all uses in gigajoules. | ||
| 188 | /// Requires EnergyPlus simulation output to calculate. | ||
| 189 | boost::optional<double> electricityTotalEndUses() const; | ||
| 190 | |||
| 191 | /// Returns the natural gas energy used for heating in gigajoules. | ||
| 192 | /// Requires EnergyPlus simulation output to calculate. | ||
| 193 | boost::optional<double> naturalGasHeating() const; | ||
| 194 | |||
| 195 | /// Returns the natural gas energy used for cooling in gigajoules. | ||
| 196 | /// Requires EnergyPlus simulation output to calculate. | ||
| 197 | boost::optional<double> naturalGasCooling() const; | ||
| 198 | |||
| 199 | /// Returns the natural gas energy used for interior lighting in gigajoules. | ||
| 200 | /// Requires EnergyPlus simulation output to calculate. | ||
| 201 | boost::optional<double> naturalGasInteriorLighting() const; | ||
| 202 | |||
| 203 | /// Returns the natural gas energy used for exterior lighting in gigajoules. | ||
| 204 | /// Requires EnergyPlus simulation output to calculate. | ||
| 205 | boost::optional<double> naturalGasExteriorLighting() const; | ||
| 206 | |||
| 207 | /// Returns the natural gas energy used for interior equipment in gigajoules. | ||
| 208 | /// Requires EnergyPlus simulation output to calculate. | ||
| 209 | boost::optional<double> naturalGasInteriorEquipment() const; | ||
| 210 | |||
| 211 | /// Returns the natural gas energy used for exterior equipment in gigajoules. | ||
| 212 | /// Requires EnergyPlus simulation output to calculate. | ||
| 213 | boost::optional<double> naturalGasExteriorEquipment() const; | ||
| 214 | |||
| 215 | /// Returns the natural gas energy used for fans in gigajoules. | ||
| 216 | /// Requires EnergyPlus simulation output to calculate. | ||
| 217 | boost::optional<double> naturalGasFans() const; | ||
| 218 | |||
| 219 | /// Returns the natural gas energy used for pumps in gigajoules. | ||
| 220 | /// Requires EnergyPlus simulation output to calculate. | ||
| 221 | boost::optional<double> naturalGasPumps() const; | ||
| 222 | |||
| 223 | /// Returns the natural gas energy used for heat rejection in gigajoules. | ||
| 224 | /// Requires EnergyPlus simulation output to calculate. | ||
| 225 | boost::optional<double> naturalGasHeatRejection() const; | ||
| 226 | |||
| 227 | /// Returns the natural gas energy used for humidification in gigajoules. | ||
| 228 | /// Requires EnergyPlus simulation output to calculate. | ||
| 229 | boost::optional<double> naturalGasHumidification() const; | ||
| 230 | |||
| 231 | /// Returns the natural gas energy used for heat recovery in gigajoules. | ||
| 232 | /// Requires EnergyPlus simulation output to calculate. | ||
| 233 | boost::optional<double> naturalGasHeatRecovery() const; | ||
| 234 | |||
| 235 | /// Returns the natural gas energy used for water systems in gigajoules. | ||
| 236 | /// Requires EnergyPlus simulation output to calculate. | ||
| 237 | boost::optional<double> naturalGasWaterSystems() const; | ||
| 238 | |||
| 239 | /// Returns the natural gas energy used for refrigeration in gigajoules. | ||
| 240 | /// Requires EnergyPlus simulation output to calculate. | ||
| 241 | boost::optional<double> naturalGasRefrigeration() const; | ||
| 242 | |||
| 243 | /// Returns the natural gas energy used for generators in gigajoules. | ||
| 244 | /// Requires EnergyPlus simulation output to calculate. | ||
| 245 | boost::optional<double> naturalGasGenerators() const; | ||
| 246 | |||
| 247 | /// Returns the natural gas energy used for all end uses in gigajoules. | ||
| 248 | /// Requires EnergyPlus simulation output to calculate. | ||
| 249 | boost::optional<double> naturalGasTotalEndUses() const; | ||
| 250 | |||
| 251 | /// Gasoline | ||
| 252 | /// Returns the energy used for heating from gasoline in gigajoules. | ||
| 253 | /// Requires EnergyPlus simulation output to calculate. | ||
| 254 | boost::optional<double> gasolineHeating() const; | ||
| 255 | |||
| 256 | /// Returns the energy used for cooling from gasoline in gigajoules. | ||
| 257 | /// Requires EnergyPlus simulation output to calculate. | ||
| 258 | boost::optional<double> gasolineCooling() const; | ||
| 259 | |||
| 260 | /// Returns the energy used for interior lighting from gasoline in gigajoules. | ||
| 261 | /// Requires EnergyPlus simulation output to calculate. | ||
| 262 | boost::optional<double> gasolineInteriorLighting() const; | ||
| 263 | |||
| 264 | /// Returns the energy used for exterior lighting from gasoline in gigajoules. | ||
| 265 | /// Requires EnergyPlus simulation output to calculate. | ||
| 266 | boost::optional<double> gasolineExteriorLighting() const; | ||
| 267 | |||
| 268 | /// Returns the energy used for interior equipment from gasoline in gigajoules. | ||
| 269 | /// Requires EnergyPlus simulation output to calculate. | ||
| 270 | boost::optional<double> gasolineInteriorEquipment() const; | ||
| 271 | |||
| 272 | /// Returns the energy used for exterior equipment from gasoline in gigajoules. | ||
| 273 | /// Requires EnergyPlus simulation output to calculate. | ||
| 274 | boost::optional<double> gasolineExteriorEquipment() const; | ||
| 275 | |||
| 276 | /// Returns the energy used for fans from gasoline in gigajoules. | ||
| 277 | /// Requires EnergyPlus simulation output to calculate. | ||
| 278 | boost::optional<double> gasolineFans() const; | ||
| 279 | |||
| 280 | /// Returns the energy used for pumps from gasoline in gigajoules. | ||
| 281 | /// Requires EnergyPlus simulation output to calculate. | ||
| 282 | boost::optional<double> gasolinePumps() const; | ||
| 283 | |||
| 284 | /// Returns the energy used for heat rejection from gasoline in gigajoules. | ||
| 285 | /// Requires EnergyPlus simulation output to calculate. | ||
| 286 | boost::optional<double> gasolineHeatRejection() const; | ||
| 287 | |||
| 288 | /// Returns the energy used for humidification from gasoline in gigajoules. | ||
| 289 | /// Requires EnergyPlus simulation output to calculate. | ||
| 290 | boost::optional<double> gasolineHumidification() const; | ||
| 291 | |||
| 292 | /// Returns the energy used for heat recovery from gasoline in gigajoules. | ||
| 293 | /// Requires EnergyPlus simulation output to calculate. | ||
| 294 | boost::optional<double> gasolineHeatRecovery() const; | ||
| 295 | |||
| 296 | /// Returns the energy used for water systems from gasoline in gigajoules. | ||
| 297 | /// Requires EnergyPlus simulation output to calculate. | ||
| 298 | boost::optional<double> gasolineWaterSystems() const; | ||
| 299 | |||
| 300 | /// Returns the energy used for refrigeration from gasoline in gigajoules. | ||
| 301 | /// Requires EnergyPlus simulation output to calculate. | ||
| 302 | boost::optional<double> gasolineRefrigeration() const; | ||
| 303 | |||
| 304 | /// Returns the energy used for generators from gasoline in gigajoules. | ||
| 305 | /// Requires EnergyPlus simulation output to calculate. | ||
| 306 | boost::optional<double> gasolineGenerators() const; | ||
| 307 | |||
| 308 | /// Returns the energy used for all end uses from gasoline in gigajoules. | ||
| 309 | /// Requires EnergyPlus simulation output to calculate. | ||
| 310 | boost::optional<double> gasolineTotalEndUses() const; | ||
| 311 | |||
| 312 | /// Diesel | ||
| 313 | /// Returns the energy used for heating from diesel in gigajoules. | ||
| 314 | /// Requires EnergyPlus simulation output to calculate. | ||
| 315 | boost::optional<double> dieselHeating() const; | ||
| 316 | |||
| 317 | /// Returns the energy used for cooling from diesel in gigajoules. | ||
| 318 | /// Requires EnergyPlus simulation output to calculate. | ||
| 319 | boost::optional<double> dieselCooling() const; | ||
| 320 | |||
| 321 | /// Returns the energy used for interior lighting from diesel in gigajoules. | ||
| 322 | /// Requires EnergyPlus simulation output to calculate. | ||
| 323 | boost::optional<double> dieselInteriorLighting() const; | ||
| 324 | |||
| 325 | /// Returns the energy used for exterior lighting from diesel in gigajoules. | ||
| 326 | /// Requires EnergyPlus simulation output to calculate. | ||
| 327 | boost::optional<double> dieselExteriorLighting() const; | ||
| 328 | |||
| 329 | /// Returns the energy used for interior equipment from diesel in gigajoules. | ||
| 330 | /// Requires EnergyPlus simulation output to calculate. | ||
| 331 | boost::optional<double> dieselInteriorEquipment() const; | ||
| 332 | |||
| 333 | /// Returns the energy used for exterior equipment from diesel in gigajoules. | ||
| 334 | /// Requires EnergyPlus simulation output to calculate. | ||
| 335 | boost::optional<double> dieselExteriorEquipment() const; | ||
| 336 | |||
| 337 | /// Returns the energy used for fans from diesel in gigajoules. | ||
| 338 | /// Requires EnergyPlus simulation output to calculate. | ||
| 339 | boost::optional<double> dieselFans() const; | ||
| 340 | |||
| 341 | /// Returns the energy used for pumps from diesel in gigajoules. | ||
| 342 | /// Requires EnergyPlus simulation output to calculate. | ||
| 343 | boost::optional<double> dieselPumps() const; | ||
| 344 | |||
| 345 | /// Returns the energy used for heat rejection from diesel in gigajoules. | ||
| 346 | /// Requires EnergyPlus simulation output to calculate. | ||
| 347 | boost::optional<double> dieselHeatRejection() const; | ||
| 348 | |||
| 349 | /// Returns the energy used for humidification from diesel in gigajoules. | ||
| 350 | /// Requires EnergyPlus simulation output to calculate. | ||
| 351 | boost::optional<double> dieselHumidification() const; | ||
| 352 | |||
| 353 | /// Returns the energy used for heat recovery from diesel in gigajoules. | ||
| 354 | /// Requires EnergyPlus simulation output to calculate. | ||
| 355 | boost::optional<double> dieselHeatRecovery() const; | ||
| 356 | |||
| 357 | /// Returns the energy used for water systems from diesel in gigajoules. | ||
| 358 | /// Requires EnergyPlus simulation output to calculate. | ||
| 359 | boost::optional<double> dieselWaterSystems() const; | ||
| 360 | |||
| 361 | /// Returns the energy used for refrigeration from diesel in gigajoules. | ||
| 362 | /// Requires EnergyPlus simulation output to calculate. | ||
| 363 | boost::optional<double> dieselRefrigeration() const; | ||
| 364 | |||
| 365 | /// Returns the energy used for generators from diesel in gigajoules. | ||
| 366 | /// Requires EnergyPlus simulation output to calculate. | ||
| 367 | boost::optional<double> dieselGenerators() const; | ||
| 368 | |||
| 369 | /// Returns the energy used for all end uses from diesel in gigajoules. | ||
| 370 | /// Requires EnergyPlus simulation output to calculate. | ||
| 371 | boost::optional<double> dieselTotalEndUses() const; | ||
| 372 | |||
| 373 | /// Coal | ||
| 374 | /// Returns the energy used for heating from coal in gigajoules. | ||
| 375 | /// Requires EnergyPlus simulation output to calculate. | ||
| 376 | boost::optional<double> coalHeating() const; | ||
| 377 | |||
| 378 | /// Returns the energy used for cooling from coal in gigajoules. | ||
| 379 | /// Requires EnergyPlus simulation output to calculate. | ||
| 380 | boost::optional<double> coalCooling() const; | ||
| 381 | |||
| 382 | /// Returns the energy used for interior lighting from coal in gigajoules. | ||
| 383 | /// Requires EnergyPlus simulation output to calculate. | ||
| 384 | boost::optional<double> coalInteriorLighting() const; | ||
| 385 | |||
| 386 | /// Returns the energy used for exterior lighting from coal in gigajoules. | ||
| 387 | /// Requires EnergyPlus simulation output to calculate. | ||
| 388 | boost::optional<double> coalExteriorLighting() const; | ||
| 389 | |||
| 390 | /// Returns the energy used for interior equipment from coal in gigajoules. | ||
| 391 | /// Requires EnergyPlus simulation output to calculate. | ||
| 392 | boost::optional<double> coalInteriorEquipment() const; | ||
| 393 | |||
| 394 | /// Returns the energy used for exterior equipment from coal in gigajoules. | ||
| 395 | /// Requires EnergyPlus simulation output to calculate. | ||
| 396 | boost::optional<double> coalExteriorEquipment() const; | ||
| 397 | |||
| 398 | /// Returns the energy used for fans from coal in gigajoules. | ||
| 399 | /// Requires EnergyPlus simulation output to calculate. | ||
| 400 | boost::optional<double> coalFans() const; | ||
| 401 | |||
| 402 | /// Returns the energy used for pumps from coal in gigajoules. | ||
| 403 | /// Requires EnergyPlus simulation output to calculate. | ||
| 404 | boost::optional<double> coalPumps() const; | ||
| 405 | |||
| 406 | /// Returns the energy used for heat rejection from coal in gigajoules. | ||
| 407 | /// Requires EnergyPlus simulation output to calculate. | ||
| 408 | boost::optional<double> coalHeatRejection() const; | ||
| 409 | |||
| 410 | /// Returns the energy used for humidification from coal in gigajoules. | ||
| 411 | /// Requires EnergyPlus simulation output to calculate. | ||
| 412 | boost::optional<double> coalHumidification() const; | ||
| 413 | |||
| 414 | /// Returns the energy used for heat recovery from coal in gigajoules. | ||
| 415 | /// Requires EnergyPlus simulation output to calculate. | ||
| 416 | boost::optional<double> coalHeatRecovery() const; | ||
| 417 | |||
| 418 | /// Returns the energy used for water systems from coal in gigajoules. | ||
| 419 | /// Requires EnergyPlus simulation output to calculate. | ||
| 420 | boost::optional<double> coalWaterSystems() const; | ||
| 421 | |||
| 422 | /// Returns the energy used for refrigeration from coal in gigajoules. | ||
| 423 | /// Requires EnergyPlus simulation output to calculate. | ||
| 424 | boost::optional<double> coalRefrigeration() const; | ||
| 425 | |||
| 426 | /// Returns the energy used for generators from coal in gigajoules. | ||
| 427 | /// Requires EnergyPlus simulation output to calculate. | ||
| 428 | boost::optional<double> coalGenerators() const; | ||
| 429 | |||
| 430 | /// Returns the energy used for all end uses from coal in gigajoules. | ||
| 431 | /// Requires EnergyPlus simulation output to calculate. | ||
| 432 | boost::optional<double> coalTotalEndUses() const; | ||
| 433 | |||
| 434 | /// Fuel Oil No 1 | ||
| 435 | /// Returns the energy used for heating from fuelOilNo1 in gigajoules. | ||
| 436 | /// Requires EnergyPlus simulation output to calculate. | ||
| 437 | boost::optional<double> fuelOilNo1Heating() const; | ||
| 438 | |||
| 439 | /// Returns the energy used for cooling from fuelOilNo1 in gigajoules. | ||
| 440 | /// Requires EnergyPlus simulation output to calculate. | ||
| 441 | boost::optional<double> fuelOilNo1Cooling() const; | ||
| 442 | |||
| 443 | /// Returns the energy used for interior lighting from fuelOilNo1 in gigajoules. | ||
| 444 | /// Requires EnergyPlus simulation output to calculate. | ||
| 445 | boost::optional<double> fuelOilNo1InteriorLighting() const; | ||
| 446 | |||
| 447 | /// Returns the energy used for exterior lighting from fuelOilNo1 in gigajoules. | ||
| 448 | /// Requires EnergyPlus simulation output to calculate. | ||
| 449 | boost::optional<double> fuelOilNo1ExteriorLighting() const; | ||
| 450 | |||
| 451 | /// Returns the energy used for interior equipment from fuelOilNo1 in gigajoules. | ||
| 452 | /// Requires EnergyPlus simulation output to calculate. | ||
| 453 | boost::optional<double> fuelOilNo1InteriorEquipment() const; | ||
| 454 | |||
| 455 | /// Returns the energy used for exterior equipment from fuelOilNo1 in gigajoules. | ||
| 456 | /// Requires EnergyPlus simulation output to calculate. | ||
| 457 | boost::optional<double> fuelOilNo1ExteriorEquipment() const; | ||
| 458 | |||
| 459 | /// Returns the energy used for fans from fuelOilNo1 in gigajoules. | ||
| 460 | /// Requires EnergyPlus simulation output to calculate. | ||
| 461 | boost::optional<double> fuelOilNo1Fans() const; | ||
| 462 | |||
| 463 | /// Returns the energy used for pumps from fuelOilNo1 in gigajoules. | ||
| 464 | /// Requires EnergyPlus simulation output to calculate. | ||
| 465 | boost::optional<double> fuelOilNo1Pumps() const; | ||
| 466 | |||
| 467 | /// Returns the energy used for heat rejection from fuelOilNo1 in gigajoules. | ||
| 468 | /// Requires EnergyPlus simulation output to calculate. | ||
| 469 | boost::optional<double> fuelOilNo1HeatRejection() const; | ||
| 470 | |||
| 471 | /// Returns the energy used for humidification from fuelOilNo1 in gigajoules. | ||
| 472 | /// Requires EnergyPlus simulation output to calculate. | ||
| 473 | boost::optional<double> fuelOilNo1Humidification() const; | ||
| 474 | |||
| 475 | /// Returns the energy used for heat recovery from fuelOilNo1 in gigajoules. | ||
| 476 | /// Requires EnergyPlus simulation output to calculate. | ||
| 477 | boost::optional<double> fuelOilNo1HeatRecovery() const; | ||
| 478 | |||
| 479 | /// Returns the energy used for water systems from fuelOilNo1 in gigajoules. | ||
| 480 | /// Requires EnergyPlus simulation output to calculate. | ||
| 481 | boost::optional<double> fuelOilNo1WaterSystems() const; | ||
| 482 | |||
| 483 | /// Returns the energy used for refrigeration from fuelOilNo1 in gigajoules. | ||
| 484 | /// Requires EnergyPlus simulation output to calculate. | ||
| 485 | boost::optional<double> fuelOilNo1Refrigeration() const; | ||
| 486 | |||
| 487 | /// Returns the energy used for generators from fuelOilNo1 in gigajoules. | ||
| 488 | /// Requires EnergyPlus simulation output to calculate. | ||
| 489 | boost::optional<double> fuelOilNo1Generators() const; | ||
| 490 | |||
| 491 | /// Returns the energy used for all end uses from fuelOilNo1 in gigajoules. | ||
| 492 | /// Requires EnergyPlus simulation output to calculate. | ||
| 493 | boost::optional<double> fuelOilNo1TotalEndUses() const; | ||
| 494 | |||
| 495 | /// Fuel Oil No 2 | ||
| 496 | /// Returns the energy used for heating from fuelOilNo2 in gigajoules. | ||
| 497 | /// Requires EnergyPlus simulation output to calculate. | ||
| 498 | boost::optional<double> fuelOilNo2Heating() const; | ||
| 499 | |||
| 500 | /// Returns the energy used for cooling from fuelOilNo2 in gigajoules. | ||
| 501 | /// Requires EnergyPlus simulation output to calculate. | ||
| 502 | boost::optional<double> fuelOilNo2Cooling() const; | ||
| 503 | |||
| 504 | /// Returns the energy used for interior lighting from fuelOilNo2 in gigajoules. | ||
| 505 | /// Requires EnergyPlus simulation output to calculate. | ||
| 506 | boost::optional<double> fuelOilNo2InteriorLighting() const; | ||
| 507 | |||
| 508 | /// Returns the energy used for exterior lighting from fuelOilNo2 in gigajoules. | ||
| 509 | /// Requires EnergyPlus simulation output to calculate. | ||
| 510 | boost::optional<double> fuelOilNo2ExteriorLighting() const; | ||
| 511 | |||
| 512 | /// Returns the energy used for interior equipment from fuelOilNo2 in gigajoules. | ||
| 513 | /// Requires EnergyPlus simulation output to calculate. | ||
| 514 | boost::optional<double> fuelOilNo2InteriorEquipment() const; | ||
| 515 | |||
| 516 | /// Returns the energy used for exterior equipment from fuelOilNo2 in gigajoules. | ||
| 517 | /// Requires EnergyPlus simulation output to calculate. | ||
| 518 | boost::optional<double> fuelOilNo2ExteriorEquipment() const; | ||
| 519 | |||
| 520 | /// Returns the energy used for fans from fuelOilNo2 in gigajoules. | ||
| 521 | /// Requires EnergyPlus simulation output to calculate. | ||
| 522 | boost::optional<double> fuelOilNo2Fans() const; | ||
| 523 | |||
| 524 | /// Returns the energy used for pumps from fuelOilNo2 in gigajoules. | ||
| 525 | /// Requires EnergyPlus simulation output to calculate. | ||
| 526 | boost::optional<double> fuelOilNo2Pumps() const; | ||
| 527 | |||
| 528 | /// Returns the energy used for heat rejection from fuelOilNo2 in gigajoules. | ||
| 529 | /// Requires EnergyPlus simulation output to calculate. | ||
| 530 | boost::optional<double> fuelOilNo2HeatRejection() const; | ||
| 531 | |||
| 532 | /// Returns the energy used for humidification from fuelOilNo2 in gigajoules. | ||
| 533 | /// Requires EnergyPlus simulation output to calculate. | ||
| 534 | boost::optional<double> fuelOilNo2Humidification() const; | ||
| 535 | |||
| 536 | /// Returns the energy used for heat recovery from fuelOilNo2 in gigajoules. | ||
| 537 | /// Requires EnergyPlus simulation output to calculate. | ||
| 538 | boost::optional<double> fuelOilNo2HeatRecovery() const; | ||
| 539 | |||
| 540 | /// Returns the energy used for water systems from fuelOilNo2 in gigajoules. | ||
| 541 | /// Requires EnergyPlus simulation output to calculate. | ||
| 542 | boost::optional<double> fuelOilNo2WaterSystems() const; | ||
| 543 | |||
| 544 | /// Returns the energy used for refrigeration from fuelOilNo2 in gigajoules. | ||
| 545 | /// Requires EnergyPlus simulation output to calculate. | ||
| 546 | boost::optional<double> fuelOilNo2Refrigeration() const; | ||
| 547 | |||
| 548 | /// Returns the energy used for generators from fuelOilNo2 in gigajoules. | ||
| 549 | /// Requires EnergyPlus simulation output to calculate. | ||
| 550 | boost::optional<double> fuelOilNo2Generators() const; | ||
| 551 | |||
| 552 | /// Returns the energy used for all end uses from fuelOilNo2 in gigajoules. | ||
| 553 | /// Requires EnergyPlus simulation output to calculate. | ||
| 554 | boost::optional<double> fuelOilNo2TotalEndUses() const; | ||
| 555 | |||
| 556 | /// Propane | ||
| 557 | /// Returns the energy used for heating from propane in gigajoules. | ||
| 558 | /// Requires EnergyPlus simulation output to calculate. | ||
| 559 | boost::optional<double> propaneHeating() const; | ||
| 560 | |||
| 561 | /// Returns the energy used for cooling from propane in gigajoules. | ||
| 562 | /// Requires EnergyPlus simulation output to calculate. | ||
| 563 | boost::optional<double> propaneCooling() const; | ||
| 564 | |||
| 565 | /// Returns the energy used for interior lighting from propane in gigajoules. | ||
| 566 | /// Requires EnergyPlus simulation output to calculate. | ||
| 567 | boost::optional<double> propaneInteriorLighting() const; | ||
| 568 | |||
| 569 | /// Returns the energy used for exterior lighting from propane in gigajoules. | ||
| 570 | /// Requires EnergyPlus simulation output to calculate. | ||
| 571 | boost::optional<double> propaneExteriorLighting() const; | ||
| 572 | |||
| 573 | /// Returns the energy used for interior equipment from propane in gigajoules. | ||
| 574 | /// Requires EnergyPlus simulation output to calculate. | ||
| 575 | boost::optional<double> propaneInteriorEquipment() const; | ||
| 576 | |||
| 577 | /// Returns the energy used for exterior equipment from propane in gigajoules. | ||
| 578 | /// Requires EnergyPlus simulation output to calculate. | ||
| 579 | boost::optional<double> propaneExteriorEquipment() const; | ||
| 580 | |||
| 581 | /// Returns the energy used for fans from propane in gigajoules. | ||
| 582 | /// Requires EnergyPlus simulation output to calculate. | ||
| 583 | boost::optional<double> propaneFans() const; | ||
| 584 | |||
| 585 | /// Returns the energy used for pumps from propane in gigajoules. | ||
| 586 | /// Requires EnergyPlus simulation output to calculate. | ||
| 587 | boost::optional<double> propanePumps() const; | ||
| 588 | |||
| 589 | /// Returns the energy used for heat rejection from propane in gigajoules. | ||
| 590 | /// Requires EnergyPlus simulation output to calculate. | ||
| 591 | boost::optional<double> propaneHeatRejection() const; | ||
| 592 | |||
| 593 | /// Returns the energy used for humidification from propane in gigajoules. | ||
| 594 | /// Requires EnergyPlus simulation output to calculate. | ||
| 595 | boost::optional<double> propaneHumidification() const; | ||
| 596 | |||
| 597 | /// Returns the energy used for heat recovery from propane in gigajoules. | ||
| 598 | /// Requires EnergyPlus simulation output to calculate. | ||
| 599 | boost::optional<double> propaneHeatRecovery() const; | ||
| 600 | |||
| 601 | /// Returns the energy used for water systems from propane in gigajoules. | ||
| 602 | /// Requires EnergyPlus simulation output to calculate. | ||
| 603 | boost::optional<double> propaneWaterSystems() const; | ||
| 604 | |||
| 605 | /// Returns the energy used for refrigeration from propane in gigajoules. | ||
| 606 | /// Requires EnergyPlus simulation output to calculate. | ||
| 607 | boost::optional<double> propaneRefrigeration() const; | ||
| 608 | |||
| 609 | /// Returns the energy used for generators from propane in gigajoules. | ||
| 610 | /// Requires EnergyPlus simulation output to calculate. | ||
| 611 | boost::optional<double> propaneGenerators() const; | ||
| 612 | |||
| 613 | /// Returns the energy used for all end uses from propane in gigajoules. | ||
| 614 | /// Requires EnergyPlus simulation output to calculate. | ||
| 615 | boost::optional<double> propaneTotalEndUses() const; | ||
| 616 | |||
| 617 | /// Other Fuel 1 | ||
| 618 | /// Returns the energy used for heating from otherFuel1 in gigajoules. | ||
| 619 | /// Requires EnergyPlus simulation output to calculate. | ||
| 620 | boost::optional<double> otherFuel1Heating() const; | ||
| 621 | |||
| 622 | /// Returns the energy used for cooling from otherFuel1 in gigajoules. | ||
| 623 | /// Requires EnergyPlus simulation output to calculate. | ||
| 624 | boost::optional<double> otherFuel1Cooling() const; | ||
| 625 | |||
| 626 | /// Returns the energy used for interior lighting from otherFuel1 in gigajoules. | ||
| 627 | /// Requires EnergyPlus simulation output to calculate. | ||
| 628 | boost::optional<double> otherFuel1InteriorLighting() const; | ||
| 629 | |||
| 630 | /// Returns the energy used for exterior lighting from otherFuel1 in gigajoules. | ||
| 631 | /// Requires EnergyPlus simulation output to calculate. | ||
| 632 | boost::optional<double> otherFuel1ExteriorLighting() const; | ||
| 633 | |||
| 634 | /// Returns the energy used for interior equipment from otherFuel1 in gigajoules. | ||
| 635 | /// Requires EnergyPlus simulation output to calculate. | ||
| 636 | boost::optional<double> otherFuel1InteriorEquipment() const; | ||
| 637 | |||
| 638 | /// Returns the energy used for exterior equipment from otherFuel1 in gigajoules. | ||
| 639 | /// Requires EnergyPlus simulation output to calculate. | ||
| 640 | boost::optional<double> otherFuel1ExteriorEquipment() const; | ||
| 641 | |||
| 642 | /// Returns the energy used for fans from otherFuel1 in gigajoules. | ||
| 643 | /// Requires EnergyPlus simulation output to calculate. | ||
| 644 | boost::optional<double> otherFuel1Fans() const; | ||
| 645 | |||
| 646 | /// Returns the energy used for pumps from otherFuel1 in gigajoules. | ||
| 647 | /// Requires EnergyPlus simulation output to calculate. | ||
| 648 | boost::optional<double> otherFuel1Pumps() const; | ||
| 649 | |||
| 650 | /// Returns the energy used for heat rejection from otherFuel1 in gigajoules. | ||
| 651 | /// Requires EnergyPlus simulation output to calculate. | ||
| 652 | boost::optional<double> otherFuel1HeatRejection() const; | ||
| 653 | |||
| 654 | /// Returns the energy used for humidification from otherFuel1 in gigajoules. | ||
| 655 | /// Requires EnergyPlus simulation output to calculate. | ||
| 656 | boost::optional<double> otherFuel1Humidification() const; | ||
| 657 | |||
| 658 | /// Returns the energy used for heat recovery from otherFuel1 in gigajoules. | ||
| 659 | /// Requires EnergyPlus simulation output to calculate. | ||
| 660 | boost::optional<double> otherFuel1HeatRecovery() const; | ||
| 661 | |||
| 662 | /// Returns the energy used for water systems from otherFuel1 in gigajoules. | ||
| 663 | /// Requires EnergyPlus simulation output to calculate. | ||
| 664 | boost::optional<double> otherFuel1WaterSystems() const; | ||
| 665 | |||
| 666 | /// Returns the energy used for refrigeration from otherFuel1 in gigajoules. | ||
| 667 | /// Requires EnergyPlus simulation output to calculate. | ||
| 668 | boost::optional<double> otherFuel1Refrigeration() const; | ||
| 669 | |||
| 670 | /// Returns the energy used for generators from otherFuel1 in gigajoules. | ||
| 671 | /// Requires EnergyPlus simulation output to calculate. | ||
| 672 | boost::optional<double> otherFuel1Generators() const; | ||
| 673 | |||
| 674 | /// Returns the energy used for all end uses from otherFuel1 in gigajoules. | ||
| 675 | /// Requires EnergyPlus simulation output to calculate. | ||
| 676 | boost::optional<double> otherFuel1TotalEndUses() const; | ||
| 677 | |||
| 678 | /// Other Fuel 2 | ||
| 679 | /// Returns the energy used for heating from otherFuel2 in gigajoules. | ||
| 680 | /// Requires EnergyPlus simulation output to calculate. | ||
| 681 | boost::optional<double> otherFuel2Heating() const; | ||
| 682 | |||
| 683 | /// Returns the energy used for cooling from otherFuel2 in gigajoules. | ||
| 684 | /// Requires EnergyPlus simulation output to calculate. | ||
| 685 | boost::optional<double> otherFuel2Cooling() const; | ||
| 686 | |||
| 687 | /// Returns the energy used for interior lighting from otherFuel2 in gigajoules. | ||
| 688 | /// Requires EnergyPlus simulation output to calculate. | ||
| 689 | boost::optional<double> otherFuel2InteriorLighting() const; | ||
| 690 | |||
| 691 | /// Returns the energy used for exterior lighting from otherFuel2 in gigajoules. | ||
| 692 | /// Requires EnergyPlus simulation output to calculate. | ||
| 693 | boost::optional<double> otherFuel2ExteriorLighting() const; | ||
| 694 | |||
| 695 | /// Returns the energy used for interior equipment from otherFuel2 in gigajoules. | ||
| 696 | /// Requires EnergyPlus simulation output to calculate. | ||
| 697 | boost::optional<double> otherFuel2InteriorEquipment() const; | ||
| 698 | |||
| 699 | /// Returns the energy used for exterior equipment from otherFuel2 in gigajoules. | ||
| 700 | /// Requires EnergyPlus simulation output to calculate. | ||
| 701 | boost::optional<double> otherFuel2ExteriorEquipment() const; | ||
| 702 | |||
| 703 | /// Returns the energy used for fans from otherFuel2 in gigajoules. | ||
| 704 | /// Requires EnergyPlus simulation output to calculate. | ||
| 705 | boost::optional<double> otherFuel2Fans() const; | ||
| 706 | |||
| 707 | /// Returns the energy used for pumps from otherFuel2 in gigajoules. | ||
| 708 | /// Requires EnergyPlus simulation output to calculate. | ||
| 709 | boost::optional<double> otherFuel2Pumps() const; | ||
| 710 | |||
| 711 | /// Returns the energy used for heat rejection from otherFuel2 in gigajoules. | ||
| 712 | /// Requires EnergyPlus simulation output to calculate. | ||
| 713 | boost::optional<double> otherFuel2HeatRejection() const; | ||
| 714 | |||
| 715 | /// Returns the energy used for humidification from otherFuel2 in gigajoules. | ||
| 716 | /// Requires EnergyPlus simulation output to calculate. | ||
| 717 | boost::optional<double> otherFuel2Humidification() const; | ||
| 718 | |||
| 719 | /// Returns the energy used for heat recovery from otherFuel2 in gigajoules. | ||
| 720 | /// Requires EnergyPlus simulation output to calculate. | ||
| 721 | boost::optional<double> otherFuel2HeatRecovery() const; | ||
| 722 | |||
| 723 | /// Returns the energy used for water systems from otherFuel2 in gigajoules. | ||
| 724 | /// Requires EnergyPlus simulation output to calculate. | ||
| 725 | boost::optional<double> otherFuel2WaterSystems() const; | ||
| 726 | |||
| 727 | /// Returns the energy used for refrigeration from otherFuel2 in gigajoules. | ||
| 728 | /// Requires EnergyPlus simulation output to calculate. | ||
| 729 | boost::optional<double> otherFuel2Refrigeration() const; | ||
| 730 | |||
| 731 | /// Returns the energy used for generators from otherFuel2 in gigajoules. | ||
| 732 | /// Requires EnergyPlus simulation output to calculate. | ||
| 733 | boost::optional<double> otherFuel2Generators() const; | ||
| 734 | |||
| 735 | /// Returns the energy used for all end uses from otherFuel2 in gigajoules. | ||
| 736 | /// Requires EnergyPlus simulation output to calculate. | ||
| 737 | boost::optional<double> otherFuel2TotalEndUses() const; | ||
| 738 | |||
| 739 | /// Returns the district cooling energy used for heating in gigajoules. | ||
| 740 | /// Requires EnergyPlus simulation output to calculate. | ||
| 741 | boost::optional<double> districtCoolingHeating() const; | ||
| 742 | |||
| 743 | /// Returns the district cooling energy used for cooling in gigajoules. | ||
| 744 | /// Requires EnergyPlus simulation output to calculate. | ||
| 745 | boost::optional<double> districtCoolingCooling() const; | ||
| 746 | |||
| 747 | /// Returns the district cooling energy used for interior lighting in gigajoules. | ||
| 748 | /// Requires EnergyPlus simulation output to calculate. | ||
| 749 | boost::optional<double> districtCoolingInteriorLighting() const; | ||
| 750 | |||
| 751 | /// Returns the district cooling energy used for exterior lighting in gigajoules. | ||
| 752 | /// Requires EnergyPlus simulation output to calculate. | ||
| 753 | boost::optional<double> districtCoolingExteriorLighting() const; | ||
| 754 | |||
| 755 | /// Returns the district cooling energy used for interior equipment in gigajoules. | ||
| 756 | /// Requires EnergyPlus simulation output to calculate. | ||
| 757 | boost::optional<double> districtCoolingInteriorEquipment() const; | ||
| 758 | |||
| 759 | /// Returns the district cooling energy used for exterior equipment in gigajoules. | ||
| 760 | /// Requires EnergyPlus simulation output to calculate. | ||
| 761 | boost::optional<double> districtCoolingExteriorEquipment() const; | ||
| 762 | |||
| 763 | /// Returns the district cooling energy used for fans in gigajoules. | ||
| 764 | /// Requires EnergyPlus simulation output to calculate. | ||
| 765 | boost::optional<double> districtCoolingFans() const; | ||
| 766 | |||
| 767 | /// Returns the district cooling energy used for pumps in gigajoules. | ||
| 768 | /// Requires EnergyPlus simulation output to calculate. | ||
| 769 | boost::optional<double> districtCoolingPumps() const; | ||
| 770 | |||
| 771 | /// Returns the district cooling energy used for heat rejection in gigajoules. | ||
| 772 | /// Requires EnergyPlus simulation output to calculate. | ||
| 773 | boost::optional<double> districtCoolingHeatRejection() const; | ||
| 774 | |||
| 775 | /// Returns the district cooling energy used for humidification in gigajoules. | ||
| 776 | /// Requires EnergyPlus simulation output to calculate. | ||
| 777 | boost::optional<double> districtCoolingHumidification() const; | ||
| 778 | |||
| 779 | /// Returns the district cooling energy used for heat recovery in gigajoules. | ||
| 780 | /// Requires EnergyPlus simulation output to calculate. | ||
| 781 | boost::optional<double> districtCoolingHeatRecovery() const; | ||
| 782 | |||
| 783 | /// Returns the district cooling energy used for water systems in gigajoules. | ||
| 784 | /// Requires EnergyPlus simulation output to calculate. | ||
| 785 | boost::optional<double> districtCoolingWaterSystems() const; | ||
| 786 | |||
| 787 | /// Returns the district cooling energy used for refrigeration in gigajoules. | ||
| 788 | /// Requires EnergyPlus simulation output to calculate. | ||
| 789 | boost::optional<double> districtCoolingRefrigeration() const; | ||
| 790 | |||
| 791 | /// Returns the district cooling energy used for generators in gigajoules. | ||
| 792 | /// Requires EnergyPlus simulation output to calculate. | ||
| 793 | boost::optional<double> districtCoolingGenerators() const; | ||
| 794 | |||
| 795 | /// Returns the district cooling energy used for all end uses in gigajoules. | ||
| 796 | /// Requires EnergyPlus simulation output to calculate. | ||
| 797 | boost::optional<double> districtCoolingTotalEndUses() const; | ||
| 798 | |||
| 799 | /// Returns the district heating energy used for heating in gigajoules. | ||
| 800 | /// Requires EnergyPlus simulation output to calculate. | ||
| 801 | boost::optional<double> districtHeatingHeating() const; | ||
| 802 | |||
| 803 | /// Returns the district heating energy used for cooling in gigajoules. | ||
| 804 | /// Requires EnergyPlus simulation output to calculate. | ||
| 805 | boost::optional<double> districtHeatingCooling() const; | ||
| 806 | |||
| 807 | /// Returns the district heating energy used for interior lighting in gigajoules. | ||
| 808 | /// Requires EnergyPlus simulation output to calculate. | ||
| 809 | boost::optional<double> districtHeatingInteriorLighting() const; | ||
| 810 | |||
| 811 | /// Returns the district heating energy used for exterior lighting in gigajoules. | ||
| 812 | /// Requires EnergyPlus simulation output to calculate. | ||
| 813 | boost::optional<double> districtHeatingExteriorLighting() const; | ||
| 814 | |||
| 815 | /// Returns the district heating energy used for interior equipment in gigajoules. | ||
| 816 | /// Requires EnergyPlus simulation output to calculate. | ||
| 817 | boost::optional<double> districtHeatingInteriorEquipment() const; | ||
| 818 | |||
| 819 | /// Returns the district heating energy used for exterior equipment in gigajoules. | ||
| 820 | /// Requires EnergyPlus simulation output to calculate. | ||
| 821 | boost::optional<double> districtHeatingExteriorEquipment() const; | ||
| 822 | |||
| 823 | /// Returns the district heating energy used for fans in gigajoules. | ||
| 824 | /// Requires EnergyPlus simulation output to calculate. | ||
| 825 | boost::optional<double> districtHeatingFans() const; | ||
| 826 | |||
| 827 | /// Returns the district heating energy used for pumps in gigajoules. | ||
| 828 | /// Requires EnergyPlus simulation output to calculate. | ||
| 829 | boost::optional<double> districtHeatingPumps() const; | ||
| 830 | |||
| 831 | /// Returns the district heating energy used for heat rejection in gigajoules. | ||
| 832 | /// Requires EnergyPlus simulation output to calculate. | ||
| 833 | boost::optional<double> districtHeatingHeatRejection() const; | ||
| 834 | |||
| 835 | /// Returns the district heating energy used for humidification in gigajoules. | ||
| 836 | /// Requires EnergyPlus simulation output to calculate. | ||
| 837 | boost::optional<double> districtHeatingHumidification() const; | ||
| 838 | |||
| 839 | /// Returns the district heating energy used for heat recovery in gigajoules. | ||
| 840 | /// Requires EnergyPlus simulation output to calculate. | ||
| 841 | boost::optional<double> districtHeatingHeatRecovery() const; | ||
| 842 | |||
| 843 | /// Returns the district heating energy used for water systems in gigajoules. | ||
| 844 | /// Requires EnergyPlus simulation output to calculate. | ||
| 845 | boost::optional<double> districtHeatingWaterSystems() const; | ||
| 846 | |||
| 847 | /// Returns the district heating energy used for refrigeration in gigajoules. | ||
| 848 | /// Requires EnergyPlus simulation output to calculate. | ||
| 849 | boost::optional<double> districtHeatingRefrigeration() const; | ||
| 850 | |||
| 851 | /// Returns the district heating energy used for generators in gigajoules. | ||
| 852 | /// Requires EnergyPlus simulation output to calculate. | ||
| 853 | boost::optional<double> districtHeatingGenerators() const; | ||
| 854 | |||
| 855 | /// Returns the district heating energy used for all end uses in gigajoules. | ||
| 856 | /// Requires EnergyPlus simulation output to calculate. | ||
| 857 | boost::optional<double> districtHeatingTotalEndUses() const; | ||
| 858 | |||
| 859 | /// Returns the district heating water energy used for heating in gigajoules. | ||
| 860 | /// Requires EnergyPlus simulation output to calculate. | ||
| 861 | boost::optional<double> districtHeatingWaterHeating() const; | ||
| 862 | |||
| 863 | /// Returns the district heating water energy used for cooling in gigajoules. | ||
| 864 | /// Requires EnergyPlus simulation output to calculate. | ||
| 865 | boost::optional<double> districtHeatingWaterCooling() const; | ||
| 866 | |||
| 867 | /// Returns the district heating water energy used for interior lighting in gigajoules. | ||
| 868 | /// Requires EnergyPlus simulation output to calculate. | ||
| 869 | boost::optional<double> districtHeatingWaterInteriorLighting() const; | ||
| 870 | |||
| 871 | /// Returns the district heating water energy used for exterior lighting in gigajoules. | ||
| 872 | /// Requires EnergyPlus simulation output to calculate. | ||
| 873 | boost::optional<double> districtHeatingWaterExteriorLighting() const; | ||
| 874 | |||
| 875 | /// Returns the district heating water energy used for interior equipment in gigajoules. | ||
| 876 | /// Requires EnergyPlus simulation output to calculate. | ||
| 877 | boost::optional<double> districtHeatingWaterInteriorEquipment() const; | ||
| 878 | |||
| 879 | /// Returns the district heating water energy used for exterior equipment in gigajoules. | ||
| 880 | /// Requires EnergyPlus simulation output to calculate. | ||
| 881 | boost::optional<double> districtHeatingWaterExteriorEquipment() const; | ||
| 882 | |||
| 883 | /// Returns the district heating water energy used for fans in gigajoules. | ||
| 884 | /// Requires EnergyPlus simulation output to calculate. | ||
| 885 | boost::optional<double> districtHeatingWaterFans() const; | ||
| 886 | |||
| 887 | /// Returns the district heating water energy used for pumps in gigajoules. | ||
| 888 | /// Requires EnergyPlus simulation output to calculate. | ||
| 889 | boost::optional<double> districtHeatingWaterPumps() const; | ||
| 890 | |||
| 891 | /// Returns the district heating water energy used for heat rejection in gigajoules. | ||
| 892 | /// Requires EnergyPlus simulation output to calculate. | ||
| 893 | boost::optional<double> districtHeatingWaterHeatRejection() const; | ||
| 894 | |||
| 895 | /// Returns the district heating water energy used for humidification in gigajoules. | ||
| 896 | /// Requires EnergyPlus simulation output to calculate. | ||
| 897 | boost::optional<double> districtHeatingWaterHumidification() const; | ||
| 898 | |||
| 899 | /// Returns the district heating water energy used for heat recovery in gigajoules. | ||
| 900 | /// Requires EnergyPlus simulation output to calculate. | ||
| 901 | boost::optional<double> districtHeatingWaterHeatRecovery() const; | ||
| 902 | |||
| 903 | /// Returns the district heating water energy used for water systems in gigajoules. | ||
| 904 | /// Requires EnergyPlus simulation output to calculate. | ||
| 905 | boost::optional<double> districtHeatingWaterWaterSystems() const; | ||
| 906 | |||
| 907 | /// Returns the district heating water energy used for refrigeration in gigajoules. | ||
| 908 | /// Requires EnergyPlus simulation output to calculate. | ||
| 909 | boost::optional<double> districtHeatingWaterRefrigeration() const; | ||
| 910 | |||
| 911 | /// Returns the district heating water energy used for generators in gigajoules. | ||
| 912 | /// Requires EnergyPlus simulation output to calculate. | ||
| 913 | boost::optional<double> districtHeatingWaterGenerators() const; | ||
| 914 | |||
| 915 | /// Returns the district heating water energy used for all end uses in gigajoules. | ||
| 916 | /// Requires EnergyPlus simulation output to calculate. | ||
| 917 | boost::optional<double> districtHeatingWaterTotalEndUses() const; | ||
| 918 | |||
| 919 | /// Returns the district heating steam energy used for heating in gigajoules. | ||
| 920 | /// Requires EnergyPlus simulation output to calculate. | ||
| 921 | boost::optional<double> districtHeatingSteamHeating() const; | ||
| 922 | |||
| 923 | /// Returns the district heating steam energy used for cooling in gigajoules. | ||
| 924 | /// Requires EnergyPlus simulation output to calculate. | ||
| 925 | boost::optional<double> districtHeatingSteamCooling() const; | ||
| 926 | |||
| 927 | /// Returns the district heating steam energy used for interior lighting in gigajoules. | ||
| 928 | /// Requires EnergyPlus simulation output to calculate. | ||
| 929 | boost::optional<double> districtHeatingSteamInteriorLighting() const; | ||
| 930 | |||
| 931 | /// Returns the district heating steam energy used for exterior lighting in gigajoules. | ||
| 932 | /// Requires EnergyPlus simulation output to calculate. | ||
| 933 | boost::optional<double> districtHeatingSteamExteriorLighting() const; | ||
| 934 | |||
| 935 | /// Returns the district heating steam energy used for interior equipment in gigajoules. | ||
| 936 | /// Requires EnergyPlus simulation output to calculate. | ||
| 937 | boost::optional<double> districtHeatingSteamInteriorEquipment() const; | ||
| 938 | |||
| 939 | /// Returns the district heating steam energy used for exterior equipment in gigajoules. | ||
| 940 | /// Requires EnergyPlus simulation output to calculate. | ||
| 941 | boost::optional<double> districtHeatingSteamExteriorEquipment() const; | ||
| 942 | |||
| 943 | /// Returns the district heating steam energy used for fans in gigajoules. | ||
| 944 | /// Requires EnergyPlus simulation output to calculate. | ||
| 945 | boost::optional<double> districtHeatingSteamFans() const; | ||
| 946 | |||
| 947 | /// Returns the district heating steam energy used for pumps in gigajoules. | ||
| 948 | /// Requires EnergyPlus simulation output to calculate. | ||
| 949 | boost::optional<double> districtHeatingSteamPumps() const; | ||
| 950 | |||
| 951 | /// Returns the district heating steam energy used for heat rejection in gigajoules. | ||
| 952 | /// Requires EnergyPlus simulation output to calculate. | ||
| 953 | boost::optional<double> districtHeatingSteamHeatRejection() const; | ||
| 954 | |||
| 955 | /// Returns the district heating steam energy used for humidification in gigajoules. | ||
| 956 | /// Requires EnergyPlus simulation output to calculate. | ||
| 957 | boost::optional<double> districtHeatingSteamHumidification() const; | ||
| 958 | |||
| 959 | /// Returns the district heating steam energy used for heat recovery in gigajoules. | ||
| 960 | /// Requires EnergyPlus simulation output to calculate. | ||
| 961 | boost::optional<double> districtHeatingSteamHeatRecovery() const; | ||
| 962 | |||
| 963 | /// Returns the district heating steam energy used for water systems in gigajoules. | ||
| 964 | /// Requires EnergyPlus simulation output to calculate. | ||
| 965 | boost::optional<double> districtHeatingSteamWaterSystems() const; | ||
| 966 | |||
| 967 | /// Returns the district heating steam energy used for refrigeration in gigajoules. | ||
| 968 | /// Requires EnergyPlus simulation output to calculate. | ||
| 969 | boost::optional<double> districtHeatingSteamRefrigeration() const; | ||
| 970 | |||
| 971 | /// Returns the district heating steam energy used for generators in gigajoules. | ||
| 972 | /// Requires EnergyPlus simulation output to calculate. | ||
| 973 | boost::optional<double> districtHeatingSteamGenerators() const; | ||
| 974 | |||
| 975 | /// Returns the district heating steam energy used for all end uses in gigajoules. | ||
| 976 | /// Requires EnergyPlus simulation output to calculate. | ||
| 977 | boost::optional<double> districtHeatingSteamTotalEndUses() const; | ||
| 978 | |||
| 979 | /// Returns the water used for heating in cubic meters. | ||
| 980 | /// Requires EnergyPlus simulation output to calculate. | ||
| 981 | boost::optional<double> waterHeating() const; | ||
| 982 | |||
| 983 | /// Returns the water used for cooling in cubic meters. | ||
| 984 | /// Requires EnergyPlus simulation output to calculate. | ||
| 985 | boost::optional<double> waterCooling() const; | ||
| 986 | |||
| 987 | /// Returns the water used for interior lighting in cubic meters. | ||
| 988 | /// Requires EnergyPlus simulation output to calculate. | ||
| 989 | boost::optional<double> waterInteriorLighting() const; | ||
| 990 | |||
| 991 | /// Returns the water used for exterior lighting in cubic meters. | ||
| 992 | /// Requires EnergyPlus simulation output to calculate. | ||
| 993 | boost::optional<double> waterExteriorLighting() const; | ||
| 994 | |||
| 995 | /// Returns the water used for interior equipment in cubic meters. | ||
| 996 | /// Requires EnergyPlus simulation output to calculate. | ||
| 997 | boost::optional<double> waterInteriorEquipment() const; | ||
| 998 | |||
| 999 | /// Returns the water used for exterior equipment in cubic meters. | ||
| 1000 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1001 | boost::optional<double> waterExteriorEquipment() const; | ||
| 1002 | |||
| 1003 | /// Returns the water used for fans in cubic meters. | ||
| 1004 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1005 | boost::optional<double> waterFans() const; | ||
| 1006 | |||
| 1007 | /// Returns the water used for pumps in cubic meters. | ||
| 1008 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1009 | boost::optional<double> waterPumps() const; | ||
| 1010 | |||
| 1011 | /// Returns the water used for heat rejection in cubic meters. | ||
| 1012 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1013 | boost::optional<double> waterHeatRejection() const; | ||
| 1014 | |||
| 1015 | /// Returns the water used for humidification in cubic meters. | ||
| 1016 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1017 | boost::optional<double> waterHumidification() const; | ||
| 1018 | |||
| 1019 | /// Returns the water used for heat recovery in cubic meters. | ||
| 1020 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1021 | boost::optional<double> waterHeatRecovery() const; | ||
| 1022 | |||
| 1023 | /// Returns the water used for water systems in cubic meters. | ||
| 1024 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1025 | boost::optional<double> waterWaterSystems() const; | ||
| 1026 | |||
| 1027 | /// Returns the water used for refrigeration in cubic meters. | ||
| 1028 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1029 | boost::optional<double> waterRefrigeration() const; | ||
| 1030 | |||
| 1031 | /// Returns the water used for generators in cubic meters. | ||
| 1032 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1033 | boost::optional<double> waterGenerators() const; | ||
| 1034 | |||
| 1035 | /// Returns the water used for all uses in cubic meters. | ||
| 1036 | /// Requires EnergyPlus simulation output to calculate. | ||
| 1037 | boost::optional<double> waterTotalEndUses() const; | ||
| 1038 | |||
| 1039 | boost::optional<double> hoursHeatingSetpointNotMet() const; | ||
| 1040 | |||
| 1041 | boost::optional<double> hoursCoolingSetpointNotMet() const; | ||
| 1042 | |||
| 1043 | // return a vector of all the available reporting frequencies for a given timeseries and environment period | ||
| 1044 | // std::vector<ReportingFrequency> availableReportingFrequencies(const std::string& envPeriod, const std::string& timeSeriesName) ; | ||
| 1045 | |||
| 1046 | // get the type of environment period | ||
| 1047 | boost::optional<EnvironmentType> environmentType(const std::string& envPeriod) const; | ||
| 1048 | |||
| 1049 | // return a vector of all the available environment periods | ||
| 1050 | std::vector<std::string> availableEnvPeriods() const; | ||
| 1051 | |||
| 1052 | // return a vector of all the available reporting frequencies for a given environment period | ||
| 1053 | std::vector<std::string> availableReportingFrequencies(const std::string& envPeriod); | ||
| 1054 | |||
| 1055 | // version specific translation for reporting frequencies used in database to reporting frequency enum values | ||
| 1056 | openstudio::OptionalReportingFrequency reportingFrequencyFromDB(const std::string& dbReportingFrequency); | ||
| 1057 | |||
| 1058 | // return a vector of all the available variableName for environment period and reporting frequency | ||
| 1059 | std::vector<std::string> availableVariableNames(const std::string& envPeriod, const std::string& reportingFrequency) const; | ||
| 1060 | |||
| 1061 | // return a vector of all timeseries matching name, envPeriod, and reportingFrequency | ||
| 1062 | // this could be used to get "Mean Air Temperature" for all zones for instance | ||
| 1063 | std::vector<TimeSeries> timeSeries(const std::string& envPeriod, const std::string& reportingFrequency, const std::string& timeSeriesName); | ||
| 1064 | |||
| 1065 | // return a vector of all keyValues matching name, envPeriod, and reportingFrequency | ||
| 1066 | std::vector<std::string> availableKeyValues(const std::string& envPeriod, const std::string& reportingFrequency, | ||
| 1067 | const std::string& timeSeriesName); | ||
| 1068 | |||
| 1069 | // return a runPeriod value e.g. Electricity::Facility | ||
| 1070 | boost::optional<double> runPeriodValue(const std::string& envPeriod, const std::string& timeSeriesName, const std::string& keyValue); | ||
| 1071 | |||
| 1072 | // return a single timeseries matching name, keyValue, envPeriod, and reportingFrequency | ||
| 1073 | // this could be used to get "Mean Air Temperature" for a particular zone | ||
| 1074 | boost::optional<TimeSeries> timeSeries(const std::string& envPeriod, const std::string& reportingFrequency, const std::string& timeSeriesName, | ||
| 1075 | const std::string& keyValue); | ||
| 1076 | |||
| 1077 | /** Expands query to create a vector of all matching queries. The returned queries will have | ||
| 1078 | * one environment period, one reporting frequency, and one time series name specified. The | ||
| 1079 | * returned queries will also be "vetted". */ | ||
| 1080 | std::vector<SqlFileTimeSeriesQuery> expandQuery(const SqlFileTimeSeriesQuery& query); | ||
| 1081 | |||
| 1082 | std::vector<SqlFileTimeSeriesQuery> expandEnvironment(const SqlFileTimeSeriesQuery& query); | ||
| 1083 | |||
| 1084 | std::vector<SqlFileTimeSeriesQuery> expandReportingFrequency(const SqlFileTimeSeriesQuery& query); | ||
| 1085 | |||
| 1086 | std::vector<SqlFileTimeSeriesQuery> expandTimeSeries(const SqlFileTimeSeriesQuery& query); | ||
| 1087 | |||
| 1088 | std::vector<SqlFileTimeSeriesQuery> expandKeyValues(const SqlFileTimeSeriesQuery& query); | ||
| 1089 | |||
| 1090 | /** Executes query. ReportingFrequency must be specified. Use expandQuery first to break query | ||
| 1091 | * down by ReportingFrequency and determine how many TimeSeries will be returned. */ | ||
| 1092 | std::vector<TimeSeries> timeSeries(const SqlFileTimeSeriesQuery& query); | ||
| 1093 | |||
| 1094 | // returns an optional pair of date times for begin and end of daylight savings time | ||
| 1095 | boost::optional<std::pair<openstudio::DateTime, openstudio::DateTime>> daylightSavingsPeriod() const; | ||
| 1096 | |||
| 1097 | /// returns datadictionary of available timeseries | ||
| 1098 | DataDictionaryTable dataDictionary() const; | ||
| 1099 | |||
| 1100 | /// Energy plus version number | ||
| 1101 | // DLM@20100511: can we query this? | ||
| 1102 | std::string energyPlusVersion() const; | ||
| 1103 | |||
| 1104 | /// Energy Plus eplusout.sql file name | ||
| 1105 | std::string energyPlusSqliteFile() const; | ||
| 1106 | |||
| 1107 | /// get names of all available illuminance maps | ||
| 1108 | std::vector<std::string> illuminanceMapNames() const; | ||
| 1109 | std::vector<std::string> illuminanceMapNames(const std::string& envPeriod) const; | ||
| 1110 | |||
| 1111 | /// get zone names of for specified illuminance map | ||
| 1112 | std::vector<std::string> illuminanceMapZoneNames(const std::string& name) const; | ||
| 1113 | std::vector<std::string> illuminanceMapZoneNames(int mapIndex) const; | ||
| 1114 | |||
| 1115 | /// reference point for map - form RefPtn=(x:y:illuminance) | ||
| 1116 | boost::optional<std::string> illuminanceMapRefPt(const std::string& name, int ptNum) const; | ||
| 1117 | boost::optional<std::string> illuminanceMapRefPt(int mapIndex, int ptNum) const; | ||
| 1118 | |||
| 1119 | /// minimum value of map | ||
| 1120 | boost::optional<double> illuminanceMapMinValue(const std::string& name) const; | ||
| 1121 | boost::optional<double> illuminanceMapMinValue(int mapIndex) const; | ||
| 1122 | |||
| 1123 | /// maximum value of map | ||
| 1124 | boost::optional<double> illuminanceMapMaxValue(const std::string& name) const; | ||
| 1125 | boost::optional<double> illuminanceMapMaxValue(int mapIndex) const; | ||
| 1126 | |||
| 1127 | /// minimum and maximum of map | ||
| 1128 | void illuminanceMapMaxValue(const std::string& name, double& minValue, double& maxValue) const; | ||
| 1129 | void illuminanceMapMaxValue(int mapIndex, double& minValue, double& maxValue) const; | ||
| 1130 | |||
| 1131 | /// x position (m) of the illuminance map | ||
| 1132 | Vector illuminanceMapX(const std::string& name, const DateTime& dateTime) const; | ||
| 1133 | |||
| 1134 | /// y position (m) of the illuminance map | ||
| 1135 | Vector illuminanceMapY(const std::string& name, const DateTime& dateTime) const; | ||
| 1136 | |||
| 1137 | /// x position (m) of the illuminance map | ||
| 1138 | Vector illuminanceMapX(int hourlyReportIndex) const; | ||
| 1139 | |||
| 1140 | /// y position (m) of the illuminance map | ||
| 1141 | Vector illuminanceMapY(int hourlyReportIndex) const; | ||
| 1142 | |||
| 1143 | /// hourly report index for mapIndex at date and time | ||
| 1144 | boost::optional<int> illuminanceMapHourlyReportIndex(int mapIndex, const DateTime& dateTime) const; | ||
| 1145 | |||
| 1146 | // find the illuminance map index by name | ||
| 1147 | boost::optional<int> illuminanceMapIndex(const std::string& name) const; | ||
| 1148 | |||
| 1149 | /// date time at hourly report index | ||
| 1150 | boost::optional<DateTime> illuminanceMapDate(int hourlyReportIndex) const; | ||
| 1151 | |||
| 1152 | /// hourly report indices of the illuminance map | ||
| 1153 | std::vector<int> illuminanceMapHourlyReportIndices(const std::string& name) const; | ||
| 1154 | |||
| 1155 | /// hourly report indices and dates of the illuminance map | ||
| 1156 | std::vector<std::pair<int, DateTime>> illuminanceMapHourlyReportIndicesDates(int mapIndex) const; | ||
| 1157 | |||
| 1158 | /// hourly report indices and dates of the illuminance map | ||
| 1159 | std::vector<std::pair<int, DateTime>> illuminanceMapHourlyReportIndicesDates(const std::string& name) const; | ||
| 1160 | |||
| 1161 | /// hourly report indices of the illuminance map | ||
| 1162 | std::vector<int> illuminanceMapHourlyReportIndices(int mapIndex) const; | ||
| 1163 | |||
| 1164 | /// value (lux) of the illuminance map at date and time | ||
| 1165 | /// value(i,j) is the illuminance at x(i), y(j) | ||
| 1166 | Matrix illuminanceMap(const std::string& name, const DateTime& dateTime) const; | ||
| 1167 | |||
| 1168 | /// value (lux) of the illuminance map at hourlyReportIndex | ||
| 1169 | /// value(i,j) is the illuminance at x(i), y(j) | ||
| 1170 | Matrix illuminanceMap(int hourlyReportIndex) const; | ||
| 1171 | |||
| 1172 | /// value (lux) of the illuminance map at hourlyReportIndex | ||
| 1173 | /// value(i,j) is the illuminance at x(i), y(j) - returns x, y and illuminance | ||
| 1174 | void illuminanceMap(int hourlyReportIndex, std::vector<double>& x, std::vector<double>& y, std::vector<double>& illuminance) const; | ||
| 1175 | |||
| 1176 | // execute a statement and return the first (if any) value as a double. | ||
| 1177 | // Variadic arguments are the bind arguments if any, to replace '?' placeholders in the statement string | ||
| 1178 | template <typename... Args> | ||
| 1179 | 17200 | boost::optional<double> execAndReturnFirstDouble(const std::string& statement, Args&&... args) const { | |
| 1180 |
4/20boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 0 taken 50 times.
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) const:
✓ Branch 0 taken 8 times.
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 0 taken 17136 times.
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✗ Branch 0 not taken.
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✗ Branch 0 not taken.
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 0 not taken.
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 0 not taken.
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 0 not taken.
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✗ Branch 0 not taken.
✗ Branch 1 not taken.
|
17200 | if (m_db) { |
| 1181 |
4/10boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 1 taken 50 times.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) const:
✓ Branch 1 taken 8 times.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 1 taken 17136 times.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✓ Branch 1 taken 6 times.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✗ Branch 1 not taken.
|
17200 | PreparedStatement stmt(statement, m_db, false, args...); |
| 1182 |
4/10boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 1 taken 50 times.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) const:
✓ Branch 1 taken 8 times.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 1 taken 17136 times.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 1 not taken.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✓ Branch 1 taken 6 times.
boost::optional<double> openstudio::detail::SqlFile_Impl::execAndReturnFirstDouble<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const:
✗ Branch 1 not taken.
|
17200 | return stmt.execAndReturnFirstDouble(); |
| 1183 | 17200 | } | |
| 1184 | ✗ | return boost::none; | |
| 1185 | } | ||
| 1186 | |||
| 1187 | // execute a statement and return the first (if any) value as an int | ||
| 1188 | // Variadic arguments are the bind arguments if any, to replace '?' placeholders in the statement string | ||
| 1189 | template <typename... Args> | ||
| 1190 | 82 | boost::optional<int> execAndReturnFirstInt(const std::string& statement, Args&&... args) const { | |
| 1191 |
2/4boost::optional<int> openstudio::detail::SqlFile_Impl::execAndReturnFirstInt<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 0 taken 80 times.
✗ Branch 1 not taken.
boost::optional<int> openstudio::detail::SqlFile_Impl::execAndReturnFirstInt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
82 | if (m_db) { |
| 1192 |
2/2boost::optional<int> openstudio::detail::SqlFile_Impl::execAndReturnFirstInt<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 1 taken 80 times.
boost::optional<int> openstudio::detail::SqlFile_Impl::execAndReturnFirstInt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 1 taken 2 times.
|
82 | PreparedStatement stmt(statement, m_db, false, args...); |
| 1193 |
2/2boost::optional<int> openstudio::detail::SqlFile_Impl::execAndReturnFirstInt<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 1 taken 80 times.
boost::optional<int> openstudio::detail::SqlFile_Impl::execAndReturnFirstInt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✓ Branch 1 taken 2 times.
|
82 | return stmt.execAndReturnFirstInt(); |
| 1194 | 82 | } | |
| 1195 | ✗ | return boost::none; | |
| 1196 | } | ||
| 1197 | |||
| 1198 | // execute a statement and return the first (if any) value as a string | ||
| 1199 | // Variadic arguments are the bind arguments if any, to replace '?' placeholders in the statement string | ||
| 1200 | template <typename... Args> | ||
| 1201 | ✗ | boost::optional<std::string> execAndReturnFirstString(const std::string& statement, Args&&... args) const { | |
| 1202 | ✗ | if (m_db) { | |
| 1203 | ✗ | PreparedStatement stmt(statement, m_db, false, args...); | |
| 1204 | ✗ | return stmt.execAndReturnFirstString(); | |
| 1205 | ✗ | } | |
| 1206 | ✗ | return boost::none; | |
| 1207 | } | ||
| 1208 | |||
| 1209 | /// execute a statement and return the results (if any) in a vector of double | ||
| 1210 | // Variadic arguments are the bind arguments if any, to replace '?' placeholders in the statement string | ||
| 1211 | template <typename... Args> | ||
| 1212 | 4 | boost::optional<std::vector<double>> execAndReturnVectorOfDouble(const std::string& statement, Args&&... args) const { | |
| 1213 |
1/4boost::optional<std::vector<double, std::allocator<double> > > openstudio::detail::SqlFile_Impl::execAndReturnVectorOfDouble<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 0 not taken.
✗ Branch 1 not taken.
boost::optional<std::vector<double, std::allocator<double> > > openstudio::detail::SqlFile_Impl::execAndReturnVectorOfDouble<int&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&) const:
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (m_db) { |
| 1214 |
1/2boost::optional<std::vector<double, std::allocator<double> > > openstudio::detail::SqlFile_Impl::execAndReturnVectorOfDouble<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 1 not taken.
boost::optional<std::vector<double, std::allocator<double> > > openstudio::detail::SqlFile_Impl::execAndReturnVectorOfDouble<int&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&) const:
✓ Branch 1 taken 4 times.
|
4 | PreparedStatement stmt(statement, m_db, false, args...); |
| 1215 |
1/2boost::optional<std::vector<double, std::allocator<double> > > openstudio::detail::SqlFile_Impl::execAndReturnVectorOfDouble<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const:
✗ Branch 1 not taken.
boost::optional<std::vector<double, std::allocator<double> > > openstudio::detail::SqlFile_Impl::execAndReturnVectorOfDouble<int&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&) const:
✓ Branch 1 taken 4 times.
|
4 | return stmt.execAndReturnVectorOfDouble(); |
| 1216 | 4 | } | |
| 1217 | ✗ | return boost::none; | |
| 1218 | } | ||
| 1219 | |||
| 1220 | /// execute a statement and return the results (if any) in a vector of int | ||
| 1221 | // Variadic arguments are the bind arguments if any, to replace '?' placeholders in the statement string | ||
| 1222 | template <typename... Args> | ||
| 1223 | ✗ | boost::optional<std::vector<int>> execAndReturnVectorOfInt(const std::string& statement, Args&&... args) const { | |
| 1224 | ✗ | if (m_db) { | |
| 1225 | ✗ | PreparedStatement stmt(statement, m_db, false, args...); | |
| 1226 | ✗ | return stmt.execAndReturnVectorOfInt(); | |
| 1227 | ✗ | } | |
| 1228 | ✗ | return boost::none; | |
| 1229 | } | ||
| 1230 | |||
| 1231 | /// execute a statement and return the results (if any) in a vector of string | ||
| 1232 | // Variadic arguments are the bind arguments if any, to replace '?' placeholders in the statement string | ||
| 1233 | template <typename... Args> | ||
| 1234 | ✗ | boost::optional<std::vector<std::string>> execAndReturnVectorOfString(const std::string& statement, Args&&... args) const { | |
| 1235 | ✗ | if (m_db) { | |
| 1236 | ✗ | PreparedStatement stmt(statement, m_db, false, args...); | |
| 1237 | ✗ | return stmt.execAndReturnVectorOfString(); | |
| 1238 | ✗ | } | |
| 1239 | ✗ | return boost::none; | |
| 1240 | } | ||
| 1241 | |||
| 1242 | // execute a statement and return the error code, used for create/drop tables | ||
| 1243 | // Variadic arguments are the bind arguments if any, to replace '?' placeholders in the statement string | ||
| 1244 | template <typename... Args> | ||
| 1245 | ✗ | int execute(const std::string& statement, Args&&... args) const { | |
| 1246 | // copied in here to avoid including sqlite3 header everywhere | ||
| 1247 | ✗ | constexpr auto SQLITE_ERROR = 1; | |
| 1248 | ✗ | auto code = SQLITE_ERROR; | |
| 1249 | ✗ | if (m_db) { | |
| 1250 | ✗ | PreparedStatement stmt(statement, m_db, false, args...); | |
| 1251 | ✗ | code = stmt.execute(); | |
| 1252 | ✗ | } | |
| 1253 | ✗ | return code; | |
| 1254 | } | ||
| 1255 | |||
| 1256 | /// Returns the summary data for each install location and fuel type found in report variables | ||
| 1257 | std::vector<openstudio::SummaryData> getSummaryData() const; | ||
| 1258 | |||
| 1259 | // Insert a new report variable record into the database | ||
| 1260 | // This does not support meter data | ||
| 1261 | void insertTimeSeriesData(const std::string& t_variableType, const std::string& t_indexGroup, const std::string& t_timestepType, | ||
| 1262 | const std::string& t_keyValue, const std::string& t_variableName, | ||
| 1263 | const openstudio::ReportingFrequency& t_reportingFrequency, const boost::optional<std::string>& t_scheduleName, | ||
| 1264 | const std::string& t_variableUnits, const openstudio::TimeSeries& t_timeSeries); | ||
| 1265 | |||
| 1266 | int insertZone(const std::string& t_name, double t_relNorth, double t_originX, double t_originY, double t_originZ, double t_centroidX, | ||
| 1267 | double t_centroidY, double t_centroidZ, int t_ofType, double t_multiplier, double t_listMultiplier, double t_minimumX, | ||
| 1268 | double t_maximumX, double t_minimumY, double t_maximumY, double t_minimumZ, double t_maximumZ, double t_ceilingHeight, | ||
| 1269 | double t_volume, int t_insideConvectionAlgo, int t_outsideConvectionAlgo, double t_floorArea, double t_extGrossWallArea, | ||
| 1270 | double t_extNetWallArea, double t_extWindowArea, bool t_isPartOfTotalArea); | ||
| 1271 | |||
| 1272 | void insertIlluminanceMap(const std::string& t_zoneName, const std::string& name, const std::string& t_environmentName, | ||
| 1273 | const std::vector<DateTime>& t_times, const std::vector<double>& t_xs, const std::vector<double>& t_ys, double t_z, | ||
| 1274 | const std::vector<Matrix>& t_maps); | ||
| 1275 | |||
| 1276 | bool isSupportedVersion() const; | ||
| 1277 | |||
| 1278 | // Sql got "year" in 8.9.0 and working for 9.0.1 | ||
| 1279 | bool hasYear() const; | ||
| 1280 | |||
| 1281 | // DaylightMapHourlyReports added Year in 9.2.0 | ||
| 1282 | bool hasIlluminanceMapYear() const; | ||
| 1283 | |||
| 1284 | // return a fenestration value for matching subSurfaceName (RowName) and columnName | ||
| 1285 | boost::optional<double> getExteriorFenestrationValue(const std::string& subSurfaceName, const std::string& columnName) const; | ||
| 1286 | |||
| 1287 | // return an Assembly U-Factor value for matching subSurfaceName (RowName) | ||
| 1288 | boost::optional<double> assemblyUFactor(const std::string& subSurfaceName) const; | ||
| 1289 | |||
| 1290 | // return an Assembly SHGC value for matching subSurfaceName (RowName) | ||
| 1291 | boost::optional<double> assemblySHGC(const std::string& subSurfaceName) const; | ||
| 1292 | |||
| 1293 | // return an Assembly Visible Transmittance value for matching subSurfaceName (RowName) | ||
| 1294 | boost::optional<double> assemblyVisibleTransmittance(const std::string& subSurfaceName) const; | ||
| 1295 | |||
| 1296 | private: | ||
| 1297 | void init(); | ||
| 1298 | |||
| 1299 | void retrieveDataDictionary(); | ||
| 1300 | |||
| 1301 | // executes **MULTIPLE** statement and throws if it failed, used for create/drop tables. | ||
| 1302 | // Since it uses sqlite3_exec internally, cannot use Variadic arguments for binding | ||
| 1303 | void execAndThrowOnError(const std::string& t_stmt); | ||
| 1304 | |||
| 1305 | // execute a **SINGLE** statement and throws if it failed | ||
| 1306 | // Variadic arguments are the bind arguments if any, to replace '?' placeholders in the statement string | ||
| 1307 | template <typename... Args> | ||
| 1308 | ✗ | void execAndThrowOnError(const std::string& bindingStatement, Args&&... args) { | |
| 1309 | ✗ | if (!m_connectionOpen) { | |
| 1310 | ✗ | throw std::runtime_error("Error executing SQL statement as database connection is not open."); | |
| 1311 | } | ||
| 1312 | ✗ | PreparedStatement stmt(bindingStatement, m_db, false, args...); | |
| 1313 | ✗ | stmt.execAndThrowOnError(); | |
| 1314 | ✗ | } | |
| 1315 | |||
| 1316 | void addSimulation(const openstudio::EpwFile& t_epwFile, const openstudio::DateTime& t_simulationTime, const openstudio::Calendar& t_calendar); | ||
| 1317 | int getNextIndex(const std::string& t_tableName, const std::string& t_columnName); | ||
| 1318 | |||
| 1319 | // return a single timeseries matching recordIndex - internally used to retrieve timeseries | ||
| 1320 | boost::optional<TimeSeries> timeSeries(const DataDictionaryItem& dataDictionary); | ||
| 1321 | std::vector<double> timeSeriesValues(const DataDictionaryItem& dataDictionary); | ||
| 1322 | boost::optional<Date> timeSeriesStartDate(const DataDictionaryItem& dataDictionary); | ||
| 1323 | |||
| 1324 | // return first date in time table used for start date of run period variables | ||
| 1325 | openstudio::DateTime firstDateTime(bool includeHourAndMinute, int envPeriodIndex); | ||
| 1326 | |||
| 1327 | // return last date in time table used for end date of run period variables | ||
| 1328 | openstudio::DateTime lastDateTime(bool includeHourAndMinute, int envPeriodIndex); | ||
| 1329 | |||
| 1330 | // DLM: timeSeriesInterval seems pretty useless, can we remove it? | ||
| 1331 | boost::optional<Time> timeSeriesInterval(const DataDictionaryItem& dataDictionary); | ||
| 1332 | |||
| 1333 | std::vector<DateTime> dateTimeVec(const DataDictionaryItem& dataDictionary); | ||
| 1334 | |||
| 1335 | bool isValidConnection(); | ||
| 1336 | |||
| 1337 | void mf_makeConsistent(std::vector<SqlFileTimeSeriesQuery>& queries); | ||
| 1338 | |||
| 1339 | openstudio::path m_path; | ||
| 1340 | bool m_connectionOpen; | ||
| 1341 | DataDictionaryTable m_dataDictionary; | ||
| 1342 | sqlite3* m_db; | ||
| 1343 | std::string m_sqliteFilename; | ||
| 1344 | |||
| 1345 | bool m_supportedVersion; | ||
| 1346 | |||
| 1347 | bool m_hasYear; | ||
| 1348 | |||
| 1349 | bool m_hasIlluminanceMapYear; | ||
| 1350 | |||
| 1351 | bool m_illuminanceMapHasOnly2RefPts; | ||
| 1352 | |||
| 1353 | − | REGISTER_LOGGER("openstudio.energyplus.SqlFile"); | |
| 1354 | }; | ||
| 1355 | |||
| 1356 | // ETH@20100920 SqlFile_Impl& cannot be const because function calls non-const getter. | ||
| 1357 | UTILITIES_API std::set<ReportingFrequency> availableReportingFrequencySet(SqlFile_Impl& sqlFileImpl, const std::string& envPeriod); | ||
| 1358 | } // namespace detail | ||
| 1359 | |||
| 1360 | } // namespace openstudio | ||
| 1361 | |||
| 1362 | #endif // UTILITIES_SQL_SQLFILE_IMPL_HPP | ||
| 1363 |