mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-27 01:10:28 +01:00
since we warmstart internal model, optimize! it
JuMP.solve discards the internal one
This commit is contained in:
parent
10808583e3
commit
e53486f394
@ -165,14 +165,12 @@ function compute_λandP(m, varλ, varP; warmstart=nothing)
|
||||
P = nothing
|
||||
while λ == 0.0
|
||||
try
|
||||
if warmstart != nothing
|
||||
p_sol, d_sol, s = warmstart
|
||||
MathProgBase.SolverInterface.setwarmstart!(m.internalModel, p_sol; dual_sol = d_sol, slack=s);
|
||||
end
|
||||
solve_SDP(m)
|
||||
λ = JuMP.getvalue(varλ)
|
||||
P = JuMP.getvalue(varP)
|
||||
|
||||
p_sol = m.internalModel.primal_sol
|
||||
d_sol = m.internalModel.dual_sol
|
||||
s = m.internalModel.slack
|
||||
|
||||
λ = MathProgBase.getobjval(m.internalModel)
|
||||
catch y
|
||||
warn(solver_logger, y)
|
||||
end
|
||||
|
@ -61,7 +61,7 @@ function solve_SDP(SDP_problem)
|
||||
o = redirect_stdout(solver_logger.handlers["solver_log"].io)
|
||||
Base.Libc.flush_cstdio()
|
||||
|
||||
@logtime logger solution_status = JuMP.solve(SDP_problem)
|
||||
@logtime logger solution_status = MathProgBase.optimize!(SDP_problem.internalModel)
|
||||
Base.Libc.flush_cstdio()
|
||||
|
||||
redirect_stdout(o)
|
||||
|
Loading…
Reference in New Issue
Block a user