1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-14 14:15:28 +01:00

since we warmstart internal model, optimize! it

JuMP.solve discards the internal one
This commit is contained in:
kalmarek 2017-12-01 17:02:45 +01:00
parent 10808583e3
commit e53486f394
2 changed files with 6 additions and 8 deletions

View File

@ -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

View File

@ -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)