import json
from eng import *
KW = dict(solbtc_froth=0.20, breadth=0.25)
V = [(54, "fast 14/7 (with 35 filters)", dict(KW, nin=14, nout=7)),
     (55, "fast 10/5", dict(KW, nin=10, nout=5)),
     (56, "fast 7/4", dict(KW, nin=7, nout=4)),
     (57, "fast 10/7", dict(KW, nin=10, nout=7)),
     (58, "fast 14/7, no half", dict(KW, nin=14, nout=7, half=None))]
R = {}
for i, nm, kw in V:
    r = evaluate(**kw); R[i] = dict(name=nm, kw=kw, **{k: v for k, v in r.items() if k != 'trades'})
    print("%2d %s" % (i, line(nm, r)), " sol", r['sol']['n'], r['sol']['pf'], "other", r['other']['n'], r['other']['pf'], flush=True)
json.dump(R, open('res_d.json', 'w'))
