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

Method partialYearEnvironmentPeriods

src/model/SimulationControl.cpp:582–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

580 }
581
582 std::vector<std::string> SimulationControl_Impl::partialYearEnvironmentPeriods() const {
583 StringVector result;
584 OptionalSqlFile oSqlFile = model().sqlFile();
585 if (oSqlFile && runSimulationforWeatherFileRunPeriods()) {
586 RunPeriodVector runPeriods = this->runPeriods();
587 StringVector environmentPeriods = oSqlFile->availableEnvPeriods();
588 for (const RunPeriod& runPeriod : runPeriods) {
589 if (runPeriod.isPartialYear()) {
590 std::string rpName = runPeriod.name().get();
591 auto it = std::find(environmentPeriods.begin(), environmentPeriods.end(), rpName);
592 if (it != environmentPeriods.end()) {
593 result.push_back(*it);
594 }
595 }
596 }
597 }
598 return result;
599 }
600
601 std::vector<std::string> SimulationControl_Impl::repeatedIntervalEnvironmentPeriods() const {
602 StringVector result;

Callers

nothing calls this directly

Calls 9

runPeriodsMethod · 0.95
sqlFileMethod · 0.80
isPartialYearMethod · 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