Live data from Hacker News

NetworkX – Network Analysis in Python

networkx.org

41–50 of 65 posts

Re: NetworkX – Network Analysis in Python

#41
post #27
post #4

Love it. Using it for load balancing of substation transformers. The grid is a graph.

I have tried to talk to engineers about contingency analyses for what would happen if a unit went down, and they tend to have very wishy washy answers. Or giant tediously compiled reports that can model exactly one change. Any idea why that is?

A single unit would correspond to a N-1 case when doing a transmission system study. There are ways of automating steady state analysis for this case to do a full sweep across the nearby system (either looking at k hops away, all parts in a zone (where a zone has a specific meaning in this context), or using a utility provided set of assets for the analysis). This pretty much consists of running a load flow for each individual case and compiling the results while making sure they are valid (convergence, device behavior, etc).

This is only the steady state analysis, but there's also dynamics done when looking at specific generators also to look at a generator's response to fluctuations in voltage and frequency to ensure stability within certain operating conditions (weakening of the grid, rapid change in voltage or freq).

If they were wishy washy they were probably limited to doing distribution where you are assuming a single strong source (swing bus) at the substation and it's not your responsibility to think too much about adjusting the system behavior based off of changes in transmission (usually)

Re: NetworkX – Network Analysis in Python

#45
post #40

I've used recently the networkx algorithm to find Hamiltonian cycles in a graph, in order to generate a Secret Santa with constraints (couples don't send gifts to each other, and people don't give to the same person as last year), it works great even though the problem is NP-complete, since my number of participants is very low. I've tried the same in Rust with petgraph which resembles networkx, but it doesn't have t…

Is this similar to graph colouring?

Re: NetworkX – Network Analysis in Python

#46

Been a few years since I put NetworkX through its paces, but the several times I have tried it, found remarkably weak support for graph layout and display. NetworkX analytic routines may be strong, but attractively displaying graph-structured problems remarkably more interactive and attractive via d3.js, GraphViz, etc. At least for my problems, communicating graph structures, and having nodes and edges that represent…

I definitely agree. There’s no reason in my opinion not to have an extension library that does good visualization via a force-directed graph or similar. The existing visualization methods are pretty barebones.

Re: NetworkX – Network Analysis in Python

#47
post #38
post #21

Earlier quoted context omitted.

Interesting you should say that, as I am trying to start a project where I need to make an electric grid graph, but I am not sure where to find the node/edge data for substations and transmission lines that include their specs and capacities. Is that stuff open source somewhere, like with the ISOs, or do you need to build it from scratch?

That data is privately held by utilities, and the high voltage transmission infrastructure is highly confidential (CEII/NERC CIP). If you just need sample data, I'd recommend checking out the test data provided with power flow simulators like OpenDSS for distribution systems [1] or MATPOWER for generation + transmission [2]. The IEEE test systems are what are used in research, they have the component specs you're loo…

MATPOWER and OpenDSS test cases are also available in CSV format:

https://github.com/casecsv

https://github.com/cktcsv

Re: NetworkX – Network Analysis in Python

#49
See also https://github.com/Qiskit/rustworkx – a general purpose graph library for Python written in Rust to take advantage of the performance and safety that Rust provides.

> Rustworkx was originally called retworkx and was created initially to be a replacement for qiskit's previous (and current) NetworkX usage (hence the original name). The project was originally started to build a faster directed graph to use as the underlying data structure for the DAG at the center of qiskit-terra's transpiler. However, since it's initial introduction the project has grown substantially and now covers all applications that need to work with graphs which includes Qiskit.

Re: NetworkX – Network Analysis in Python

#50

See also https://github.com/Qiskit/rustworkx – a general purpose graph library for Python written in Rust to take advantage of the performance and safety that Rust provides. > Rustworkx was originally called retworkx and was created initially to be a replacement for qiskit's previous (and current) NetworkX usage (hence the original name). The project was originally started to build a faster directed graph to use as t…

[deleted]
Post reply on HN