File kernel/src/simulationTools/MLCP.hpp#
Go to the source code of this file
Linear Complementarity Problem formulation and solving.
Defines
-
MLCP_NB_BLOCKS_MAX#
-
class MLCP : public LinearOSNS
- #include <MLCP.hpp>
Formalization and Resolution of a Mixed Linear Complementarity Problem (MLCP)
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}\]where
\( 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
Subclassed by MLCPProjectOnConstraints
Public Functions
-
MLCP(int numericsSolverId = SICONOS_MLCP_ENUM)
constructor from data
- Parameters:
numericsSolverId – id of Numerics solver (optional, default = SICONOS_MLCP_ENUM the enumerative solver)
-
MLCP(SP::SolverOptions options)
constructor from a pre-defined solver options set
- Parameters:
options – the options set
-
inline virtual ~MLCP()
destructor
-
virtual void computeOptions(SP::Interaction inter1, SP::Interaction inter2)
compute equalities/inequalities sizes and set corresponding values in numerics problem
- Parameters:
inter1 – Interaction used to get a non-smooth law and the constraints sizes.
inter2 – another interaction, not used indeed (?)
-
virtual void updateInteractionBlocks() override
Update blocks used to compute M matrix.
-
inline int getn() const
get the number of equality constraints,
- Returns:
int
-
inline SP::MixedLinearComplementarityProblem getNumericsMLCP()
get the pointer on the Numerics MLCP,
- Returns:
SP::MixedLinearComplementarityProblem
-
virtual void reset()
Reninitialize numerics driver.
-
virtual void computeInteractionBlock(const InteractionsGraph::EDescriptor &ed) override
compute extra-diagonal interactionBlock-matrix
- Parameters:
ed – an edge descriptor
-
virtual void computeDiagonalInteractionBlock(const InteractionsGraph::VDescriptor &vd) override
compute diagonal Interaction block
- Parameters:
vd – a vertex descriptor
-
virtual int compute(double time) override
Compute the unknown z and w and update the Interaction (y and lambda )
- Parameters:
time – current time
- Returns:
int, information about the solver convergence.
-
int solve()
Call numerics solver.
- Returns:
int information about the solver convergence (output from numerics driver, mixedlinearComplementarity_driver, check numerics doc. for details).
-
virtual void display() const override
print the data to the screen
-
virtual bool checkCompatibleNSLaw(NonSmoothLaw &nslaw) override
Check the compatibility fol the nslaw with the targeted OSNSP.
-
ACCEPT_STD_VISITORS()#