Fixed search mode for simulations

This commit is contained in:
Kenneth Jao 2021-09-19 02:56:51 -04:00
parent 3b8d9d34b6
commit 5dd0bfb274

View File

@ -100,9 +100,11 @@ def config_sim(args):
if mode == "flow": if mode == "flow":
sim = Flow(n, w, h, r, energy, thres, step) sim = Flow(n, w, h, r, energy, thres, step)
elif mode == "search": elif mode == "search":
check_params(sim_params, ["manifold_step_size"], {"manifold_step_size": "positive"}) check_params(sim_params, ["manifold_step_size", "eq_stop_count"], {
sim = Search(n, w, h, r, energy, thres, step, sim_params["manifold_step"], "manifold_step_size": "positive", "eq_stop_count": "positive"
sim_params["count"]) })
sim = Search(n, w, h, r, energy, thres, step, sim_params["manifold_step_size"],
sim_params["eq_stop_count"])
elif mode == "shrink": elif mode == "shrink":
check_params(sim_params, ["width_change", "width_stop"], { check_params(sim_params, ["width_change", "width_stop"], {
"width_change": "positive", "width_stop": "positive" "width_change": "positive", "width_stop": "positive"