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