# siconos.kernel.NormalConeNSL (Python class)¶

class siconos.kernel.NormalConeNSL(size: unsigned int, H: SP::SimpleMatrix, K: SP::SiconosVector)[source]

Bases: siconos.kernel.NonSmoothLaw

NormalCone NonSmoothLaw.

This class formalizes a nonsmooth law in the form of a normal cone inclusion i.e.

$y \in \mathcal{N}_{-P}(-\lambda),$

where $$P$$ is the polytopic set. This is a generalization of the RelayNSL law, where the set $$P$$ is a scaled box. Note that there exists an inverse of the previous relation in the form

$-\lambda \in \partial \sigma_{-P} (y),$

with $$\sigma_{-P}$$ the support function of $$-P$$ and $$\partial \sigma_{-P}$$ the subdifferential of this support function.

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

Constructors

NormalConeNSL(size, array_like (np.float64, 2D) H, array_like (np.float64, 1D) K)

constructor with the value of the NormalConeNSL attributes

Parameters: size – size of the NonSmoothLaw H – matrix in the (H-K)-representation of the polytope P K – vector in the (H-K)-representation of the polytope P
H() -> array_like (np.float64, 2D)[source]

get H

Returns: a reference to the H matrix
K() -> array_like (np.float64, 1D)[source]

get K

Returns: a reference to the K vector
display() → None[source]

print the data to the screen

isVerified() → bool[source]

check the ns law to see if it is verified

Returns: true if the NS Law is verified, false otherwise