# NCP_Solvers (functions)¶

siconos.numerics.ncp_compute_error(int n, array_like (np.float64, 1D)z, array_like (np.float64, 1D)F, double tol, array_like (np.float64, 1D)err) → int[source]

This function compute the complementarity error of the NCP: $$0 \leq z \perp F(z) \geq 0$$.

Parameters: n – size of the vectors z – solution F – value of the function at the solution tol – tolerance for the error err – value of the error 0 if the solution is good enough, 1 otherwise

siconos.numerics.ncp_newton_FBLSA(NonlinearComplementarityProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)F, int *info, SolverOptions *options) → None[source]

NCP Solver using the FB merit function and a Newton-based method with line- search.

Parameters: problem – the formalization of the NCP problem z – on input, initial guess; on output the solution F – the value of the function at the solution info – 0 if everything worked options – struct used to specify the solver parameters

siconos.numerics.ncp_newton_minFBLSA(NonlinearComplementarityProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)F, int *info, SolverOptions *options) → None[source]

NCP Solver using the min merit function (+ the FB as backup) and a Newton-based method with line-search.

Parameters: problem – the formalization of the NCP problem z – on input, initial guess; on output the solution F – the value of the function at the solution info – 0 if everything worked options – struct used to specify the solver parameters

siconos.numerics.ncp_path(NonlinearComplementarityProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)F, int *info, SolverOptions *options) → None[source]

NCP Solver using the PATH solver.

Parameters: problem – the formalization of the NCP problem z – on input, initial guess; on output the solution F – the value of the function at the solution info – 0 if everything worked options – struct used to specify the solver parameters

siconos.numerics.ncp_pathsearch(NonlinearComplementarityProblem *problem, array_like (np.float64, 1D)z, array_like (np.float64, 1D)F, int *info, SolverOptions *options) → None[source]

NCP Solver using a path search algorithm, following the work of D.

Ralph. M. Ferris, and many other collaborators of the latter.

Parameters: problem – the formalization of the NCP problem z – on input, initial guess; on output the solution F – the value of the function at the solution info – 0 if everything worked options – struct used to specify the solver parameters