Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/workflow/OSWorkflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,17 +438,7 @@ bool OSWorkflow::run() {
}
}

// TODO: Is this really necessary? Seems like it's done before already (in RunPreProcess)
if (workspace_) {
// Save final IDF
if (m_add_timings) {
m_timers->newTimer("Save IDF");
}
workspace_->save(runDirPath / "in.idf", true);
if (m_add_timings) {
m_timers->tockCurrentTimer();
}
}
// No need to save the workspace (IDF) here, done before already (in RunPreProcess)

if (!workflowJSON.runOptions()->fast()) {
communicateResults();
Expand Down
12 changes: 6 additions & 6 deletions src/workflow/RunPreProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ namespace openstudio {
void OSWorkflow::runPreProcess() {
state = State::PreProcess;

// Skip the pre-processor if halted
if (runner.halted()) {
LOG(Info, "Workflow halted, skipping the EnergyPlus pre-processor");
return;
}

auto runDirPath = workflowJSON.absoluteRunDir();
const bool skipEnergyPlusPreprocess = workflowJSON.runOptions()->skipEnergyPlusPreprocess();

Expand All @@ -47,12 +53,6 @@ void OSWorkflow::runPreProcess() {
applyMeasures(MeasureType::ReportingMeasure, ApplyMeasureType::EnergyPlusOutputRequest);
LOG(Info, "Finished collecting EnergyPlus output requests from Reporting measures.");

// Skip the pre-processor if halted
if (runner.halted()) {
LOG(Info, "Workflow halted, skipping the EnergyPlus pre-processor");
return;
}

// TODO: I am extremely confused as to why we force add this stuff...
if (!skipEnergyPlusPreprocess) {
LOG(Info, "Running EnergyPlus Preprocess");
Expand Down
3 changes: 2 additions & 1 deletion src/workflow/RunTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ void OSWorkflow::runTranslator() {
// skip if halted
// TODO: I don't understand this
if (runner.halted()) {
LOG(Info, "Workflow halted, skipping OSM to IDF translation");
LOG(Info, "Workflow halted, skipping the OSM to IDF translation");
// This allows model arguments to still be calculated
workspace_ = Workspace{};
return;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's ok.

}

auto runDir = workflowJSON.absoluteRunDir();
Expand Down
Loading