Skip to main content

tellegen power system visualization

tellegen

CI crates.io npm npm docs license

Browser visualization for DC OPF, AC power flow, SOCWR, and their sensitivities. Demand and rating edits preview through KKT sensitivity columns and commit as fresh solves in WebAssembly. Case parsing uses powerio. The project is named for Tellegen's theorem.

Live demo: tellegen.dev. Documentation: eigenergy.github.io/tellegen.

Packages

npm install @tellegen/engine   # case parsing and wasm solves, framework agnostic
npm install @tellegen/webmcp   # WebMCP tools and host adapter
npm install @tellegen/analytics # allowlisted, cookieless usage analytics
# map, panels, and solve card as Svelte components, with the map libraries
# they take as peer dependencies
npm install @tellegen/svelte maplibre-gl @deck.gl/core @deck.gl/layers @deck.gl/maplibre

@tellegen/engine exports case parsing, browser solving, the Study preview and commit calls, sensitivities, and generated TypeScript types. @tellegen/svelte exports the map, panels, local file flow, and solve card. @tellegen/webmcp exports the general OPF tools and the conditionally registered propose_capacity_plan and apply_capacity_plan tools through an adapter that does not depend on a UI framework. The hosted demo connects the live Svelte controller to that adapter. See the WebMCP guide. Start with the framework quickstart; examples/browser-minimal/ and examples/svelte-minimal/ are working integrations of each package.

Python

Python 3.11 and newer can install the native engine from PyPI:

python -m pip install tellegen
import tellegen

solution = tellegen.load("case30.m").solve()

The optional MCP server runs the engine in process over stdio:

python -m pip install "tellegen[mcp]"
tellegen-mcp

See the Python guide for calculations and source builds, and the MCP server guide for Claude Code and Claude Desktop setup, the tools, and the filesystem policy.

Rust

The solver itself is the tellegen crate. The packages above are WebAssembly bindings over it, so a Rust consumer skips them and calls it directly. Case parsing stays in powerio.

cargo add tellegen powerio serde_json
use tellegen::{solve_instance, SolveRequest};

let parsed = powerio::parse(powerio::Source::open("case30.m")?)?;
let network_module = tellegen::ir::balanced_module(parsed)?;
let instance = powerio::DcOpfInstance::from_network(network_module.value().clone())?;

// A DC OPF with bus 2 shifted 50 MW, and the LMP column against demand.
let request: SolveRequest = serde_json::from_str(
    r#"{
        "formulation": "dcopf",
        "edits": { "deltas": { "2": 50.0 } },
        "sensitivities": [
            { "operand": {"Price":"Active"}, "parameter": {"Demand":"Active"} }
        ]
    }"#,
)?;

let solved = solve_instance(&instance, &request).map_err(|e| e.to_string())?;
println!("{:?} objective {:?}", solved.status, solved.objective);

solve_module_json takes and returns JSON strings for callers that hold a stored PowerIO module. It accepts modules containing a balanced network or a declared problem instance; it does not accept bare network JSON. Default features carry the differentiable engine: DC OPF, AC power flow, and the KKT sensitivities. conic adds the SOCWR relaxation and its sensitivities. --no-default-features drops faer and num-complex and leaves the DC OPF solve on its own.

tellegen-cli wraps the same call for scripting: it reads a stored PowerIO module on stdin and writes the solve response to stdout. The request is the first argument, or @PATH to read it from a file when it is larger than the operating system's argument limit (about 128 KB on Linux). Its solve-module command writes an exact PowerIO solution module.

The multiconductor constant-power API, supported transformer profile, units, convergence options, and raw BMOPF limitations are documented in the multiconductor power flow page, with the full API reference in the multiconductor reference.

Demo

The demo serves three TAMU ACTIVSg synthetic grids and the CATS California Test System. These are synthetic networks on geographic footprints, not surveyed infrastructure:

case territory buses branches
ACTIVSg200 central Illinois 200 245
ACTIVSg500 South Carolina 500 597
ACTIVSg7000 Texas 6717 9140
CATS California 8870 10823

