GroupsWithPropertyT/main.jl
2018-07-31 12:41:48 +02:00

61 lines
1.8 KiB
Julia

using SCS.SCSSolver
# using Mosek
# using CSDP
# using SDPA
function main(GROUP, parsed_args)
radius = parsed_args["radius"]
tol = parsed_args["tol"]
iterations = parsed_args["iterations"]
upper_bound = parsed_args["upper-bound"]
warm = parsed_args["warmstart"]
name, N = GROUP.groupname(parsed_args)
G, S = GROUP.generatingset(parsed_args)
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, "Precision: $tol")
info(logger, "Upper bound: $upper_bound")
info(logger, "Threads: $(Threads.nthreads())")
info(logger, "Workers: $(workers())")
info(logger, G)
info(logger, "with generating set of size $(length(S))")
if !PARSEDARGS["nosymmetry"]
info(logger, "Symmetrising with $autS")
end
solver = SCSSolver(eps=tol, max_iters=iterations, linearsolver=SCS.Direct, alpha=1.95, acceleration_lookback=1)
# solver = Mosek.MosekSolver(
# MSK_DPAR_INTPNT_CO_TOL_REL_GAP=tol,
# MSK_IPAR_INTPNT_MAX_ITERATIONS=iterations,
# QUIET=false)
# solver = CSDP.CSDPSolver(axtol=tol, atytol=tol, objtol=tol, minstepp=tol*10.0^-1, minstepd=tol*10.0^-1)
# solver = SDPA.SDPASolver(epsilonStar=tol, epsilonDash=tol)
if !PARSEDARGS["nosymmetry"]
sett = Settings(name, N, G, S, autS, radius, solver, upper_bound, tol, warm, logger)
return PropertyT.check_property_T(sett)
else
return PropertyT.check_property_T(name, S, G(), solver, upper_bound, tol, radius, warm)
end
end