Read bus voltages with explicit units (PowerSystems.jl#1823 fallout) - #335
Open
luke-kiernan wants to merge 1 commit into
Open
luke-kiernan wants to merge 1 commit into
luke-kiernan wants to merge 1 commit into
Conversation
PowerSystems.jl#1823 made bus magnitude/voltage_limits unit-bearing: getters need an explicit unit and the ACBus/DCBus keyword constructors need input_basis. CU returns the same per-unit-on-bus-base values as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Performance Results
|
This branch has not been deployed
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.
Companion to Sienna-Platform/PowerSystems.jl#1823 (merged), which makes bus
magnitude/voltage_limitsunit-bearing. After aPkg.update, the 1-arg getters throw and theACBus(; ...)/DCBus(; ...)keyword constructors requireinput_basis.Changes
src: everyget_magnitude/get_voltage_limitson a bus now passesPSY.CU(network models, HVDC, shunts, regulated voltage, branch bounds). CU is per-unit on the bus base voltage, which is exactly what the 1-arg getter returned before, so no model changes. (Voltage per-unit is also the same inCUandSU.)test: the same accessor change,input_basis = PSY.CUon 10 bus keyword constructors, and a named(min = ..., max = ...)tuple forvoltage_limitsinmbc_math_helpers.jl. The keyword constructor rejects unnamed tuples for unit-bearing compound fields.Warning
Revert before merging:
test/Project.tomlpinsPowerSystemCaseBuilderandPowerFlowstorev = "lk/voltage-units-1821". Set them back torev = "psy6"once Sienna-Platform/PowerSystemCaseBuilder.jl#233 and Sienna-Platform/PowerFlows.jl#462 merge. Both need the same fix: PSB's builders construct buses by keyword, and PF's init readsget_magnitude.Testing
Full suite: 128510 passed. The only failures were in
test_power_flow_in_the_loop, where PFpsy6calls 1-argget_magnitude. With PF pinned to #462 that file is 872/873. The remaining error, at line 712, predates this PR: the test passesACPolarPowerFlow(; solver_settings = ...), a keyword PFpsy6doesn't define.🤖 Generated with Claude Code