Skip to content

Conversation

@nader-00
Copy link
Collaborator

Description

This PR adds Plotly-based “voltage over distance” comparison plots to eDisGo.

It introduces two new methods on EDisGo:

  • plot_voltage_over_dist(mv_id, lv_id, other, save_as=False, split_branches=False)
    LV voltage (p.u.) vs. shortest-path distance to the MV/LV transformer; compares two EDisGo objects and visualizes load/feed-in worst cases. Includes LV tolerance band (0.90–1.10 p.u.).

  • plot_voltage_over_dist_mv(mv_id, other, save_as=False)
    MV voltage (p.u.) vs. shortest-path distance to the HV/MV transformer; compares two EDisGo objects and visualizes load/feed-in worst cases. Includes MV tolerance band (0.96–1.06 p.u.).

Distances are computed using Dijkstra shortest paths on the grid graph. Export to HTML/PNG is supported via save_as. Core logic is implemented in edisgo/tools/voltage_over_distance.py with thin wrappers in edisgo/edisgo.py. Tests are added (skipped when results.v_res is empty in the default fixture).

Fixes #565

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • New and adjusted code is formatted using the pre-commit hooks
  • New and adjusted code includes type hinting now
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The Read the Docs documentation is compiling correctly
  • If new packages are needed, I added them the setup/env files
  • I have added new features to the corresponding whatsnew file

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.

[Feature] Add plotting methods for voltage vs. distance analysis with comparison functionality

2 participants