Commit 3712e72e authored by Kento HASEGAWA's avatar Kento HASEGAWA

Remove software resolver in host

parent cf46e101
...@@ -152,7 +152,6 @@ def post(): ...@@ -152,7 +152,6 @@ def post():
pattern = r"judge += +\[(.+?), ([0-9.]+)\]" pattern = r"judge += +\[(.+?), ([0-9.]+)\]"
m = re.match(pattern, nlcheck) m = re.match(pattern, nlcheck)
print(nlcheck, m)
if m and (m.group(1) == "True"): if m and (m.group(1) == "True"):
dat["nlcheck"] = float(m.group(2)) dat["nlcheck"] = float(m.group(2))
else: else:
...@@ -195,22 +194,11 @@ def start(): ...@@ -195,22 +194,11 @@ def start():
qstr = "\n".join(_q_lines) qstr = "\n".join(_q_lines)
qnumber = _question_name.replace(".txt", "").replace("NL_Q", "")
probpath = "{}/{}".format(app_args["question"], _question_name)
tmppath = "{}/T03_A{}_tmp.txt".format(app_args["out"], qnumber)
outpath = "{}/T03_A{}.txt".format(app_args["out"], qnumber)
res = {} res = {}
if line_num >= 0: if line_num >= 0:
# LINE_NUMが閾値未満のとき,PYNQに問題を配信して問題を解かせる # LINE_NUMが閾値未満のとき,PYNQに問題を配信して問題を解かせる
res = solve_questions(_question_name, qstr) res = solve_questions(_question_name, qstr)
# 整形ルーティング (再配線) する
#cmd = "/home/pi/pynq-router/resolver/solver --reroute --output {} {} {}".format(outpath, probpath, tmppath)
cmd = "/home/pi/adc2017/pynq-router/resolver/solver --reroute --output {} {} {}".format(outpath, probpath, tmppath)
print("`{}`".format(cmd))
subprocess.call(cmd.strip().split(" "))
# 最終結果だけを保存 # 最終結果だけを保存
questions[_question_name]["status"] = res["status"] questions[_question_name]["status"] = res["status"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment