Interface of Mechatronix

Penalty/Barrier functions

There are many types of penalties and barrier functions in XOptima, they are described here in detail. For a general purpose penalty that works most of the times, use the cosine-logarithmic penalty (see Figure The plot of the cosine logarithmic barrier with the parameters discussed in the example. and Section U_COS_LOGARITHMIC).

To have an idea of what this penalty does, consider for simplicity the interval \(I=(a,b)\). Penalty and barrier are functions that smoothly approximates the characteristic function \(\chi_I(x)\) that is identically zero inside \(I\) and infinity outside \(I\). The problem is that the discontinuity cannot be treated numerically in the convergence process. Hence it is convenient to find a smooth function that approximates the discontinuity. The difference between a barrier and a penalty is that a barrier function is a smooth function which takes the value infinity outside the interval \(I\), while a penalty function is defined in the whole space and is fastly growing outside the interval \(I\).