mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2025-01-13 06:47:32 +01:00
tweaking solvers parameters in tests
This commit is contained in:
parent
c9f68eee8f
commit
d3975790f2
@ -20,12 +20,12 @@
|
|||||||
optimizer = scs_optimizer(;
|
optimizer = scs_optimizer(;
|
||||||
eps = 1e-10,
|
eps = 1e-10,
|
||||||
max_iters = 5_000,
|
max_iters = 5_000,
|
||||||
accel = 50,
|
accel = -50,
|
||||||
alpha = 1.9,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@test status == JuMP.ALMOST_OPTIMAL
|
@test status == JuMP.OPTIMAL
|
||||||
@test !certified
|
@test !certified
|
||||||
@test λ < 0
|
@test λ < 0
|
||||||
end
|
end
|
||||||
@ -53,7 +53,7 @@
|
|||||||
optimizer = scs_optimizer(;
|
optimizer = scs_optimizer(;
|
||||||
eps = 1e-10,
|
eps = 1e-10,
|
||||||
max_iters = 5_000,
|
max_iters = 5_000,
|
||||||
accel = 50,
|
accel = -50,
|
||||||
alpha = 1.9,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -65,15 +65,16 @@
|
|||||||
m = PropertyT.sos_problem_dual(elt, unit)
|
m = PropertyT.sos_problem_dual(elt, unit)
|
||||||
PropertyT.solve(
|
PropertyT.solve(
|
||||||
m,
|
m,
|
||||||
cosmo_optimizer(;
|
scs_optimizer(;
|
||||||
eps = 1e-6,
|
eps = 1e-3,
|
||||||
max_iters = 5_000,
|
max_iters = 5_000,
|
||||||
accel = 50,
|
accel = -50,
|
||||||
alpha = 1.9,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@test JuMP.termination_status(m) in (JuMP.ALMOST_OPTIMAL, JuMP.OPTIMAL)
|
@test JuMP.termination_status(m) in
|
||||||
|
(JuMP.ITERATION_LIMIT, JuMP.ALMOST_OPTIMAL, JuMP.OPTIMAL)
|
||||||
@test JuMP.objective_value(m) ≈ 1.5 atol = 1e-2
|
@test JuMP.objective_value(m) ≈ 1.5 atol = 1e-2
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -98,12 +99,12 @@
|
|||||||
optimizer = scs_optimizer(;
|
optimizer = scs_optimizer(;
|
||||||
eps = 1e-10,
|
eps = 1e-10,
|
||||||
max_iters = 5_000,
|
max_iters = 5_000,
|
||||||
accel = 50,
|
accel = -50,
|
||||||
alpha = 1.9,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@test status == JuMP.ALMOST_OPTIMAL
|
@test status in (JuMP.ALMOST_OPTIMAL, JuMP.ITERATION_LIMIT)
|
||||||
@test λ < 0
|
@test λ < 0
|
||||||
@test !certified
|
@test !certified
|
||||||
|
|
||||||
@ -111,14 +112,14 @@
|
|||||||
|
|
||||||
status, _ = PropertyT.solve(
|
status, _ = PropertyT.solve(
|
||||||
sos_problem,
|
sos_problem,
|
||||||
cosmo_optimizer(;
|
scs_optimizer(;
|
||||||
eps = 1e-7,
|
eps = 1e-7,
|
||||||
max_iters = 10_000,
|
max_iters = 5_000,
|
||||||
accel = 0,
|
accel = -50,
|
||||||
alpha = 1.9,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@test status == JuMP.OPTIMAL
|
@test status in (JuMP.OPTIMAL, JuMP.ITERATION_LIMIT)
|
||||||
P = JuMP.value.(sos_problem[:P])
|
P = JuMP.value.(sos_problem[:P])
|
||||||
Q = real.(sqrt(P))
|
Q = real.(sqrt(P))
|
||||||
certified, λ_cert =
|
certified, λ_cert =
|
||||||
@ -149,11 +150,11 @@
|
|||||||
|
|
||||||
status, _ = PropertyT.solve(
|
status, _ = PropertyT.solve(
|
||||||
opt_problem,
|
opt_problem,
|
||||||
cosmo_optimizer(;
|
scs_optimizer(;
|
||||||
eps = 1e-10,
|
eps = 1e-10,
|
||||||
max_iters = 10_000,
|
max_iters = 10_000,
|
||||||
accel = 0,
|
accel = 50,
|
||||||
alpha = 1.5,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -176,10 +176,10 @@
|
|||||||
|
|
||||||
status, _ = PropertyT.solve(
|
status, _ = PropertyT.solve(
|
||||||
opt_problem,
|
opt_problem,
|
||||||
scs_optimizer(;
|
cosmo_optimizer(;
|
||||||
eps = 1e-8,
|
eps = 1e-8,
|
||||||
max_iters = 20_000,
|
max_iters = 20_000,
|
||||||
accel = 0,
|
accel = 50,
|
||||||
alpha = 1.9,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -130,7 +130,7 @@ end
|
|||||||
wd;
|
wd;
|
||||||
upper_bound = UB,
|
upper_bound = UB,
|
||||||
halfradius = 2,
|
halfradius = 2,
|
||||||
optimizer = cosmo_optimizer(; accel = 50, alpha = 1.9),
|
optimizer = scs_optimizer(; accel = -50, alpha = 1.9),
|
||||||
)
|
)
|
||||||
@test status == JuMP.OPTIMAL
|
@test status == JuMP.OPTIMAL
|
||||||
@test certified
|
@test certified
|
||||||
@ -156,7 +156,7 @@ end
|
|||||||
m, _ = PropertyT.sos_problem_primal(elt, wd)
|
m, _ = PropertyT.sos_problem_primal(elt, wd)
|
||||||
PropertyT.solve(
|
PropertyT.solve(
|
||||||
m,
|
m,
|
||||||
scs_optimizer(; max_iters = 5000, accel = 50, alpha = 1.9),
|
scs_optimizer(; max_iters = 1000, accel = 50, alpha = 1.9),
|
||||||
)
|
)
|
||||||
|
|
||||||
@test JuMP.termination_status(m) in
|
@test JuMP.termination_status(m) in
|
||||||
|
@ -22,11 +22,11 @@
|
|||||||
unit;
|
unit;
|
||||||
upper_bound = ub,
|
upper_bound = ub,
|
||||||
halfradius = 2,
|
halfradius = 2,
|
||||||
optimizer = cosmo_optimizer(;
|
optimizer = scs_optimizer(;
|
||||||
eps = 1e-7,
|
eps = 1e-8,
|
||||||
max_iters = 5_000,
|
max_iters = 20_000,
|
||||||
accel = 50,
|
accel = -50,
|
||||||
alpha = 1.95,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -37,11 +37,11 @@
|
|||||||
m = PropertyT.sos_problem_dual(elt, unit)
|
m = PropertyT.sos_problem_dual(elt, unit)
|
||||||
PropertyT.solve(
|
PropertyT.solve(
|
||||||
m,
|
m,
|
||||||
cosmo_optimizer(;
|
scs_optimizer(;
|
||||||
eps = 1e-7,
|
eps = 1e-8,
|
||||||
max_iters = 10_000,
|
max_iters = 10_000,
|
||||||
accel = 50,
|
accel = -50,
|
||||||
alpha = 1.95,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -73,10 +73,10 @@
|
|||||||
wd;
|
wd;
|
||||||
upper_bound = ub,
|
upper_bound = ub,
|
||||||
halfradius = 2,
|
halfradius = 2,
|
||||||
optimizer = cosmo_optimizer(;
|
optimizer = scs_optimizer(;
|
||||||
eps = 1e-7,
|
eps = 1e-8,
|
||||||
max_iters = 10_000,
|
max_iters = 10_000,
|
||||||
accel = 50,
|
accel = -50,
|
||||||
alpha = 1.9,
|
alpha = 1.9,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user