Skip to content

Commit 51a6a08

Browse files
committed
Address comments.
1 parent 411c198 commit 51a6a08

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

src/EnergyPlus/EconomicTariff.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2711,7 +2711,7 @@ void ComputeTariff(EnergyPlusData &state)
27112711

27122712
Real64 annualAggregate;
27132713

2714-
if (!(state.files.outputControl.tabular || state.files.outputControl.sqlite || state.files.outputControl.json)) {
2714+
if (!state.files.outputControl.writeTabular(state)) {
27152715
state.dataOutRptTab->WriteTabularFiles = false;
27162716
return;
27172717
}

src/EnergyPlus/IOFiles.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,14 @@ std::vector<std::string> InputOutputFile::getLines()
319319
return std::vector<std::string>();
320320
}
321321

322+
bool IOFiles::OutputControl::writeTabular(EnergyPlusData &state)
323+
{
324+
bool const htmlTabular = state.files.outputControl.tabular;
325+
bool const jsonTabular = state.files.outputControl.json && state.dataResultsFramework->resultsFramework->timeSeriesAndTabularEnabled();
326+
bool const sqliteTabular = state.files.outputControl.sqlite; // && @JasonGlazer thinks something else maybe?
327+
return (htmlTabular || jsonTabular || sqliteTabular);
328+
}
329+
322330
void IOFiles::OutputControl::getInput(EnergyPlusData &state)
323331
{
324332
auto &ip = state.dataInputProcessing->inputProcessor;

src/EnergyPlus/IOFiles.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ public:
673673
OutputControl() = default;
674674

675675
void getInput(EnergyPlusData &state);
676+
bool writeTabular(EnergyPlusData &state);
676677

677678
bool csv = false;
678679
bool mtr = true;

src/EnergyPlus/OutputReportTabular.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ void GetInputTabularMonthly(EnergyPlusData &state)
323323
// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
324324
auto &ort = state.dataOutRptTab;
325325

326-
if (!(state.files.outputControl.tabular || state.files.outputControl.sqlite || state.files.outputControl.json)) {
326+
if (!state.files.outputControl.writeTabular(state)) {
327327
ort->WriteTabularFiles = false;
328328
return;
329329
}
@@ -1064,7 +1064,7 @@ void GetInputTabularTimeBins(EnergyPlusData &state)
10641064
Array1D_int objVarIDs;
10651065
auto &ort = state.dataOutRptTab;
10661066

1067-
if (!(state.files.outputControl.tabular || state.files.outputControl.sqlite || state.files.outputControl.json)) {
1067+
if (!state.files.outputControl.writeTabular(state)) {
10681068
ort->WriteTabularFiles = false;
10691069
return;
10701070
}
@@ -1470,7 +1470,7 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state)
14701470
auto &ort = state.dataOutRptTab;
14711471
bool ErrorsFound = false;
14721472

1473-
if (!(state.files.outputControl.tabular || state.files.outputControl.sqlite || state.files.outputControl.json)) {
1473+
if (!state.files.outputControl.writeTabular(state)) {
14741474
ort->WriteTabularFiles = false;
14751475
return;
14761476
}

0 commit comments

Comments
 (0)