GraphML Export

In PowerModelsONM we include a capability to export a network data structure as a graph, either nested, i.e., consisting of subgraphs of load blocks or unnested in the GraphML format, which is an XML format.

We also include in the examples/data folder a suggested "Configuration" for use in the yEd Properties Manager. This configuration was used to construct the examples below.

Unnested Graph

To export an unnested graph

import PowerModelsONM as ONM
onm_path = joinpath(dirname(pathof(ONM)), "../examples/data")
eng = ONM.PMD.parse_file(joinpath(onm_path, "network.ieee13.dss"))
save_graphml("unnested_ieee13.graphml", eng; type="unnested")

Below is what this exported graphml looks like after being loaded in yEd, the ONM recommended properaties applied, and the Orthogonal - Classic layout applied.

Unnested IEEE13 Graph

Nested Graph

To export an nested graph

import PowerModelsONM as ONM
onm_path = joinpath(dirname(pathof(ONM)), "../examples/data")
eng = ONM.PMD.parse_file(joinpath(onm_path, "network.ieee13.dss"))
save_graphml("nested_ieee13.graphml", eng; type="nested")

Below is what this exported graphml looks like after being loaded in yEd, the ONM recommended properaties applied, and the Orthogonal - Classic layout applied.

Nested IEEE13 Graph