Graph-based Resilience Metrics¶
Classes and Functions¶
- class resilience_graphtheory.GraphResilienceMetric(_dss)¶
Bases:
object
This is the class for computing graph based resilience metric
- Parameters
_dss (opendssdirect python object) – The opendss object
- compute_bc(line_faults, switches_on)¶
Calculate Betweenness Centrality (BC) of network graph nodes.This function calculates the BC for the network topology given.
- Parameters
dss (dss python object) – opendss network
line_faults (list) – List of line fault
switches_on (list) – List of sectionalizing switch that are operating
- Returns
numpy array with BC values for each node/bus.
- Return type
numpy_array (double)
- compute_cl(line_faults, switches_on)¶
Calculate Closeness Centrality (CL) of network graph nodes.This function calculates the CL for the network topology given.
- Parameters
dss (dss python object) – opendss network
line_faults (list) – List of line fault
switches_on (list) – List of sectionalizing switch that are operating
- Returns
numpy array with CL values for each node/bus.
- Return type
numpy_array (double)
- compute_ebc(line_faults, switches_on)¶
Calculate Edge Betweenness Centrality (EBC) of network graph. This function calculates the EBC for the network topology given.
- Parameters
dss (dss python object) – opendss network
line_faults (list) – List of line fault
switches_on (list) – List of sectionalizing switch that are operating
- Returns
numpy array with BC values for each node/bus. The max. EBC value for an edge connected to the respective node/bus.
- Return type
numpy_array (double)
- create_nxgraph(line_faults, switches_on)¶
Create the Networkx graph
- Parameters
line_faults (list) – List of line fault
switches_on (list) – List of sectionalizing switch that are operating
- Returns
The networkx graph model along with the node position dictionary
- Return type
graph, dictionary
- draw_network(line_faults, switches_on, fileName='dummy.png')¶
Draws the network graph in a png file. This function draws the network topology of the network given.
- Parameters
dss (dss python object) – opendss network
line_faults (list) – List of line fault
switches_on (list) – List of sectionalizing switch that are operating
fileName (str) – Name of the file where the graph is going to be drawn.
- Returns
Nothing
- Return type
None
- graph_topology_metrics(line_faults, switches_on)¶
- resilience_graphtheory.get_Vbus(dss, circuit, busname)¶
Calculate the bus voltages of a bus in the distribution feeder
- Parameters
dss (dss python object) – opendss network
circuit (circuit object) – DSS circuit
busname (str) – bus name as defined in the dss case
- Returns
bus voltage
- Return type
float