last minute functional changes

This commit is contained in:
kalmarek 2018-11-24 13:58:49 +01:00
parent 9fc23c43d7
commit 8666cc6b2c
1 changed files with 39 additions and 33 deletions

View File

@ -129,6 +129,10 @@ orbit_data = PropertyT.decimate(orbit_data);
elt = adj+3op;
const SOLUTION_FILE = PropertyT.filename(sett, :solution)
if !isfile(SOLUTION_FILE)
SDP_problem, varλ, varP = PropertyT.SOS_problem(elt, Δ, orbit_data; upper_bound=sett.upper_bound)
begin
@ -162,7 +166,11 @@ end
info("Reconstructing P...")
@time P = PropertyT.reconstruct(Ps, orbit_data);
save(PropertyT.filename(sett, :solution), "λ", λ, "P", P)
save(SOLUTION_FILE, "λ", λ, "P", P)
end
P, λ = load(SOLUTION_FILE, "P", "λ")
@show λ;
@time const Q = real(sqrtm(P));
@ -172,14 +180,12 @@ function SOS_residual(eoi::GroupRingElem, Q::Matrix)
return eoi - sos
end
addprocs(4)
@everywhere using PropertyT
@show λ;
info("Floating Point arithmetic:")
EOI = elt - λ*Δ
b = SOS_residual(EOI, Q)
@show norm(b, 1);
info("Interval arithmetic:")
using IntervalArithmetic
Qint = PropertyT.augIdproj(Q);
@assert all([zero(eltype(Q)) in sum(view(Qint, :, i)) for i in 1:size(Qint, 2)])
@ -190,4 +196,4 @@ Q_int = PropertyT.augIdproj(Q);
b_int = SOS_residual(EOI_int, Q_int)
@show norm(b_int, 1);
@interval(λ) - 2^2*norm(b_int,1)
info("λ is certified to be > ", (@interval(λ) - 2^2*norm(b_int,1)).lo)