mirror of
https://github.com/kalmarek/SmallHyperbolic
synced 2024-11-27 16:35:26 +01:00
allow to choose optimizer at top level
This commit is contained in:
parent
ba58bd60c8
commit
e3addcae0f
@ -23,12 +23,13 @@ include(joinpath("src", "utils.jl"))
|
|||||||
|
|
||||||
const HALFRADIUS = 3
|
const HALFRADIUS = 3
|
||||||
using SCS
|
using SCS
|
||||||
with_SCS() = with_optimizer(SCS.Optimizer,
|
|
||||||
|
with_SCS(iters=30_000, acceleration=10) = with_optimizer(SCS.Optimizer,
|
||||||
linear_solver=SCS.Direct,
|
linear_solver=SCS.Direct,
|
||||||
max_iters=100_000,
|
max_iters=iters,
|
||||||
eps=1e-9,
|
eps=1e-9,
|
||||||
alpha=1.5,
|
alpha=(acceleration == 0 ? 1.95 : 1.5),
|
||||||
acceleration_lookback=10,
|
acceleration_lookback=acceleration,
|
||||||
warm_start=true)
|
warm_start=true)
|
||||||
|
|
||||||
groups = parse_grouppresentations("data/presentations_4_4_4.txt")
|
groups = parse_grouppresentations("data/presentations_4_4_4.txt")
|
||||||
@ -36,6 +37,8 @@ groups = parse_grouppresentations("data/presentations_3_3_4.txt")
|
|||||||
|
|
||||||
for (group_name, G) in groups
|
for (group_name, G) in groups
|
||||||
@info "" group_name
|
@info "" group_name
|
||||||
check_propertyT(G, "log/$(group_name)_r$HALFRADIUS",
|
|
||||||
HALFRADIUS, Inf, AutomaticStructure)
|
check_propertyT(groups[group_name], "log/$(group_name)_r$HALFRADIUS",
|
||||||
|
HALFRADIUS, Inf, AutomaticStructure, with_SCS(50_000, 50))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
function check_propertyT(G::FPGroup, name::AbstractString,
|
function check_propertyT(G::FPGroup, name::AbstractString,
|
||||||
halfradius::Integer=2, upper_bound=Inf, reduction=KnuthBendix; kwargs...)
|
halfradius::Integer=2, upper_bound=Inf, reduction=KnuthBendix, with_optimizer=with_SCS(), kwargs...)
|
||||||
|
|
||||||
@info "GAP code defining group:\n $(GAP_code(G))"
|
@info "GAP code defining group:\n $(GAP_code(G))"
|
||||||
S = gens(G)
|
S = gens(G)
|
||||||
S = unique([S; inv.(S)])
|
S = unique([S; inv.(S)])
|
||||||
|
|
||||||
sett = PropertyT.Settings(name, G, S, with_SCS();
|
sett = PropertyT.Settings(name, G, S, with_optimizer;
|
||||||
halfradius=halfradius, upper_bound=upper_bound, force_compute=true)
|
halfradius=halfradius, upper_bound=upper_bound, force_compute=true)
|
||||||
|
|
||||||
fp = PropertyT.fullpath(sett)
|
fp = PropertyT.fullpath(sett)
|
||||||
|
Loading…
Reference in New Issue
Block a user