Commit e4e98846 authored by Artem Pulkin's avatar Artem Pulkin
Browse files

minimize: accept string methods in openmx

parent b72c9804
Pipeline #87039 failed with stages
in 14 minutes and 13 seconds
......@@ -355,11 +355,19 @@ def minimize_openmx(f, x0, jac, qn_method=None, qn_kwargs=None, sd_method=None,
if qn_method is None:
qn_method = minimize_ase
qn_kwargs = {"method": "BFGSLineSearch", **qn_kwargs}
elif qn_method == "ase":
qn_method = minimize_ase
elif qn_method == "scipy":
qn_method = minimize_scipy
sd_kwargs = {"fun_budget": sd_steps, **kwargs, **sd_kwargs}
if sd_method is None:
sd_method = minimize_ase
sd_kwargs = {"method": "FIRE", **sd_kwargs}
elif sd_method == "ase":
sd_method = minimize_ase
elif sd_method == "scipy":
sd_method = minimize_scipy
if stability_checker is None:
stability_checker = descending_trend(10)
......
Supports Markdown
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