-
Notifications
You must be signed in to change notification settings - Fork 9
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
add Yft, Ytf to power_network_matrix Ybus #95
base: main
Are you sure you want to change the base?
Conversation
Add branch admittance matrices (Yft, Ytf) to the Ybus structure so that we can efficiently calculate branch flows in PowerFlows in AC power flow calculation. |
Performance Results
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #95 +/- ##
==========================================
+ Coverage 77.61% 77.83% +0.22%
==========================================
Files 14 14
Lines 1398 1430 +32
==========================================
+ Hits 1085 1113 +28
- Misses 313 317 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
formatting Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
A few minor things. I might not yet fully understand the use case. Also, this is missing tests.
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.
These additional entries are in fact different Matrices. They should be separated into their own object and potentially store just one matrix but implement methods that allow the calculations to be done efficiently.
This PR should be good now |
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.
Add a kwarg to the Ybus constructor to store the additional matrices and create nullable fields for the additional matrices and the branches index.
todo: 1) make also the ft, tb, sb, nullable (don"t populate those either), 2) update docstrings for Ybus struct |
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.
Deferring to @jd-lara to evaluate the design on the whole
@@ -2,55 +2,85 @@ | |||
Nodal admittance matrix (Ybus) is an N x N matrix describing a power system with N buses. It represents the nodal admittance of the buses in a power system. | |||
|
|||
The Ybus Struct is indexed using the Bus Numbers, no need for them to be sequential | |||
|
|||
The fields yft and ytf are the branch admittance matrices for the from-to and to-from branch admittances respectively. They are indexed with the branch numbers and the bus numbers. | |||
The branch numbers are sequential. The bus numbers are represented by fb, tb arraus of sequential bus indices (internal bus indices). |
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.
The branch numbers are sequential. The bus numbers are represented by fb, tb arraus of sequential bus indices (internal bus indices). | |
The branch numbers are sequential. The bus numbers are represented by fb, tb arrays of sequential bus indices (internal bus indices). |
Thanks for opening a PR to PowerNetworkMatrices.jl, please take note of the following when making a PR:
Check the contributor guidelines