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

wip: loss factor variable #1238

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

wip: loss factor variable #1238

wants to merge 4 commits into from

Conversation

rbolgaryn
Copy link

No description provided.

@rbolgaryn rbolgaryn requested a review from GabrielKS February 7, 2025 00:33
Copy link
Contributor

github-actions bot commented Feb 7, 2025

Performance Results

Version Precompile Time
Main 5.579060234
This Branch 5.93337643
Version Build Time
Main-Build Time Precompile 71.000256496
Main-Build Time Postcompile 0.844286152
This Branch-Build Time Precompile 69.966162775
This Branch-Build Time Postcompile 0.853551236
Version Build Time
Main-Solve Time Precompile 620.45959956
Main-Solve Time Postcompile 589.167377326
This Branch-Solve Time Precompile 620.407172988
This Branch-Solve Time Postcompile 579.917418376

test/test_simulation_results.jl Outdated Show resolved Hide resolved
@@ -385,6 +385,8 @@ _get_pf_result(::Type{PowerFlowLineActivePowerFromTo}, pf_data::PFS.PowerFlowDat
PFS.get_branch_activepower_flow_from_to(pf_data)
_get_pf_result(::Type{PowerFlowLineActivePowerToFrom}, pf_data::PFS.PowerFlowData) =
PFS.get_branch_activepower_flow_to_from(pf_data)
_get_pf_result(::Type{PowerFlowLossFactors}, pf_data::PFS.PowerFlowData) =
[PFS.penalty_factors(aux_vars) for aux_vars in pf_data.aux_variables]
Copy link
Contributor

Choose a reason for hiding this comment

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

First, a bit of syntactic sugar:

Suggested change
[PFS.penalty_factors(aux_vars) for aux_vars in pf_data.aux_variables]
PFS.penalty_factors.(pf_data.aux_variables)

Copy link
Contributor

Choose a reason for hiding this comment

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

Second, maybe the issue you're having here is that this is a vector of vectors rather than a matrix? Might need to do some reshaping (see hcat, vcat, etc.).

Copy link
Contributor

Choose a reason for hiding this comment

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

Third, it looks like we now have two different types of things called aux variables. That's going to get confusing.

rbolgaryn and others added 3 commits February 7, 2025 10:32
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Konar-Steenberg <[email protected]>
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