create Property.Settings from PropertyTGroup and args
This commit is contained in:
parent
1b6793f37c
commit
1b45625a71
36
main.jl
36
main.jl
@ -27,37 +27,31 @@ function summarize(groupdir, iterations, tol, upper_bound, radius, G, S)
|
|||||||
info("Precision: $tol")
|
info("Precision: $tol")
|
||||||
info("Upper bound: $upper_bound")
|
info("Upper bound: $upper_bound")
|
||||||
info("Radius: $radius")
|
info("Radius: $radius")
|
||||||
|
import PropertyT.Settings
|
||||||
|
|
||||||
info("Threads: $(Threads.nthreads())")
|
info("Threads: $(Threads.nthreads())")
|
||||||
info("Workers: $(workers())")
|
info("Workers: $(workers())")
|
||||||
info(string(G))
|
info(string(G))
|
||||||
info("with generating set of size $(length(S))")
|
info("with generating set of size $(length(S))")
|
||||||
end
|
end
|
||||||
|
|
||||||
function params(Gr::PropertyTGroup)
|
function Settings(Gr::PropertyTGroup, args, solver):
|
||||||
radius = Gr.args["radius"]
|
r = get(args, "radius", 2)
|
||||||
tol = Gr.args["tol"]
|
gr_name = PropertyTGroups.name(Gr)*"_r$r"
|
||||||
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)
|
|
||||||
|
|
||||||
G = PropertyTGroups.group(Gr)
|
G = PropertyTGroups.group(Gr)
|
||||||
S = PropertyTGroups.generatingset(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)
|
if get(args, "nosymmetry", false)
|
||||||
|
autS = PropertyTGroups.autS(Gr)
|
||||||
return PropertyT.Settings(groupdir, G, S, radius,
|
return PropertyT.Settings(gr_name, G, S, r, sol, ub, tol, ws, autS)
|
||||||
solver, upper_bound, tol, warm)
|
else
|
||||||
|
return PropertyT.Settings(gr_name, G, S, r, sol, ub, tol, ws)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function main(Gr::SymmetrizedGroup)
|
function main(Gr::SymmetrizedGroup)
|
||||||
|
Loading…
Reference in New Issue
Block a user