# siconos.numerics.MCP (Python class)¶

class siconos.numerics.MCP(*args)[source]

Bases: object

The structure that defines a Mixed Complementarity problem (MCP) : find two vectors $$(z,w \in {{\mathrm{I\!R}}}^{n+m})$$ such that:

w &= begin{pmatrix}w_e\w_iend{pmatrix} = F(z) w_e &=0 \ 0 &le w_i perp z_i ge 0

where “i” (resp. “e”) stands for inequalities (resp. equalities). The vector $$z$$ is splitted like $$w$$:

z =begin{pmatrix}z_e\z_iend{pmatrix}

$$z_i,w_i$$ are vectors of size sizeEqualities, $$z_e,w_e$$ vectors of size sizeInequalities

and $$F$$ is a non linear function that must be user-defined.

Generated class (swig), based on C++ header Program listing for file numerics/src/MCP/MixedComplementarityProblem.h.

Attributes: computeFmcp (ptrFunctionMCP) – pointer to the function to compute F(z) computeNablaFmcp (ptrFunctionMCP) Fmcp (array_like (np.float64, 1D)) – pointer to the function to compute the jacobian of F(z) The value F(z) nablaFmcp (array_like (np.float64, 1D)) – jacobian of F(z) sizeEqualities (int) – size of equalities $z_e, w_e$ size sizeInequalities (int) – size of inequalities $z_i,w_i$ size