Self-hosted deployments can also register distribution feeders through an optional distribution-cases.json manifest. Portable PowerIO multiconductor modules open in the distribution viewer and can run supported AC power flow in the browser.

Bus color is locational marginal price. Selecting a bus shows ∂LMP/∂demand at that bus; selecting a binding line shows ∂LMP/∂rating. Dragging a slider applies the sensitivity column live; releasing it re-solves exactly in WebAssembly. The calculation selector offers DC OPF (the default), AC power flow, SOCWR, and experimental nonlinear AC OPF for balanced transmission cases. The website bundles the separate POUNCE WASI solver and enables AC OPF after its browser capability probe succeeds. AC OPF currently solves the unedited base case. It returns nodal prices and supports sensitivity requests through the engine API. Demand/rating edits and saving/exporting AC OPF results are not supported.

Dropped .m, .raw, .aux, .epc, .pwb, .dss, and recognized JSON cases parse in the browser and never upload. Files with coordinates render in place; files without can be placed by clicking the map or paired with .csv, .json, or .geojson geography (powerio's GeoLayer reader; branch routes render as polylines). A PowerWorld .pwd file renders as approximate substation positions, or fills a sibling case without coordinates through its substation numbers. Saved PowerIO modules and exports carry the placement, and the layout downloads as a .geo.json layer.

Development

Prerequisites: Rust from rust-toolchain.toml with rustfmt, clippy, and the wasm32-unknown-unknown target; Node.js 22 or newer; wasm-pack 0.15.x; mdBook 0.5.x for docs.

# backend with the embedded fallback cases
TELLEGEN_ALLOW_FALLBACK=1 cargo run -p tellegen-server

# frontend demo (the dev server proxies /api to localhost:8000)
npm ci
npm run wasm
rustup target add wasm32-wasip1
npm run wasm:acopf
npm run build:engine
npm run build:webmcp
npm run build:analytics
npm run build:svelte
npm --workspace tellegen-frontend run dev

Tests:

cargo test --workspace --exclude tellegen-py
npm run check && npm run build && npm run smoke:web && npm run test:downstream

Case data comes from the operator, not the repository. With the ACTIVSg and CATS distributions under ~/Datasets, scripts/stage-data.sh ~/Datasets stages the complete cases into data/; the server serves whatever is staged.

Repository layout

  • crates/: Rust workspace — tellegen (engine), tellegen-synth (geographic synthetic grids), tellegen-wasm (WebAssembly), tellegen-server (HTTP), tellegen-cli, benchmarks
  • packages/engine/: @tellegen/engine browser package
  • packages/svelte/: @tellegen/svelte component package
  • packages/webmcp/: reusable WebMCP tools, validation, and registration
  • packages/analytics/: @tellegen/analytics, the allowlisted usage analytics shared with MapToGrid
  • apps/web/: the hosted demo, a SvelteKit consumer of the Svelte package
  • examples/: minimal Vite and Svelte integrations of each package
  • docs/src/: mdBook source; scripts/build-docs.sh builds it
  • validation/evidence/: checked-in measurement records (generator sweeps, WebMCP challenge runs, studies, multiconductor references) and the scripts that reproduce them

The HTTP API, deployment, and roadmap pages cover the server surface, hosting, and where the project is going.

Citing

tellegen is described in Interactive Power Flow in the Browser, presented at the Inaugural ACM Conference on Digital Transformation (ACM DXConf 2026, Ann Arbor, October 2026; doi:10.1145/3847238.3849038, arXiv:2610.01922). Please cite it, and the software release you used; GitHub's "Cite this repository" button reads CITATION.cff.

Samuel Talkington, Frederik Geth, Qian Zhang, Le Xie, and Skyler Liu. 2026. Interactive Power Flow in the Browser. In The Inaugural ACM Conference on Digital Transformation (ACM DXConf 2026), October 29–30, 2026, Ann Arbor, MI, USA. ACM, New York, NY, USA, 9 pages. https://doi.org/10.1145/3847238.3849038

@inproceedings{talkington2026tellegen,
  title     = {Interactive Power Flow in the Browser},
  author    = {Talkington, Samuel and Geth, Frederik and Zhang, Qian and Xie, Le and Liu, Skyler},
  booktitle = {The Inaugural ACM Conference on Digital Transformation (ACM DXConf 2026)},
  year      = {2026},
  month     = oct,
  location  = {Ann Arbor, MI, USA},
  publisher = {Association for Computing Machinery},
  address   = {New York, NY, USA},
  numpages  = {9},
  isbn      = {979-8-4007-3028-3},
  doi       = {10.1145/3847238.3849038},
  eprint    = {2610.01922},
  archivePrefix = {arXiv}
}

@software{tellegen2026software,
  title     = {tellegen: interactive power flow and optimal power flow in the browser},
  author    = {Talkington, Samuel and Geth, Frederik and Zhang, Qian and Xie, Le and Liu, Skyler},
  year      = {2026},
  url       = {https://github.com/eigenergy/tellegen},
  license   = {MIT}
}

License

MIT. See docs/src/third-party-notices.md for attributions.

Metadata

Release files for tellegen 0.8.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tellegen 0.8.4
File Size Uploaded Provenance Actions
tellegen-0.8.4.tar.gz 902.2 kB With provenance Details for tellegen-0.8.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tellegen 0.8.4
File Actions
tellegen-0.8.4-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for tellegen-0.8.4-cp311-abi3-win_amd64.whl
tellegen-0.8.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for tellegen-0.8.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
tellegen-0.8.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for tellegen-0.8.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
tellegen-0.8.4-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for tellegen-0.8.4-cp311-abi3-macosx_11_0_arm64.whl
tellegen-0.8.4-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for tellegen-0.8.4-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 66.0 MB

Release files / tellegen-0.8.4.tar.gz

Download URL tellegen-0.8.4.tar.gz
Size 902.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3b36054dad017d15eefd46dd7275d25e6ccc2a18b45d1165832e80671b575cac
BLAKE2b-256 checksum
How to use checksums
840ff9d68920e4ff44ce4bc1a210fb71a85a768583e02633cd64abd7fa366df2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / tellegen-0.8.4-cp311-abi3-win_amd64.whl

Download URL tellegen-0.8.4-cp311-abi3-win_amd64.whl
Size 14.1 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
3ad23cc9250cb5e063201bfd758c615416a3cd3b79b92c46382298d3355008b9
BLAKE2b-256 checksum
How to use checksums
8899de7c1987d68e3d808de85ff5acfad096b57f3809a37a572b93f4989bee40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / tellegen-0.8.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL tellegen-0.8.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 13.6 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
56b807e42d764ba60ecc59c468e7f810f03c240dcd837b216c4f20f8bfb59cfb
BLAKE2b-256 checksum
How to use checksums
f60e08c7d22aa88bc6c7cece822c78fe7a3c6eeb5ee8f784f6b7474d2dff7551
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / tellegen-0.8.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL tellegen-0.8.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 12.2 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
194861a42ae7affac352e4901f9962d41e19d1ad803616933ae85b477fb73db7
BLAKE2b-256 checksum
How to use checksums
0ed43cf228a9f001bd5c7d7a94164e452892af5004634ae1ec7f1330b61c1742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / tellegen-0.8.4-cp311-abi3-macosx_11_0_arm64.whl

Download URL tellegen-0.8.4-cp311-abi3-macosx_11_0_arm64.whl
Size 12.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
031cda24c38ad4376b97cfe1913cb55544e7f07d6b9de826b60738959ac9e618
BLAKE2b-256 checksum
How to use checksums
8cf79c76289cba7a552cc11f5be083fcb438c17d5055baed3953a15497968409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / tellegen-0.8.4-cp311-abi3-macosx_10_12_x86_64.whl

Download URL tellegen-0.8.4-cp311-abi3-macosx_10_12_x86_64.whl
Size 13.1 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
456e10b6fce05464eb20861f77def4105171db1629d85aef4c62d2a3c6bac8ab
BLAKE2b-256 checksum
How to use checksums
91eb5cf4563811005646347cbeb8dd1a249beeaef87ba530e0af01178e0187b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for tellegen 0.8.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for tellegen-0.8.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page