Class BarrierLogExp

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::BarrierLogExp : public Mechatronix::RegularizedBase

Barrier function class

This class implement a smooth approximation of the ideal barrier class \( b(x) \) where ideal barrier satisfy \( b(x)=\infty \) for \( x<0 \) and \( b(x)=0 \) for \( x>0 \).

../_images/LOG_EXP_BARRIER_0.jpeg

Inizialization

inline explicit BarrierLogExp()
virtual void setup(GenericContainer const &gc) override

Initialize regularization parameters with a GenericContainer. Expect to find gc("h") containing a real scalar.

void setup(real_type h)

Initialize regularization parameter \( h \).

Set the parameter \( h>0 \) for the barrier function.

This parameter is used to define barrier \( b(x) \) in such a way \( b(h)=1 \). Moreover \(b(h)=1\), \(b(0)=\infty\) and \( b(\infty) = 0 \).

inline void update_h(real_type h)

Update regularization parameter \( h \).

Evaluate

virtual real_type operator()(real_type x) const override

../_images/LOG_EXP_BARRIER_0.jpeg

virtual real_type D(real_type x) const override

First derivative of the barrier function

../_images/LOG_EXP_BARRIER_1.jpeg

virtual real_type DD(real_type x) const override

Second derivative of the barrier function

../_images/LOG_EXP_BARRIER_2.jpeg

Info

virtual string info() const override