Skip to content

Conversation

@hfytr
Copy link
Collaborator

@hfytr hfytr commented Jul 14, 2025

This PR fills out the main functionality of the repo. I'd like to hold off on writing docs till the API is finalized)

  • CI in .github/workflows/ci.yml
  • dedicated benchmarks directory that compares with PowerModels.jl
  • tests
  • supports named tuples as well as struct output
  • Uses PGLib.jl to download sample datasets

Copy link
Member

@sshin23 sshin23 left a comment

Choose a reason for hiding this comment

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

Great work, @hfytr. Please see my initial round of comments

hfytr added 11 commits July 25, 2025 10:37
[ Info: Running ExaPowerIO:
  1.327 s (86402 allocations: 809.27 MiB)
[ Info: Running JLD2:
  61.522 ms (460398 allocations: 174.76 MiB)
[ Info: Running PowerModels:
  36.598 s (531914384 allocations: 18.62 GiB)
[ Info: Running ExaPowerIO:
  1.066 s (80752 allocations: 808.78 MiB)
[ Info: Running JLD2:
  57.796 ms (460398 allocations: 174.76 MiB)
[ Info: Running PowerModels:
  34.942 s (531914384 allocations: 18.62 GiB)
Copy link
Member

@sshin23 sshin23 left a comment

Choose a reason for hiding this comment

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

@hfytr, here's a second round feedback

return Expr(:block, body...)
end

@inbounds @inline @views function parse_matpower(::Type{T}, ::Type{V}, fname :: String) where {T<:Real, V<:AbstractVector}
Copy link
Member

Choose a reason for hiding this comment

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

This function should be broken down into several smaller functions, e.g., _parse_matpower_bus, _parse_matpower_branch, etc.

Copy link
Member

Choose a reason for hiding this comment

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

I also see a lot of commonality between different types of data. Can we write _parse_matpower function that takes in a tuple of types e.g., (T,T,Int,T,T) and parse the array?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

_parse_matpower cant exist because different mpc.() uses different normalizations
i can change @iter_to_ntuple to do something similar

@sshin23 sshin23 assigned sshin23 and unassigned sshin23 Jul 26, 2025
@sshin23 sshin23 requested a review from SanjayJohnson02 July 26, 2025 18:13
for row_type in ROW_TYPES
@test isbitstype(row_type)
end
end
Copy link
Member

Choose a reason for hiding this comment

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

We should include another Test that test the parser with ExaModelsPower

Copy link
Collaborator Author

@hfytr hfytr Jul 28, 2025

Choose a reason for hiding this comment

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

using out_type=NamedTuple or PowerData?

Copy link
Member

Choose a reason for hiding this comment

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

PowerData, per exanauts/ExaModels.jl#160

The new version will be released soon

@sshin23
Copy link
Member

sshin23 commented Jul 31, 2025

@hfytr I'll merge this PR for now

@sshin23 sshin23 merged commit e3fab03 into main Jul 31, 2025
6 checks passed
hfytr added a commit that referenced this pull request Aug 4, 2025
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.

3 participants