Open ll-O-ll opened 3 years ago
Hi Nissal,
I'm so excited to hear you'd be interested in this project! To answer your questions:
Unfortunately I still haven't finished building the native PF package in Julia. As of now only the Newton-Raphson ACPF module is complete, but I haven't implemented the DCPF algorithm. However, if you want to complete that, I think it shouldn't take you more than a week at most, and I'd be happy to guide you through some of the existing code I wrote.
Alternatively, these guys have implemented a native PF solver using their OPF codebase. I actually started by using this package before they implemented the native PF solver (so back then, they were solving a feasibility problem using the OPF formulation), but that didn't work with the "hot-start" values generated by the CNN --- see the related issue: https://github.com/lanl-ansi/PowerModels.jl/issues/590. I looked into their current native PF formulation, which relies on the Julia nonlinear solver package NLsolve.jl
; although it doesn't beat MATPOWER in terms of solution speed (because the last time I checked, the LU decomposition on Julia doesn't support a customized ordering scheme, issue: https://github.com/JuliaLang/julia/issues/36720, which is what MATPOWER does), it should now work with the hot-start values. Additionally, if you go into the old
directory in this repo, the load_file.jl
and hot_start_acpf.jl
should both work with minimal changes since they were written based on the PowerModels.jl
functions.
The reason why I chose Julia was that, at the time, I didn't find a Python library with the power flow functions (I didn't do much digging because I also wanted to learn Julia either way). So I think it would be a good idea to keep using Julia and you'll see that it actually shares a lot of similarities with Python, and if written well, can have a much better performance than Python. (Of course it doesn't hurt to translate it to Python!) You can ask Prof. Tate for some ideas I sent him after I stopped working on this project, and some of them had to do with using the PF results as part of the cost function to train the NN, in which case having everything written in a single language like Julia or Python or Matlab would be ideal. This also ties back to the problem with having a Julia package that handles native PF computations.
Hopefully this helps!
A couple of points:
Best, Nissal