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

Method sizingEnvironmentPeriods

src/model/SimulationControl.cpp:528–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526 }
527
528 std::vector<std::string> SimulationControl_Impl::sizingEnvironmentPeriods() const {
529 StringVector result;
530 OptionalSqlFile oSqlFile = model().sqlFile();
531 if (oSqlFile && runSimulationforSizingPeriods()) {
532 SizingPeriodVector sizingPeriods = model().getModelObjects<SizingPeriod>();
533 StringVector environmentPeriods = oSqlFile->availableEnvPeriods();
534 for (const SizingPeriod& sp : sizingPeriods) {
535 std::string spName = sp.name().get();
536 if (std::find(environmentPeriods.begin(), environmentPeriods.end(), spName) != environmentPeriods.end()) {
537 result.push_back(spName);
538 } else {
539 LOG(Warn, "Expected to find environment period '" << spName << "' in SqlFile, but did not.");
540 }
541 }
542 }
543 return result;
544 }
545
546 std::vector<std::string> SimulationControl_Impl::annualSimulationEnvironmentPeriods() const {
547 StringVector result;

Callers

nothing calls this directly

Calls 7

sqlFileMethod · 0.80
beginMethod · 0.80
availableEnvPeriodsMethod · 0.45
getMethod · 0.45
nameMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected