siconos.kernel.MLCP (Python class)

class siconos.kernel.MLCP(*args)[source]

Bases: siconos.kernel.LinearOSNS

Formalization and Resolution of a Mixed Linear Complementarity Problem (MLCP) Aim of the MLCP class This class is devoted to the formalization and the resolution of the Mixed Linear Complementarity Problem (MLCP) defined by :

\[\begin{split}0 = Au + Cv + a \\ \\ z = Du + Bv + b \\ \\ v \geq 0, z \geq 0, z^{T} v =0\end{split}\]


  • \(u \in R^{n}\) \(v \in R^{m}\) and \(z \in R^{m}\) are the unknowns,
  • \(a \in R^{n}\) and \(b \in R^{m}\)
  • \(A \in R^{n \times n }\)
  • \(B \in R^{m \times m }\)
  • \(C \in R^{n \times m }\)
  • \(D \in R^{m \times n }\)

The MLCP main components are:

  • a problem (variables A,B,C,D,a,b and size of the problem), which directly corresponds to the MixedLinearComplementarityProblem structure of Numerics
  • the unknowns u,v and z

Generated class (swig), based on C++ header Program listing for file kernel/src/simulationTools/MLCP.hpp.


MLCP(int numericsSolverId=SICONOS_MLCP_ENUM)

constructor from data

Parameters:numericsSolverId – id of Numerics solver (optional, SICONOS_MLCP_ENUM the enumerative solver)
compute(double time) → int[source]

Compute the unknown z and w and update the Interaction (y and lambda )

Parameters:time – current time
Returns:int, information about the solver convergence.
computeDiagonalInteractionBlock(InteractionsGraph::VDescriptor vd) → None[source]

compute diagonal Interaction block

Parameters:vd – a vertex descriptor
computeInteractionBlock(InteractionsGraph::EDescriptor ed) → None[source]

compute extra-diagonal interactionBlock-matrix

Parameters:ed – an edge descriptor
computeOptions(Interaction inter1, Interaction inter2) → None[source]

compute equalities/inequalities sizes and set corresponding values in numerics problem

  • inter1 – Interaction used to get a non-smooth law and the constraints sizes.
  • inter2 – another interaction, not used indeed (?)
display() → None[source]

print the data to the screen

getNumericsMLCP() → MixedLinearComplementarityProblem[source]

get the pointer on the Numerics MLCP,

getn() → int[source]

get the number of equality constraints,

initialize(Simulation sim) → None[source]


Parameters:sim – the Simulation
preCompute(double time) → bool[source]

Pre compute.

Parameters:time – current time
reset() → None[source]

Reninitialize numerics driver.

updateInteractionBlocks() → None[source]

Update blocks used to compute M matrix.