update check_property_T

This commit is contained in:
kalmarek 2018-08-20 04:01:34 +02:00
parent c9b226f550
commit 6c247e73fc
1 changed files with 18 additions and 11 deletions

View File

@ -182,22 +182,29 @@ function check_property_T(sett::Settings)
files_exist = ex.([:Uπs, :orbits, :preps]) files_exist = ex.([:Uπs, :orbits, :preps])
if !all(files_exists) if !all(files_exist)
compute_orbit_data(prepath(sett), sett.S, sett.autS, radius=sett.radius) compute_orbit_data(prepath(sett), parent(Δ), sett.autS)
end end
cond1 = exists(filename(fullpath(sett), )) files_exist = exists(filename(fullpath(sett), )) &&
cond2 = exists(filename(fullpath(sett), :P)) exists(filename(fullpath(sett), :P))
if !sett.warmstart && cond1 && cond2 if !sett.warmstart && files_exist
λ, P = λandP(fullpath(sett)) λ, P = loadλandP(fullpath(sett))
else else
info("Creating SDP problem...") warmfile = filename(fullpath(sett), :warm)
SDP_problem, orb_data = create_SDP_problem(sett) if sett.warmstart && exists(warmfile)
JuMP.setsolver(SDP_problem, sett.solver) ws = load(warmfile, "warmstart")
info(Base.repr(SDP_problem)) else
ws = nothing
end
λ, P, ws = computeλandP(Δ, sett, ws,
solverlog=filename(fullpath(sett), :solverlog))
saveλandP(fullpath(sett), λ, P, ws)
λ, P = λandP(SDP_problem, orb_data, sett) if λ < 0
warn("Solver did not produce a valid solution!")
end
end end
info("λ = ") info("λ = ")