solve_dopf_aladin_coordinated method call error
tso-martin opened this issue · comments
Dear Mohannad,
Thank you for your publishing PowerModelsADA. I test the ALADIN implementation of PowerModelsADA. I noticed, that it is not possible leave out the optional arguments of solve_dopf_aladin_coordinated
. This gives:
julia> PowerModelsADA.solve_dopf_aladin_coordinated(data_14, ACPPowerModel, nlp_solver)
ERROR: MethodError: no method matching var"#solve_dopf_aladin_coordinated#262"(::String, ::Float64, ::Int64, ::Int64, ::Int64, ::Int64, ::Float64, ::Float64, ::Float64, ::Int64, ::Int64, ::Int64, ::Int64, ::Int64, ::Dict{Any, Any}, ::typeof(solve_dopf_aladin_coordinated), ::Dict{String, Any}, ::Type{ACPPowerModel}, ::MathOptInterface.OptimizerWithAttributes)
Moreover, I could not run the test for solve_dopf_aladin_coordinated
in runtests.jl with data_rts.jl
.
Could be give me a hint on how to fix this, please?
Thank you for highlighting this issue. The issue arises because we passed a wrong argument type for the default value of one of the parameters sigma
. I will fix it in the next update. A workaround for this problem is to explicitly pass the values of the sigma
parameter as follows:
PowerModelsADA.solve_dopf_aladin_coordinated(data_14, ACPPowerModel, nlp_solver, sigma = Dict("w"=> 20, "wr"=>5, "wi"=>5 ,"vi"=> 10, "vr"=> 10, "va" => 10, "vm" => 5, "pf" => 1, "pt" => 1, "qf" => 1, "qt" => 1, "pg" => 1, "qg" => 1))
For the RTS test case in test/data
, ALADIN will not work because the generators' cost functions are piecewise linear, and ALADIN requires smooth differentiable objective functions to work. You can manually change the cost functions from piecewise linear to polynomial. Check MATPOWER documentation for more details.
Thank you for the explanation!
The issue has been fixed.