use Allgroups.jl, separate params and summarize functions

This commit is contained in:
kalmarek 2018-08-08 00:26:15 +02:00
parent fd29784a00
commit 52b0e598c6

55
main.jl
View File

@ -3,41 +3,42 @@ using SCS.SCSSolver
# using CSDP # using CSDP
# using SDPA # using SDPA
function main(GROUP, parsed_args) include("groups/Allgroups.jl")
using PropertyTGroups
radius = parsed_args["radius"] struct Symmetrize end
tol = parsed_args["tol"] struct Standard end
iterations = parsed_args["iterations"]
upper_bound = parsed_args["upper-bound"]
warm = parsed_args["warmstart"]
name, N = GROUP.groupname(parsed_args) function summarize(logger, groupdir, iterations, tol, upper_bound, radius, G, S)
G, S = GROUP.generatingset(parsed_args) info(logger, "Group: $groupdir")
if !PARSEDARGS["nosymmetry"]
autS = GROUP.autS(parsed_args)
end
if !PARSEDARGS["nosymmetry"]
name = "o$(name)_r$radius"
else
name = "$(name)_r$radius"
end
isdir(name) || mkdir(name)
logger = PropertyT.setup_logging(joinpath(name, "$(upper_bound)"), :fulllog)
info(logger, "Group: $name")
info(logger, "Iterations: $iterations") info(logger, "Iterations: $iterations")
info(logger, "Precision: $tol") info(logger, "Precision: $tol")
info(logger, "Upper bound: $upper_bound") info(logger, "Upper bound: $upper_bound")
info(logger, "Radius: $radius")
info(logger, "Threads: $(Threads.nthreads())") info(logger, "Threads: $(Threads.nthreads())")
info(logger, "Workers: $(workers())") info(logger, "Workers: $(workers())")
info(logger, G) info(logger, string(G))
info(logger, "with generating set of size $(length(S))") info(logger, "with generating set of size $(length(S))")
if !PARSEDARGS["nosymmetry"] end
info(logger, "Symmetrising with $autS")
end function params(Gr::SymmetricGroup)
radius = Gr.args["radius"]
tol = Gr.args["tol"]
iterations = Gr.args["iterations"]
upper_bound = Gr.args["upper-bound"]
warm = Gr.args["warmstart"]
N = Gr.args["N"]
return radius, tol, iterations, upper_bound, warm, N
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
solver = SCSSolver(eps=tol, max_iters=iterations, linearsolver=SCS.Direct, alpha=1.95, acceleration_lookback=1) solver = SCSSolver(eps=tol, max_iters=iterations, linearsolver=SCS.Direct, alpha=1.95, acceleration_lookback=1)