Skip to content
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

Merged
merged 7 commits into from
Dec 16, 2021
Merged

Fix bugs found when parsing RTS-GMLC #4

merged 7 commits into from
Dec 16, 2021

Conversation

daniel-thom
Copy link
Contributor

No description provided.

@@ -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))))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
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))),
)

Copy link
Member

@claytonpbarrows claytonpbarrows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@daniel-thom
Copy link
Contributor Author

@claytonpbarrows Unit tests on the master branch failed locally for the same reasons as CI. Do you know what's going on?

@claytonpbarrows
Copy link
Member

This happened: lanl-ansi/PowerModels.jl#798

return pm_data, pmi_data
end


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

Comment on lines 12 to 15
#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
Copy link
Member

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
Copy link

codecov bot commented Dec 16, 2021

Codecov Report

Merging #4 (9d7ac88) into main (1966904) will increase coverage by 9.32%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 77.38% <100.00%> (+9.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/devices/areas.jl 93.75% <100.00%> (ø)
src/devices/gen.jl 76.62% <100.00%> (+31.62%) ⬆️
src/devices/bus.jl 100.00% <0.00%> (ø)
src/pm_data_translator.jl 100.00% <0.00%> (ø)
src/devices/load.jl 52.38% <0.00%> (+0.10%) ⬆️

@claytonpbarrows claytonpbarrows merged commit 5f9b3b5 into main Dec 16, 2021
@daniel-thom daniel-thom deleted the dt/bug-fixes branch December 16, 2021 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants