1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-25 18:25:30 +01:00

non :Optimal solution is worth a warning, not error

This commit is contained in:
kalmar 2017-02-26 13:48:31 +01:00
parent f89dd7641c
commit 35f669595d

View File

@ -80,11 +80,11 @@ function solve_SDP(sdp_constraints, Δ, solver; verbose=true)
verbose && @show solution_status
if solution_status != :Optimal
throw(ExceptionError("The solver did not solve the problem successfully!"))
else
κ = SDP_problem.objVal;
A = JuMP.getvalue(JuMP.getvariable(SDP_problem, :A));;
warn("The solver did not solve the problem successfully!")
end
κ = SDP_problem.objVal;
A = JuMP.getvalue(JuMP.getvariable(SDP_problem, :A));;
return κ, A
end