-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bugs found when parsing RTS-GMLC #4
Conversation
src/devices/areas.jl
Outdated
@@ -13,15 +13,15 @@ function get_components_to_pm(sys::PSY.System, ::Type{T}) where {T <: PSY.Area} | |||
# get largest gen bus | |||
pv_buses = [b for b in buses if PSY.get_bustype(b) == PSY.BusTypes.PV] | |||
gens = PSY.get_components(PSY.Generator, sys, x -> PSY.get_bus(x) ∈ pv_buses) | |||
ref_bus = last(sort(collect(gens), by = x -> PSY.get_max_active_power(x))) | |||
ref_bus = PSY.get_bus(last(sort(collect(gens), by = x -> PSY.get_max_active_power(x)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
ref_bus = PSY.get_bus(last(sort(collect(gens), by = x -> PSY.get_max_active_power(x)))) | |
ref_bus = PSY.get_bus( | |
last(sort(collect(gens), by = x -> PSY.get_max_active_power(x))), | |
) |
10929f6
to
334389b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@claytonpbarrows Unit tests on the master branch failed locally for the same reasons as CI. Do you know what's going on? |
This happened: lanl-ansi/PowerModels.jl#798 |
test/test_wrapper.jl
Outdated
return pm_data, pmi_data | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
test/test_wrapper.jl
Outdated
#TODO: remove the following for loop once PM#v0.20.0 is tagged | ||
for id in keys(pmi_data["bus"]) | ||
pm_data["bus"][id] = pmi_data["bus"][id] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daniel-thom this is the short term hack that fixes the parsing discrepancy between PM and PSY that is planned to be addressed in PM#0.20.0
Codecov Report
@@ Coverage Diff @@
## main #4 +/- ##
==========================================
+ Coverage 68.06% 77.38% +9.32%
==========================================
Files 8 8
Lines 263 252 -11
==========================================
+ Hits 179 195 +16
+ Misses 84 57 -27
Flags with carried forward coverage won't be shown. Click here to find out more.
|
No description provided.