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

some cases have different units and are not correctly read by CaseFrames #3

Closed
salvapineda opened this issue Mar 12, 2024 · 3 comments

Comments

@salvapineda
Copy link

Hi,
Some cases like case16am.m (https://github.com/MATPOWER/matpower/blob/master/data/case16am.m) have the impedance un ohm instead of p.u. If you read this case with matpower, there is no problem, because the final lines in the file case16am.m changes the units. However, if you read the file using CaseFrames these last lines are not read, and you will operate with the impedances in omhs instead of p.u. Not sure if there is an easy fix for that. In any case, thanks a lot beforehand.
Salva.

@yasirroni
Copy link
Member

Hi @salvapineda. Sorry, please mention me to make me notice about any problems. I will try to look at it later.

@yasirroni
Copy link
Member

Solution, use matpower-pip for the data and utilize loadcase as it is the most intended way of loading matpower case. Maybe, I will make a PR to use this as the default behavior:

from matpower import start_instance
from matpowercaseframes import CaseFrames


m = start_instance()

CASE_NAME = f"case16am.m"
mpc = m.loadcase(CASE_NAME)  # this will run ohm to p.u. convertion
cf_16am = CaseFrames(mpc)
cf_16am.branch

@yasirroni
Copy link
Member

Added feature to use loadcase in #7.

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

No branches or pull requests

2 participants