void EnergyPlusJob::startHandlerImpl() { getFiles(allInputFiles(), params()); if (!m_idf) { throw std::runtime_error("No IDF file found in input files"); } if (!m_idf->hasRequiredFile(toPath("Energy+.idd"))) { // We did not have an idd set, so we should find one m_idf->addRequiredFile( toPath("Energy+.idd"), toPath("Energy+.idd")); } if (!m_idf->hasRequiredFile(toPath("in.epw"))) { openstudio::path epw = WeatherFileFinder::find(allParams(), m_filelocationname, m_weatherfilename); if (!epw.empty()) { m_idf->addRequiredFile(epw, toPath("in.epw")); } } // And add the now fully outfited idf with required idd and such addRequiredFile(*m_idf, toPath("in.idf")); }
void BasementJob::startHandlerImpl() { addExpectedOutputFile(openstudio::toPath("basementmerged.idf")); getFiles(allInputFiles()); if (!m_idf) { throw std::runtime_error("No IDF file found in input files"); } if (!m_expandedidf) { throw std::runtime_error("No expanded IDF file found in input files"); } try { m_idf->getRequiredFile(toPath("BasementGHT.idd")); } catch (const std::runtime_error &) { // We did not have an idd set, so we should find one m_idf->addRequiredFile( toPath("BasementGHT.idd"), toPath("BasementGHT.idd")); } copyRequiredFiles(*m_idf, "idf", toPath("in.epw")); try { m_idf->getRequiredFile(toPath("in.epw")); } catch (const std::runtime_error &) { openstudio::path epw = WeatherFileFinder::find(allParams(), m_filelocationname, m_weatherfilename); if (!epw.empty()) { m_idf->addRequiredFile(epw, toPath("in.epw")); } } // And add the now fully outfited idf with required idd and such addRequiredFile(*m_idf, toPath("BasementGHTIn.idf")); }