About using powermodels to solve problems with SDP-OPF

I want to use the ECOS solver to solve some errors in the SDP model in OPF.

using JuMP, PowerModels, Ipopt,ECOS

file_name = "E:/Vscode——data/data/case5.m"

model = Model(ECOS.Optimizer)
power_model = PowerModels.instantiate_model(
PowerModels.parse_file(file_name),
PowerModels.SDPWRMPowerModel,
PowerModels.build_opf;
jump_model = model,
)
optimize!(model)
println("Optimal objective value: ", JuMP.objective_value(model))`

The following is the error reported:

ERROR: `MOI.VectorAffineFunction{Float64}`-in-`MOI.PositiveSemidefiniteConeSquare`constraints are not supported and cannot be bridged into supported constrained variables and constraints. See details below: [6] constrained variables in`MOI.PositiveSemidefiniteConeSquare`are not supported because no added bridge supports bridging it. Cannot add free variables and then constrain them because: (12)`MOI.VectorOfVariables`-in-`MOI.PositiveSemidefiniteConeSquare`constraints are not supported [7] constrained variables in`MOI.PositiveSemidefiniteConeTriangle`are not supported because no added bridge supports bridging it. Cannot add free variables and then constrain them because: (13)`MOI.VectorOfVariables`-in-`MOI.PositiveSemidefiniteConeTriangle`constraints are not supported (11)`MOI.VectorAffineFunction{Float64}`-in-`MOI.PositiveSemidefiniteConeSquare`constraints are not supported because: Cannot use`MOIB.Constraint.VectorSlackBridge{Float64, MOI.VectorAffineFunction{Float64}, MOI.PositiveSemidefiniteConeSquare}`because: [6] constrained variables in`MOI.PositiveSemidefiniteConeSquare`are not supported Cannot use`MOIB.Constraint.SquareBridge{Float64, MOI.VectorAffineFunction{Float64}, MOI.ScalarAffineFunction{Float64}, MOI.PositiveSemidefiniteConeTriangle, MOI.PositiveSemidefiniteConeSquare}`because: (14)`MOI.VectorAffineFunction{Float64}`-in-`MOI.PositiveSemidefiniteConeTriangle`constraints are not supported (12)`MOI.VectorOfVariables`-in-`MOI.PositiveSemidefiniteConeSquare`constraints are not supported because: Cannot use`MOIB.Constraint.VectorFunctionizeBridge{Float64, MOI.PositiveSemidefiniteConeSquare}`because: (11)`MOI.VectorAffineFunction{Float64}`-in-`MOI.PositiveSemidefiniteConeSquare`constraints are not supported Cannot use`MOIB.Constraint.SquareBridge{Float64, MOI.VectorOfVariables, MOI.ScalarAffineFunction{Float64}, MOI.PositiveSemidefiniteConeTriangle, MOI.PositiveSemidefiniteConeSquare}`because: (13)`MOI.VectorOfVariables`-in-`MOI.PositiveSemidefiniteConeTriangle`constraints are not supported (13)`MOI.VectorOfVariables`-in-`MOI.PositiveSemidefiniteConeTriangle`constraints are not supported because: Cannot use`MOIB.Constraint.VectorFunctionizeBridge{Float64, MOI.PositiveSemidefiniteConeTriangle}`because: (14)`MOI.VectorAffineFunction{Float64}`-in-`MOI.PositiveSemidefiniteConeTriangle`constraints are not supported (14)`MOI.VectorAffineFunction{Float64}`-in-`MOI.PositiveSemidefiniteConeTriangle`constraints are not supported because: Cannot use`MOIB.Constraint.VectorSlackBridge{Float64, MOI.VectorAffineFunction{Float64}, MOI.PositiveSemidefiniteConeTriangle}`because: [7] constrained variables in`MOI.PositiveSemidefiniteConeTriangle` are not supported

ECOS does not support the positive semidefinite cone.

Try SCS.jl instead: jump-dev/SCS.jl · JuMP