Modeling an Electric Network With PGX
In this example, we show how to model an electricity distribution network
using PGX. Simulations can be performed over this model to determine the
reliability of the network and to predict network configurations that
may lead to undesired connectivity losses.
Use case structure
This use case is structured into the following sections:
Use case goals
At the end of this use case you will have learned the following:
How to build a graph from a dataset consisting of several CSV files.
How to load the electric network graph in to PGX.
How to transform such graph from EDGE_LIST format to a binary PGB format.
How to perform a Breadth First Search (BFS) traversal starting from a node to find its reachable nodes while respecting switch configuration restrictions.
How to query the electric network graph to retrieve those nodes reached by the BFS transversal using PGQL.
How to save the query results to a tabular CSV file.