pypsa.pf.newton_raphson_sparse

pypsa.pf.newton_raphson_sparse#

pypsa.pf.newton_raphson_sparse(f, guess, dfdx, x_tol=1e-10, lim_iter=100, distribute_slack=False, slack_weights=None)#

Solve f(x) = 0 with initial guess for x and dfdx(x).

dfdx(x) should return a sparse Jacobian. Terminate if error on norm of f(x) is < x_tol or there were more than lim_iter iterations.