Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the
qpf-modelexporter from the PowerIO workspace into this repository asscripts/qpf_model.py. The wrapper scripts no longer needPOWERIO_ROOTor a Rust toolchain; an installed PowerIO wheel is enough to go from a MATPOWER case to a checked certificate.Details
scripts/qpf_model.pyreads only the pinned PowerIO surface (parse_file,len(network.buses), branch rows throughin_service,from_id,to_id, andx, andto_networkxfor the bus id universe) and writes each in service branch weight1/xas an exact odd significand dyadic pair. Python floats are binary64, so(1/x).as_integer_ratio()reproduces the same bits the Rust exporter produced.scripts/qpf-certandscripts/qpf-checknow call the python exporter. Nonpositive reactance, self loops, and unknown endpoints are refused with exit 2 before the checker runs.experiments/tests/test_powerio_compat.pybecause the exporter consumes exactly the surface that file pins. They run in the compatibility job against the released wheel and in the prerelease workflow against the PowerIO v0.9 stack, and skip in the locked experiment environment.Verification
pytest experiments/tests/test_powerio_compat.pyagainst powerio 0.8.3 in a fresh environment: 7 passed.scripts/qpf-certthenscripts/qpf-checkprints exact rationals and returns exit 0 with verdictNO.🤖 Generated with Claude Code