Reorder output writers — headline tables first#118
Merged
Conversation
Group writers in openTEPES_run into three blocks:
1. Headline (small, structural): InvestmentResults, CostSummaryResults,
OperationSummaryResults, ReliabilityResults, FlexibilityResults.
2. Bulky hourly: OutputResultsParVarCon, GenerationOperationResults
(+Heat), ESSOperationResults, ReservoirOperationResults,
NetworkH2/Heat/Operation, MarginalResults, EconomicResults.
3. Plots: NetworkMapResults.
Each writer is self-contained (no cross-function state on mTEPES /
OptModel), so reordering is a pure rearrangement of independent blocks.
No conditional, signature, or argument change.
Motivation: if a batch run is interrupted mid-output (kill, timeout,
disk full), headline cost / investment / KPI / reliability numbers from
every solved case are preserved. Bulky hourly tables — which dominate
the output time and disk footprint — write after the headlines, so an
interruption costs the bulky data but never the structural summary.
EOF
arght
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reorders the writer dispatch in
openTEPES_runso headline tables (InvestmentResults,CostSummaryResults,OperationSummaryResults,ReliabilityResults,FlexibilityResults) are written before bulky hourly tables (Generation/ESS/Network/Marginal/Economic), withNetworkMapResults(HTML plots) last.Why
If a batch run is interrupted mid-output (kill / timeout / disk full), headline cost/investment/KPI/reliability numbers from every solved case survive. The bulky hourly tables — the ones most likely to be truncated — come last.
Behavioural change
None. Each
*Resultswriter is self-contained (no cross-function state onmTEPES/OptModel). The diff is a pure block reorder plus three section-separator comments and one header comment explaining the rationale.Test plan