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

Getting ValueError: Shape mismatch Error when running OPF #55

Open
Azier1010 opened this issue Oct 1, 2019 · 1 comment
Open

Getting ValueError: Shape mismatch Error when running OPF #55

Azier1010 opened this issue Oct 1, 2019 · 1 comment

Comments

@Azier1010
Copy link

I am receiving the following error when running an OPF
ValueError: shape mismatch: value array of shape (32,) could not be broadcast to indexing result of shape (16,2)

This is for a 15 bus system, the gencost array looks like this:

ppc["gencost"] = array([
[1, 0, 0, 2, 86., 1462., 430, 7310],
[1, 0, 0, 2, 86., 1204., 430, 6020],
[1, 0, 0, 2, 85., 1955., 425, 9775],
[1, 0, 0, 2, 85., 1445., 425, 7225],
[1, 0, 0, 2, 73., 1168., 365, 5840],
[1, 0, 0, 2, 73., 2920., 365, 14600],
[1, 0, 0, 2, 73., 1971., 365, 9855],
[1, 0, 0, 2, 79.8, 2872.8, 399, 14364],
[1, 0, 0, 2, 79.8, 1436.4, 399, 7182],
[1, 0, 0, 2, 79.8, 2633.4, 399, 13167],
[1, 0, 0, 2, 79.8, 2872.8, 399, 14364],
[1, 0, 0, 2, 79.8, 2234.4, 399, 11172],
[1, 0, 0, 2, 80., 1520., 400, 7600],
[1, 0, 0, 2, 80., 1440., 400, 7200],
[1, 0, 0, 2, 81.4, 1221., 407, 6105],
[1, 0, 0, 2, 81.4, 3093.2, 407, 15466]
])

Please help!

@lisb20
Copy link

lisb20 commented Aug 9, 2023

I meet the same error, would anyone solve it, thanks

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