Conversation
Results.reinforce_log is a new long-format DataFrame that records why each grid-reinforcement measure happened - the violated component, the exceeded limit, the time step and load/feed-in case - alongside what equipment_changes already tracked (what changed and at what cost), one row per (violation, changed component). - check_tech_constraints: add a signed max_voltage_dev column, needed to derive issue_type (over-/undervoltage) and the allowed limit. - reinforce_measures: add optional return_node_mapping to reinforce_lines_voltage_issues/reinforce_mv_lv_station_voltage_issues so voltage-triggered reinforcements can be traced back to the violating node/station. - reinforce_grid: wire _add_reinforcement_log_entries into every stage that already writes equipment_changes; add a log_reinforcement toggle, a run_id to disambiguate repeated reinforce_grid() calls, human-readable INFO logging per violation, and an end-of-run cost summary grouped by trigger/issue_case/voltage_level. - Fix earthworks costs being charged once per iteration instead of once per line, which previously overstated reinforce_log's costs whenever a line needed several incremental parallel-line additions across iterations. - Add tests for the signed voltage deviation, cost consistency with grid_expansion_costs, and CSV round-tripping.
joda9
self-requested a review
August 26, 2026 09:35
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.
Description
Results.reinforce_log is a new long-format DataFrame that records why each grid-reinforcement measure happened - the violated component, the exceeded limit, the time step and load/feed-in case - alongside what equipment_changes already tracked (what changed and at what cost), one row per (violation, changed component).
Fixes #741
Type of change
Checklist:
pre-commithooks