Skip to content

fix: prevent overwriting device result dicts#112

Merged
JoelSchoelzel merged 1 commit into
developfrom
111-data-lost-in-final-results-eg-hpq_th
May 29, 2026
Merged

fix: prevent overwriting device result dicts#112
JoelSchoelzel merged 1 commit into
developfrom
111-data-lost-in-final-results-eg-hpq_th

Conversation

@djs0109
Copy link
Copy Markdown
Contributor

@djs0109 djs0109 commented May 15, 2026

closes #111

@djs0109 djs0109 requested review from RawadHamze and Copilot May 15, 2026 13:37
@djs0109 djs0109 linked an issue May 15, 2026 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a bug where helper functions extracting results from the central optimization overwrote per-device result dicts (e.g., HP) that had already been populated with data like COP and Q_th by earlier extraction steps. The fix preserves existing keys by only initializing the device dict when not already present.

Changes:

  • Replace unconditional results_dict[n][device] = {} with conditional initialization in four locations (heat, cooling, power, storage devices) within helper_func_extract_eh_results.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@djs0109 djs0109 requested a review from JoelSchoelzel May 22, 2026 09:09
@JoelSchoelzel JoelSchoelzel merged commit 0cf89db into develop May 29, 2026
4 checks passed
@JoelSchoelzel JoelSchoelzel deleted the 111-data-lost-in-final-results-eg-hpq_th branch May 29, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data lost in final results, e.g. HP.Q_th

3 participants