Closed vitordsbatista closed 7 years ago
Hi, thanks for the feedback, makes sense to check for one-dimensional gen arrays. Do you want to submit your changes as a pull request?
Yes. However, first I will find a faster way to modify it.
importing network data is usually done exactly once and not repeatedly, so I don't think performance is a crucial issue here. The rest of the converter is also not optimized much for speed, so in my opinion the solution you posted is absolutely fine.
I know, but I work with genetic algorithm, I must call the power flow at least 10000 times, maybe more, so I need the power flow be fast.
I agree the power flow has to be fast, and we optimized the power flow to be as fast as possible. But the conversion from matpower is not part of the power flow, so I don't understand what workflow would require you to call the conversion 1000 times? I would think you would import from matpower to pandapower once and then do 1000 power flows just in pandapower?
You're right, I only will convert some matpower case once. Sorry for that. Just one more question. Do you think it's necessary check the shape of another variables form the dict, like ppc["bus"] and ppc["branch"]?
there is probably going to be very few cases with one bus or one branch, but it can't hurt, so if you are already at: why not :)
are you still doing this or shall we add the fix ourselves?
are you still doing this or shall we add the fix ourselves?
Sorry to not answer before, many things to do. I'm not developing the faster way, as you say the program will only import the matcases once. I thought you'd better fix it by yourselves. Thank you for your understanding
Hello, I found a bug in your package. When I tried to import an MATPOWER case the following error occurred:
This error occurred because sometimes ppc["gen"] could be an array, not a matrix. So, I reshaped the array to transform it in a single line matrix by adding the following code before it.
Probably there is a faster way to solve it, but it fixed my problem.