Skip to content

Reorder output writers — headline tables first#118

Merged
arght merged 1 commit into
masterfrom
chore/outputs-headline-first
May 25, 2026
Merged

Reorder output writers — headline tables first#118
arght merged 1 commit into
masterfrom
chore/outputs-headline-first

Conversation

@erikfilias
Copy link
Copy Markdown
Contributor

@erikfilias erikfilias commented May 25, 2026

Summary

Reorders the writer dispatch in openTEPES_run so headline tables (InvestmentResults, CostSummaryResults, OperationSummaryResults, ReliabilityResults, FlexibilityResults) are written before bulky hourly tables (Generation/ESS/Network/Marginal/Economic), with NetworkMapResults (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 *Results writer is self-contained (no cross-function state on mTEPES / OptModel). The diff is a pure block reorder plus three section-separator comments and one header comment explaining the rationale.

Test plan

  • Static introspection: writer call order matches the design.
  • 9n full output

  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
@erikfilias erikfilias requested a review from arght May 25, 2026 15:19
@erikfilias erikfilias self-assigned this May 25, 2026
@erikfilias erikfilias added the enhancement New feature or request label May 25, 2026
@arght arght merged commit 85b9084 into master May 25, 2026
10 checks passed
@erikfilias erikfilias deleted the chore/outputs-headline-first branch May 25, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants