powergrid_synth.core.hierarchical_analysis

This module performs an analysis of the generated synthetic grid topology for each subgraph, as well as for the entire global graph.

Module Contents

class powergrid_synth.core.hierarchical_analysis.HierarchicalAnalyzer(graph)[source]

A wrapper class that manages analysis for multi-level power grids. It can perform a global analysis and then iterate through each voltage level to perform subgraph analysis.

Parameters:

graph (networkx.Graph)

plot_all_levels(log_scale=True)[source]

Plots degree distributions for all voltage levels in a single figure (subplots).

Parameters:

log_scale (bool) – If True, uses log-log scale. If False, uses linear scale.

run_full_report(log_scale=True)[source]

Convenience method to run analysis and plotting. :param log_scale: Whether to plot the multi-level figure in log scale.

Parameters:

log_scale (bool)

run_global_analysis()[source]

Runs the GridAnalyzer on the entire graph.

run_level_analysis()[source]

Detects all voltage levels in the graph, extracts the subgraph for each, and runs the GridAnalyzer (stats only) on those subgraphs.