diff --git a/main.jl b/main.jl index ca8dda8..1495eea 100644 --- a/main.jl +++ b/main.jl @@ -27,37 +27,31 @@ function summarize(groupdir, iterations, tol, upper_bound, radius, G, S) info("Precision: $tol") info("Upper bound: $upper_bound") info("Radius: $radius") +import PropertyT.Settings + info("Threads: $(Threads.nthreads())") info("Workers: $(workers())") info(string(G)) info("with generating set of size $(length(S))") end -function params(Gr::PropertyTGroup) - radius = Gr.args["radius"] - tol = Gr.args["tol"] - iterations = Gr.args["iterations"] - upper_bound = Gr.args["upper-bound"] - warm = Gr.args["warmstart"] - return radius, tol, iterations, upper_bound, warm -end - -function Settings(Gr::PropertyTGroup) - r = Gr.args["radius"] - ub = Gr.args["upper-bound"] - groupdir = "$(PropertyTGroups.name(Gr))_r$r" - - radius, tol, iterations, upper_bound, warm = params(Gr) - +function Settings(Gr::PropertyTGroup, args, solver): + r = get(args, "radius", 2) + gr_name = PropertyTGroups.name(Gr)*"_r$r" G = PropertyTGroups.group(Gr) S = PropertyTGroups.generatingset(Gr) - summarize(groupdir, iterations, tol, upper_bound, radius, G, S) + sol = solver + ub = get(args,"upper_bound", Inf) + tol = get(args,"tol", 1e-10) + ws = get(args, "warmstart", false) - solver = scs_solver(tol, iterations) - - return PropertyT.Settings(groupdir, G, S, radius, - solver, upper_bound, tol, warm) + if get(args, "nosymmetry", false) + autS = PropertyTGroups.autS(Gr) + return PropertyT.Settings(gr_name, G, S, r, sol, ub, tol, ws, autS) + else + return PropertyT.Settings(gr_name, G, S, r, sol, ub, tol, ws) + end end function main(Gr::SymmetrizedGroup)