Skip to main content

Quickstart

This guide walks you through loading a test network, running a power flow, and comparing results across solvers.

Install GridOverture

Install the library with the Veragrid solver backend:

pip install gridoverture[veragrid]

Load a test network

Load the IEEE 39-bus New England test system:

import gridoverture as go

net = go.load("ieee39")
print(net)
Expected output
GridOverture Network: ieee39
Buses: 39
Lines: 46
Generators: 10
Loads: 21

Run a power flow

Solve the power flow using Veragrid:

result = go.run_load_flow(net, solver="veragrid")
print(result.bus_results.head())
Expected output
bus_id vm_pu va_deg p_mw q_mvar
0 1 1.039 -9.45 -322.00 -2.40
1 2 1.048 -6.07 0.00 0.00
2 3 1.031 -10.12 -500.00 -183.60
3 4 1.004 -10.53 -500.00 -184.00
4 5 1.006 -9.00 0.00 0.00

Compare solvers

Run the same network through multiple solvers and compare:

comparison = go.compare(net, solvers=["andes", "veragrid", "pypsa"])
print(comparison.summary())
Expected output
Cross-Solver Comparison: ieee39
Solvers: andes, veragrid, pypsa
─────────────────────────────────
Max voltage deviation: 0.0012 pu
Max angle deviation: 0.08 deg
Max flow deviation: 1.23 MW
Status: All solvers converged
tip

Install additional solver extras to include more backends in the comparison. For example, add pandapower with pip install gridoverture[pandapower].

Full Script

Here's the complete quickstart script in one block:

import gridoverture as go

# Load a test network
net = go.load("ieee39")

# Run power flow with a single solver
result = go.run_load_flow(net, solver="veragrid")
print(result.bus_results.head())

# Compare across multiple solvers
comparison = go.compare(net, solvers=["andes", "veragrid", "pypsa"])
print(comparison.summary())

Next Steps