diff --git a/src/libeq/optimizers/potentiometry.py b/src/libeq/optimizers/potentiometry.py index bfab6e5..44f7781 100644 --- a/src/libeq/optimizers/potentiometry.py +++ b/src/libeq/optimizers/potentiometry.py @@ -14,7 +14,7 @@ from .fitter import levenberg_marquardt -def PotentiometryOptimizer(data: SolverData): +def PotentiometryOptimizer(data: SolverData, reporter=None): def f_obj(c): """ Given the concentrations of the components, calculate the objective function value. @@ -81,7 +81,7 @@ def jacobian(concentration): dcdb = np.squeeze(np.linalg.solve(J, -B)) return fhsel(dcdb[..., np.flatnonzero(beta_flags)]).T - def reporter(*args): + def text_reporter(*args): print(f"iteration n.{args[0]}") print("x", args[1]) print("dx", args[2])