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

ABA_Matrix dimension mismatch for sparse matrix and axes #87

Closed
akody opened this issue Sep 17, 2024 · 3 comments
Closed

ABA_Matrix dimension mismatch for sparse matrix and axes #87

akody opened this issue Sep 17, 2024 · 3 comments
Labels
question Further information is requested

Comments

@akody
Copy link

akody commented Sep 17, 2024

When running "PNM.ABA_Matrix(sys)" specifically for the RTS GMLC test network, I get a mismatch in the size of the sparse matrix and the length of the axes. See screenshot.
Screenshot 2024-09-16 at 9 54 54 PM

@jd-lara
Copy link
Member

jd-lara commented Sep 21, 2024

@akody this is expected since the ABA matrix doesn't have the slack bus. Indexing is allowed but it will return an error.

image

@jd-lara jd-lara closed this as completed Sep 21, 2024
@jd-lara jd-lara added the question Further information is requested label Sep 21, 2024
@akody
Copy link
Author

akody commented Sep 22, 2024

@jd-lara According to the struct description of ABA_Matrix here, the field "axes" is a "Tuple containing two identical vectors, both containing the number of each bus of the network (each one related to a row/column of the Matrix in "data"), excluding the slack buses."

However, in my example, ABA_Matrix.axes does not contain vectors with the same number of rows/columns as ABA_Matrix.data, and the vectors in ABA_Matrix.axes contain the reference bus.

Let me know if I am misunderstanding something here.

Note: It looks like there are separate ACBusTypes for SLACK and REF; however, ABA_Matrix(.) seems to remove the REF buses using functions calculate_A_matrix(.) and find_slack_positions(.)

Screenshot 2024-09-22 at 2 05 20 PM

@jd-lara
Copy link
Member

jd-lara commented Sep 22, 2024

you are right, we should improve this docstring and descriptor. Up to now not many people use these matrices outside of the PTDF/LODF calculations so we haven't payed too much attention to them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants