I tried to call “bound_tightening_call_from_matlab” script in which it calls and runs the “run_obbt_opf” function by the following command. For whatever reason the following code doesn’t recognize the test case. I use Julia v.06. Can you please let me know how I can fix this?
My second question is about saving the output of the bound tightening code. Is there any function that can save the output for the bound tightening code as test_case.m? Thanks in advance!
I don’t know Matlab that well, so I can’t speak to how one would call Julia. I can recommend this workflow to export the bound information as a Matpower data file, which may serve your needs,
using Ipopt; using PowerModels
solver = optimizer_with_attributes(Ipopt.Optimizer, "tol"=>1e-6, "print_level"=>0)
case, stats = run_obbt_opf!("pglib_opf_case5_pjm.m", solver)
open("pglib_opf_case5_pjm-bt.m", "w") do io
export_matpower(io, case)
end
I don’t know about your case, I’ve been translating MATLAB code myself to Julia, and there are some similar packages that actually work in Julia 1.0, to help with compatibility maybe with some overlap with the one above, that probably someone should update. There’s also a Matlab-to-Julia syntax “transpiler”/compiler, it can be helpful, just note it’s not perfect, and may mistranslate, introduce bugs, extra ’ that is transpose, is the only major issue…