Fix powerio-prob review findings before the first publish - #253
Merged
Conversation
Reserve membership sets share the reserve rows' document order zone indices; zero impedance GOC3 branches error by uid instead of writing NaN; a missing device_type defaults to producer like the balanced reader; AC instances fold self-loop admittance into the bus shunts, matching build_ybus; both builders reject a bad base MVA; the DC OPF bundle path is confined to the output directory and its manifest reports powerio::VERSION; SCOPF rows and DcOpfOutputs are non_exhaustive; the O(n^2) uid rescans are gone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Conversion MatrixLegendCells show
Transmission6 cases.
Distribution7 cases.
Full warning details: download |
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.
What changed
Fixes from the pre-publish review of
powerio-prob(sonnet 5 review workflow, findings verified by hand against the code andsrc/goc3.jl):active_reserve_set_pr/cs,reactive_reserve_set_pr/cs) now take their zone index from the reserve section's document order, the same order that assignsn_p/n_qin the reserve rows. The sorted uid lists crossed indices between the two tables whenever document order was not alphabetical, and diverged fromsrc/goc3.jlpast nine zones (prz_10sorts beforeprz_2). Regression test with two zones out of lexicographic order.r = x = 0are rejected with the offending uid instead of writing NaN into the static and survivor rows (series_terms, shared by both paths). Stricter thansrc/goc3.jl, which computes the same formula unguarded.simple_dispatchable_devicewithoutdevice_typedefaults toproducerin the SCOPF projection, the balanced reader's rule; the projection previously errored while every other GOC3 consumer accepted the document.build_ac_opf_instancefolds a self-loop branch's whole pi model stamp into the bus shunt vectors, matchingbuild_ybus(validated entrywise in the Y_bus cross-check with a tapped, shifted self-loop).build_dc_opf_instancekeeps dropping self-loops and now says why (no angle difference, shift injection cancels).check_base_mvabefore scaling; a zero base previously produced Inf/NaN under per unit and silently zeroed costs.write_dcopf_bundlesanitizes the case name before joining it into the output path, so bundles stay under the caller's output directory.powerio_versionreports the powerio core version through the newpowerio::VERSIONconst.#[non_exhaustive]on the SCOPF row structs andDcOpfOutputs. The options structs stay literal constructible on purpose.Goc3Section::index(linear rescan per row) is gone; the survivor and transformer loops use their enumerate position.reserve_setshares onedevices_by_bus/bus_orderprecomputation across its four calls.Deferred with an issue: #252 (wire renumbering keyed off bare field names).
Checks
device_typedefault, self-loop fold plus the extended Y_bus entrywise cross-check, zero base MVA rejection in both builders, bundle path confinement.cargo test --workspace --all-features(46 suites),scripts/ci-clippy.sh,cargo fmt --all --check,RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-depsgreen locally.🤖 Generated with Claude Code