You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
powerio-matrix/src/synth/ generates synthetic cases: tree (random spanning tree), lattice (2-D grid), and pegase-like (spanning tree plus ~n/3 random extra edges, matching the ~2.6 average degree of the PEGASE transmission cases). All take SynthSpec { topology, n, r_over_x, mean_x, seed }, are deterministic per seed, and emit buses and branches only (no loads, shunts, or generators).
The module exists to stress the matrix builders beyond the vendored MATPOWER fixtures: powerio gen + powerio verify exercise B'/B'' structure and solver scaling at sizes like n=100k that no committed fixture reaches. It is an internal test tool, and it stays that way until this RFC concludes. #89 (Python generate_case + an MCP tool) is parked as a draft pending the outcome; #86 tracked the original exposure idea.
Proposal
Extract the module into a workspace crate, powerio-synth, depending only on powerio (it needs nothing but Network). The CLI and powerio-matrix's tests and benches consume it. This is a pure refactor, invisible to every public surface.
Separately decide public exposure: whether powerio.generate_case (Python), a generate_case MCP tool, and eventually C ABI entry points should exist, and under what names.
Doing 1 before 2 keeps the option open: the Rust layout can change freely until a Python or C name ships, and after that it is a contract.
Open questions
Naming. "pegase-like" describes a degree statistic, not a realistic European grid, and the name overpromises. Rename to meshed? Keep with blunt documentation?
Scope. Topology-only fixtures are cheap to maintain. Load, generator, and cost synthesis would make outputs runnable by power flow tools, and is also the slope toward a full synthetic grid project. Where is the line?
Distribution. If promoted, does powerio-synth publish to crates.io alongside the other three crates?
What holds regardless
Deterministic seeds (same arguments, identical case) and Network output, so anything generated feeds every converter, the JSON transport, and the matrix builders unchanged.
Comments welcome, especially from anyone generating test or training cases downstream.
Current state
powerio-matrix/src/synth/generates synthetic cases:tree(random spanning tree),lattice(2-D grid), andpegase-like(spanning tree plus ~n/3 random extra edges, matching the ~2.6 average degree of the PEGASE transmission cases). All takeSynthSpec { topology, n, r_over_x, mean_x, seed }, are deterministic per seed, and emit buses and branches only (no loads, shunts, or generators).The module exists to stress the matrix builders beyond the vendored MATPOWER fixtures:
powerio gen+powerio verifyexercise B'/B'' structure and solver scaling at sizes like n=100k that no committed fixture reaches. It is an internal test tool, and it stays that way until this RFC concludes. #89 (Pythongenerate_case+ an MCP tool) is parked as a draft pending the outcome; #86 tracked the original exposure idea.Proposal
powerio-synth, depending only onpowerio(it needs nothing butNetwork). The CLI and powerio-matrix's tests and benches consume it. This is a pure refactor, invisible to every public surface.powerio.generate_case(Python), agenerate_caseMCP tool, and eventually C ABI entry points should exist, and under what names.Doing 1 before 2 keeps the option open: the Rust layout can change freely until a Python or C name ships, and after that it is a contract.
Open questions
meshed? Keep with blunt documentation?SynthSpec(what feat: expose the synth generators through powerio-py and the MCP server #89 drafts) vs something that can grow per-topology parameters.powerio-synthpublish to crates.io alongside the other three crates?What holds regardless
Deterministic seeds (same arguments, identical case) and
Networkoutput, so anything generated feeds every converter, the JSON transport, and the matrix builders unchanged.Comments welcome, especially from anyone generating test or training cases downstream.