File kernel/src/simulationTools/Relay.hpp#
Go to the source code of this file
Linear Complementarity Problem formulation and solving.
-
class Relay : public LinearOSNS
- #include <Relay.hpp>
Formalization and Resolution of a Linear Complementarity Problem (Relay)
This class is devoted to the formalization and the resolution of the Relay NonSmooth problems.
\[ w = q + M z \]\[ w \geq 0, z \geq 0, z^{T} w =0 \]where\( w \in R^{n} \) and \( z \in R^{n} \) are the unknowns,
\( M \in R^{n \times n } \) and \( q \in R^{n} \)
- Todo:
: add “recover” function to start from old values of z and w.
: review this introduction …
Public Functions
-
Relay(int numericsSolverId = SICONOS_RELAY_AVI_CAOFERRIS)
constructor from numerics solver id
- Parameters:
numericsSolverId – id of numerics solver, default = SICONOS_RELAY_AVI_CAOFERRIS
-
Relay(SP::SolverOptions options)
constructor from a pre-defined solver options set
- Parameters:
options – the options set
-
inline ~Relay()
destructor
-
inline const SiconosVector &getLb() const
get the value of lb, the lower bounds of the Relay system
- Returns:
the vector of lower bounds
-
inline SP::SiconosVector lb() const
get lb, the lower bounds of the Relay system
- Returns:
the vector of lower bounds
-
inline void setLb(SP::SiconosVector newLb)
set lb to pointer newPtr
- Parameters:
newLb – new lower bound
-
inline const SiconosVector &getUb() const
get the value of ub, the upper bounds of the Relay system
- Returns:
the vector of upper bounds
-
inline SP::SiconosVector ub() const
get lb, the lower bounds of the Relay system
- Returns:
the vector of upper bounds
-
inline void setUb(SP::SiconosVector newUb)
set ub to pointer newPtr
- Parameters:
newUb – new upper bound
-
virtual void initialize(SP::Simulation sim)
To initialize the LinearOSNS problem(computes topology …)
- Parameters:
sim – the simulation owning this OSNSPB
-
virtual int compute(double time)
Compute the unknown z and w and update the Interaction (y and lambda )
- Parameters:
time – current time
- Returns:
information about the solver convergence.
-
virtual bool checkCompatibleNSLaw(NonSmoothLaw &nslaw)
Check the compatibility fol the nslaw with the targeted OSNSP.
-
virtual void display() const
print the data to the screen
Protected Attributes
Friends
- friend struct _BoundsNSLEffect