NREL-Sienna / PowerNetworkMatrices.jl

Methods to generate matrix representations of power systems matrices
BSD 3-Clause "New" or "Revised" License
20 stars 8 forks source link

New methods for LODF: improvements and virtual LODF #41

Closed alefcastelli closed 1 year ago

alefcastelli commented 1 year ago

Faster LODF computation based on sparse matrix, new Virtual LODF methods similar to Virtual PTDF

github-actions[bot] commented 1 year ago
Performance Results Version Precompile Time
Main 7.126939218
This Branch 6.994789123
Version Execute Time
Main-Build PTDF First 7.743449761
Main-Build PTDF Second 0.312042326
Main-Build Ybus First 0.454718199
Main-Build Ybus Second 0.010469206
Main-Build LODF First 3.020511067
Main-Build LODF Second 2.83979253
This Branch-Build PTDF First 7.136328525
This Branch-Build PTDF Second 0.389784934
This Branch-Build Ybus First 0.440246555
This Branch-Build Ybus Second 0.009899839
This Branch-Build LODF First 0.844049427
This Branch-Build LODF Second 0.332030636
codecov[bot] commented 1 year ago

Codecov Report

Merging #41 (5942d40) into main (3d8fbc3) will decrease coverage by 3.55%. The diff coverage is 64.23%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41/graphs/tree.svg?width=650&height=150&src=pr&token=2VvekKsf11&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna)](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna) ```diff @@ Coverage Diff @@ ## main #41 +/- ## ========================================== - Coverage 73.76% 70.21% -3.55% ========================================== Files 12 13 +1 Lines 827 1004 +177 ========================================== + Hits 610 705 +95 - Misses 217 299 +82 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `70.21% <64.23%> (-3.55%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna) | Coverage Δ | | |---|---|---| | [src/lodf\_calculations.jl](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL2xvZGZfY2FsY3VsYXRpb25zLmps) | `55.00% <53.40%> (-45.00%)` | :arrow_down: | | [src/row\_cache.jl](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL3Jvd19jYWNoZS5qbA==) | `54.05% <54.05%> (ø)` | | | [src/virtual\_lodf\_calculations.jl](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL3ZpcnR1YWxfbG9kZl9jYWxjdWxhdGlvbnMuamw=) | `68.26% <68.26%> (ø)` | | | [src/ptdf\_calculations.jl](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL3B0ZGZfY2FsY3VsYXRpb25zLmps) | `75.15% <72.72%> (-1.47%)` | :arrow_down: | | [src/common.jl](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL2NvbW1vbi5qbA==) | `92.61% <78.94%> (-0.24%)` | :arrow_down: | | [src/adjacency\_matrix.jl](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL2FkamFjZW5jeV9tYXRyaXguamw=) | `73.91% <100.00%> (-2.09%)` | :arrow_down: | | [src/system\_utils.jl](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL3N5c3RlbV91dGlscy5qbA==) | `100.00% <100.00%> (ø)` | | | [src/virtual\_ptdf\_calculations.jl](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL3ZpcnR1YWxfcHRkZl9jYWxjdWxhdGlvbnMuamw=) | `65.07% <100.00%> (+3.31%)` | :arrow_up: | | [src/ybus\_calculations.jl](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL3lidXNfY2FsY3VsYXRpb25zLmps) | `74.76% <100.00%> (-0.24%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/NREL-Sienna/PowerNetworkMatrices.jl/pull/41/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna)
jd-lara commented 1 year ago

The results of loading the LODF in the MMWG dataset are 227.657088 seconds (1.71 M allocations: 193.263 GiB, 2.61% gc time, 0.01% compilation time) which is reasonable enough for now. More improvements later.