mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2025-01-13 22:52:34 +01:00
shuffling of @show and 'verbose'
This commit is contained in:
parent
261e4395f5
commit
a828ab4254
@ -67,23 +67,21 @@ function create_SDP_problem(matrix_constraints, Δ::GroupAlgebraElement; upper_b
|
|||||||
return m
|
return m
|
||||||
end
|
end
|
||||||
|
|
||||||
function solve_SDP(sdp_constraints, Δ, solver; verbose=true)
|
function solve_SDP(SDP_problem, solver)
|
||||||
SDP_problem = create_SDP_problem(sdp_constraints, Δ);
|
@show SDP_problem
|
||||||
verbose && @show solver
|
@show solver
|
||||||
|
|
||||||
JuMP.setsolver(SDP_problem, solver);
|
JuMP.setsolver(SDP_problem, solver);
|
||||||
verbose && @show SDP_problem
|
|
||||||
# @time MathProgBase.writeproblem(SDP_problem, "/tmp/SDP_problem")
|
# @time MathProgBase.writeproblem(SDP_problem, "/tmp/SDP_problem")
|
||||||
solution_status = JuMP.solve(SDP_problem);
|
solution_status = JuMP.solve(SDP_problem);
|
||||||
verbose && @show solution_status
|
|
||||||
|
|
||||||
if solution_status != :Optimal
|
if solution_status != :Optimal
|
||||||
warn("The solver did not solve the problem successfully!")
|
warn("The solver did not solve the problem successfully!")
|
||||||
end
|
end
|
||||||
|
@show solution_status
|
||||||
|
|
||||||
κ = JuMP.getvalue(JuMP.getvariable(SDP_problem, :κ))
|
κ = JuMP.getvalue(JuMP.getvariable(SDP_problem, :κ))
|
||||||
A = JuMP.getvalue(JuMP.getvariable(SDP_problem, :A))
|
A = JuMP.getvalue(JuMP.getvariable(SDP_problem, :A))
|
||||||
@show sum(A)
|
|
||||||
return κ, A
|
return κ, A
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user