Helper function used in penalized test functions (F12, F13). This function applies a penalty when variable values exceed specified bounds.
Ufun(x, a, k, m)Numeric vector of penalty values (same length as x).
Numeric vector of input values to penalize.
Threshold value. Penalty is applied when \(|x_i| > a\).
Penalty coefficient controlling the penalty magnitude.
Exponent for the penalty term.
Formula: $$u(x_i, a, k, m) = \begin{cases} k(x_i - a)^m & \text{if } x_i > a \\ 0 & \text{if } -a \leq x_i \leq a \\ k(-x_i - a)^m & \text{if } x_i < -a \end{cases}$$
The penalty function is zero within the interval \([-a, a]\) and grows polynomially outside this region. This is used to softly constrain optimization to a bounded region without hard constraints.
F12, F13 for functions that use this helper.