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

MATPOWER 8 return task and om. #17

Closed
yasirroni opened this issue May 29, 2024 · 1 comment
Closed

MATPOWER 8 return task and om. #17

yasirroni opened this issue May 29, 2024 · 1 comment

Comments

@yasirroni
Copy link
Owner

yasirroni commented May 29, 2024

from matpower import start_instance
from matpowercaseframes import CaseFrames

m = start_instance()

mpc = m.loadcase('case9', verbose=False)

m.push("_mpc", mpc, verbose=False)
m.eval("_r1 = runpf(_mpc);", verbose=True)
fieldnames_r1 = m.eval("fieldnames(_r1);", verbose=False)

for i in fieldnames_r1.ravel():
    try:
        val = m.eval(f"_r1.{i};", verbose=False)
        # print(type(val))
        # print(val)
    except Exception as e:
        print(i)
        print(e)
        pass
Cell(['version', 'baseMVA', 'bus', 'gen', 'branch', 'gencost', 'order',
       'task', 'et', 'success', 'iterations', 'om'])
task
Octave evaluation error:
error: save: error while writing '' to MAT file
om
Octave evaluation error:
error: save: error while writing '' to MAT file
@yasirroni yasirroni changed the title MATPOWER 8 return om and raw. MATPOWER 8 return task and om. May 29, 2024
@yasirroni
Copy link
Owner Author

Solved in #15.

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

1 participant