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

add warmstart to Settings

This commit is contained in:
kalmarek 2017-12-01 18:26:08 +01:00
parent c849ead0ac
commit 53d413633b

View File

@ -13,6 +13,7 @@ immutable Settings{T<:AbstractMathProgSolver}
solver::T solver::T
upper_bound::Float64 upper_bound::Float64
tol::Float64 tol::Float64
warmstart::Bool
end end
prefix(s::Settings) = s.name prefix(s::Settings) = s.name
@ -192,16 +193,16 @@ function create_SDP_problem(sett::Settings)
return SDP_problem, orb_data return SDP_problem, orb_data
end end
function λandP(m::JuMP.Model, data::OrbitData) function λandP(m::JuMP.Model, data::OrbitData, warmstart=true)
varλ = m[] varλ = m[]
varP = data.Ps varP = data.Ps
λ, Ps = PropertyT.λandP(data.name, m, varλ, varP) λ, Ps = PropertyT.λandP(data.name, m, varλ, varP, warmstart)
return λ, Ps return λ, Ps
end end
function λandP(m::JuMP.Model, data::OrbitData, sett::Settings) function λandP(m::JuMP.Model, data::OrbitData, sett::Settings)
info(logger, "Solving SDP problem...") info(logger, "Solving SDP problem...")
λ, Ps = λandP(m, data) λ, Ps = λandP(m, data, sett.warmstart)
info(logger, "Reconstructing P...") info(logger, "Reconstructing P...")