-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Is your feature request related to a problem? Please describe.
When analyzing grid optimization results or comparing different modeling approaches (e.g., integrated MV-LV grids vs. aggregated LV representation), it would be helpful to visualize voltage profiles along the grid as a function of distance from the transformer. Currently, there's no built-in method to create these comparison plots.
Describe the solution you'd like
Add two new plotting methods to the eDisGo class:
-
plot_voltage_over_dist(self, mv_id, lv_id, other, save_as=False, split_branches=False)- Plots voltage vs. distance to MV/LV transformer for LV grids
- Compares two eDisGo objects (e.g., before/after optimization or different methods)
- Shows feed-in and load cases for both worst-case scenarios
- Optional: Split visualization by main branches
- Uses Dijkstra's algorithm to calculate shortest path distances
-
plot_voltage_over_dist_mv(self, mv_id, other, save_as=False)- Plots voltage vs. distance to HV/MV transformer for MV grids
- Compares two eDisGo objects
- Shows MV and LV worst-case scenarios (feed-in and load cases)
- Visualizes entire MV network with all buses
Key Features:
- Interactive plotly-based visualizations with hover information (node index, distance, voltage)
- Voltage tolerance bands (0.9-1.1 p.u. for LV, 0.96-1.06 p.u. for MV)
- Customizable styling (marker symbols, colors, font sizes)
- Export to HTML and PNG formats
- Network distance calculation using graph-based shortest path algorithm
Describe alternatives you've considered
- Manual post-processing of results with external plotting tools
- Using existing histogram-based voltage analysis methods (but these don't show spatial distribution)
Additional context
Example code demonstrating the implementation approach has been provided. The methods should be integrated into the plotting module and require that edisgo.analyze() has been executed beforehand. The plots are particularly useful for:
- Comparing integrated vs. aggregated grid modeling approaches
- Validating optimization results
- Analyzing spatial voltage distribution patterns
- Identifying critical grid sections