def beta_mix(x, t, g, obj_num=2):
    """This function is used to calculate the mixed unimodal and multi-modal
    beta function. Input are the decision variable (x), time (t) and g function
    (g).
    """
    beta = [0.0] * obj_num
    k = int(abs(5.0 * (int(DELTA_STATE * int(t) / 5.0) % 2) - (DELTA_STATE * int(t) % 5)))

    for i in range(obj_num - 1, len(x)):
        temp = 1.0 + (x[i] - g(x, t)) * (x[i] - g(x, t)) - np.cos(2 * np.pi * k * (x[i] - g(x, t)))
        beta[(i + 1) % obj_num] += temp
    beta = [(2.0 / int(len(LOWER_BOUND) / obj_num)) * b for b in beta]
    return beta
This function is used to calculate the mixed unimodal and multi-modal
    beta function. Input are the decision variable (x), time (t) and g function
    (g).
    
pymoo/vendor/gta.py