Hi all,
I am trying to solve a mixed integer problem of a network with switches (switches are my binary variables). I can solve my OPF problem with quadratic relaxations like ‘SOCWRPowerModel’, ‘QCRMPowerModel’, ‘QCLSPowerModel’. I would also like to solve my problem with SDP relaxation due to smaller optimality gaps. For that reason, I have set my solver as following with SCS
to solve SDP:
mip_solver = JuMP.optimizer_with_attributes(
Cbc.Optimizer,
...
)
nl_solver = JuMP.optimizer_with_attributes(
SCS.Optimizer,
...
)
solver = JuMP.optimizer_with_attributes(
Juniper.Optimizer,
"nl_solver" => nl_solver,
"mip_solver" => mip_solver,
)
I get the following output:
Status: Solved/Inaccurate
Hit max_iters, solution may be inaccurate, returning best found solution.
Timing: Solve time: 1.22e+001s
Lin-sys: avg # CG iterations: 8.60, avg solve time: 1.17e-004s
Cones: avg projection time: 2.03e-003s
Acceleration: avg step time: 2.63e-004s
----------------------------------------------------------------------------
Error metrics:
dist(s, K) = 4.4009e-003, dist(y, K*) = 1.6233e-009, s'y/|s||y| = 9.9745e-016
primal res: |Ax + s - b|_2 / (1 + |b|_2) = 4.1278e-004
dual res: |A'y + c|_2 / (1 + |c|_2) = 7.7015e-004
rel gap: |c'x + b'y| / (1 + |c'x| + |b'y|) = 4.9388e-003
----------------------------------------------------------------------------
c'x = -36926.4630, -b'y = -37293.0217
============================================================================
┌ Warning: MathOptInterface.VariablePrimalStart() is not supported by SCS.GeometricConicForm{Float64, SCS.SparseMatrixCSRtoCSC{Int64}, NTuple{8, DataType}}. This information will be discarded.
└ @ MathOptInterface.Utilities C:\Users\XXX\.julia\packages\MathOptInterface\YDdD3\src\Utilities\copy.jl:290
┌ Warning: MathOptInterface.VariablePrimalStart() is not supported by SCS.GeometricConicForm{Float64, SCS.SparseMatrixCSRtoCSC{Int64}, NTuple{8, DataType}}. This information will be discarded.
└ @ MathOptInterface.Utilities C:\Users\XXX\.julia\packages\MathOptInterface\YDdD3\src\Utilities\copy.jl:290
┌ Warning: The relaxation is only almost solved.
└ @ Juniper C:\Users\XXX\.julia\packages\Juniper\8wso7\src\model.jl:78
MathOptInterface.UnsupportedConstraint{MathOptInterface.VectorAffineFunction{Float64}, MathOptInterface.SecondOrderCone}: `MathOptInterface.VectorAffineFunction{Float64}`-in-`MathOptInterface.SecondOrderCone` constraint is not supported by the model.
Stacktrace:
[1] bridge_type(b::MathOptInterface.Bridges.LazyBridgeOptimizer{MathOptInterface.Utilities.CachingOptimizer{Cbc.Optimizer, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ModelFunctionConstraints{Float64}}}}}, F::Type{MathOptInterface.VectorAffineFunction{Float64}}, S::Type{MathOptInterface.SecondOrderCone})
@ MathOptInterface.Bridges C:\Users\XXX\.julia\packages\MathOptInterface\YDdD3\src\Bridges\lazy_bridge_optimizer.jl:441
[2] concrete_bridge_type(b::MathOptInterface.Bridges.LazyBridgeOptimizer{MathOptInterface.Utilities.CachingOptimizer{Cbc.Optimizer, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ModelFunctionConstraints{Float64}}}}}, F::Type{MathOptInterface.VectorAffineFunction{Float64}}, S::Type{MathOptInterface.SecondOrderCone})
@ MathOptInterface.Bridges.Constraint C:\Users\XXX\.julia\packages\MathOptInterface\YDdD3\src\Bridges\Constraint\bridge.jl:151
[3] add_constraint(b::MathOptInterface.Bridges.LazyBridgeOptimizer{MathOptInterface.Utilities.CachingOptimizer{Cbc.Optimizer, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ModelFunctionConstraints{Float64}}}}}, f::MathOptInterface.VectorAffineFunction{Float64}, s::MathOptInterface.SecondOrderCone)
@ MathOptInterface.Bridges C:\Users\XXX\.julia\packages\MathOptInterface\YDdD3\src\Bridges\bridge_optimizer.jl:1480
...
I have used SCS
also for an OPF problem without integer variables. The optimization could be solved in that case without any issue.
I have also tried with Mosek
as nl_solver
and I got the error as in this issue
@ccoffrin, Do you have any suggestion regarding solver setup for SDP relaxation for MIP problems? What might be the reason of the errors above?
I appreciate your response.
All the best