mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-14 14:15:28 +01:00
minor fixes
This commit is contained in:
parent
5fca3a96c6
commit
f3ec2dd1b1
@ -33,13 +33,13 @@ end
|
|||||||
|
|
||||||
function Settings(name::String,
|
function Settings(name::String,
|
||||||
G::Union{Group, NCRing}, S::AbstractVector{El}, solver::JuMP.OptimizerFactory;
|
G::Union{Group, NCRing}, S::AbstractVector{El}, solver::JuMP.OptimizerFactory;
|
||||||
halfradius::Integer=2, upper_bound::Float64=1.0, force_compute=false) where El <: Union{GroupElem, NCRingElem}
|
halfradius=2, upper_bound=1.0, force_compute=false) where El <: Union{GroupElem, NCRingElem}
|
||||||
return Naive(name, G, S, halfradius, upper_bound, solver, force_compute)
|
return Naive(name, G, S, halfradius, upper_bound, solver, force_compute)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Settings(name::String,
|
function Settings(name::String,
|
||||||
G::Union{Group, NCRing}, S::AbstractVector{El}, autS::Group, solver::JuMP.OptimizerFactory;
|
G::Union{Group, NCRing}, S::AbstractVector{El}, autS::Group, solver::JuMP.OptimizerFactory;
|
||||||
halfradius::Integer=2, upper_bound::Float64=1.0, force_compute=false) where El <: Union{GroupElem, NCRingElem}
|
halfradius=2, upper_bound=1.0, force_compute=false) where El <: Union{GroupElem, NCRingElem}
|
||||||
return Symmetrized(name, G, S, autS, halfradius, upper_bound, solver, force_compute)
|
return Symmetrized(name, G, S, autS, halfradius, upper_bound, solver, force_compute)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ function approximate_by_SOS(sett::Naive,
|
|||||||
P = value.(SDP_problem[:P])
|
P = value.(SDP_problem[:P])
|
||||||
λ = value(SDP_problem[:λ])
|
λ = value(SDP_problem[:λ])
|
||||||
|
|
||||||
if any(isnan.(P))
|
if any(isnan, P)
|
||||||
@warn "The solution seems to contain NaNs. Not overriding warmstart.jld"
|
@warn "The solution seems to contain NaNs. Not overriding warmstart.jld"
|
||||||
else
|
else
|
||||||
save(filename(sett, :warmstart), "warmstart", (ws.primal, ws.dual, ws.slack), "P", P, "λ", λ)
|
save(filename(sett, :warmstart), "warmstart", (ws.primal, ws.dual, ws.slack), "P", P, "λ", λ)
|
||||||
@ -157,7 +157,7 @@ function approximate_by_SOS(sett::Symmetrized,
|
|||||||
λ = value(SDP_problem[:λ])
|
λ = value(SDP_problem[:λ])
|
||||||
Ps = [value.(P) for P in varP]
|
Ps = [value.(P) for P in varP]
|
||||||
|
|
||||||
if any(any(isnan.(P)) for P in Ps)
|
if any(any(isnan, P) for P in Ps)
|
||||||
@warn "The solution seems to contain NaNs. Not overriding warmstart.jld"
|
@warn "The solution seems to contain NaNs. Not overriding warmstart.jld"
|
||||||
else
|
else
|
||||||
save(filename(sett, :warmstart), "warmstart", (ws.primal, ws.dual, ws.slack), "Ps", Ps, "λ", λ)
|
save(filename(sett, :warmstart), "warmstart", (ws.primal, ws.dual, ws.slack), "Ps", Ps, "λ", λ)
|
||||||
@ -210,7 +210,7 @@ function certify_SOS_decomposition(elt::GroupRingElem, orderunit::GroupRingElem,
|
|||||||
@info("Projecting columns of Q to the augmentation ideal...")
|
@info("Projecting columns of Q to the augmentation ideal...")
|
||||||
@time Q, check = augIdproj(Interval, Q)
|
@time Q, check = augIdproj(Interval, Q)
|
||||||
@info "Checking that sum of every column contains 0.0..." check_augmented=check
|
@info "Checking that sum of every column contains 0.0..." check_augmented=check
|
||||||
check || @warn("The following numbers are meaningless!")
|
check || @error("The following numbers are meaningless!")
|
||||||
|
|
||||||
@info("Computing sum of squares decomposition...")
|
@info("Computing sum of squares decomposition...")
|
||||||
@time residual = eoi - compute_SOS(parent(eoi), Q)
|
@time residual = eoi - compute_SOS(parent(eoi), Q)
|
||||||
|
Loading…
Reference in New Issue
Block a user