Leveraging Message Passing GNNs for High-Quality Power Flow Approximation.
PowerFlowNet's distinctiveness, compared to existing PF GNN approaches, lies in its adept utilization of the capabilities from message-passing GNNs and high-order GCNs in a unique arrangement called PowerFlowConv, for handling a trainable masked embedding of the network graph. This innovative approach renders PoweFlowNet remarkably scalable, presenting an effective solution for the PF problem.
PowerFlowNet transforms the PF into a GNN node-regression problem by representing each bus as a node and each transmission line as an edge while maintaining the network's connectivity.
To train a model run train.py with the desired arguments. For example:
python3 train.py --cfg_json ./configs/standard.json\
--num-epochs 2000\
--data-dir ./data/
--batch-size 128\
--train_loss_fn mse_loss\
--lr 0.001\
--case 118v2\
--model MaskEmbdMultiMPN\
--save
Follow the links below to download the datasets and the trained models used in the paper.
runnable files:
train.py
trains the modelresults.py
plots the results- and more scripts to generate results and plots ...
First two dimensions out of seven in edge_features
are from_node
and to_node
, and they are indexed from PowerFlowData
dataset class. It is reindexed from from_node
and to_node
are removed from the edge_features
tensor.
Raw data format:
Number | Description |
---|---|
N | number of nodes |
E | number of edges |
Fn = 9 | number of features per node |
Fe = 5 | orginally 7, first two dims are from_node and to_node number of features per edge |
Fn_out = 8 | number of output features per node |
Tensor | Dimension |
---|---|
Data.x |
(batch_size*N, Fe) |
Data.edge_index |
(2, E) |
Data.edge_attr |
(E, Fe) |
Data.y |
(batch_size*N, Fn) |
If you use parts of this framework, datasets, or trained models, please cite as:
@misc{lin2023powerflownet,
title={PowerFlowNet: Leveraging Message Passing GNNs for Improved Power Flow Approximation},
author={Nan Lin and Stavros Orfanoudakis and Nathan Ordonez Cardenas and Juan S. Giraldo and Pedro P. Vergara},
year={2023},
eprint={2311.03415},
archivePrefix={arXiv},
primaryClass={cs.LG}
}