def beta_uni(x, t, g, obj_num=2):
    """This function is used to calculate the unimodal beta function. Input are
    the decision variable (x), time (t) and g function (g).
    """
    beta = [0.0] * obj_num
    for i in range(obj_num - 1, len(x)):
        beta[(i + 1) % obj_num] += (x[i] - g(x, t)) * (x[i] - g(x, t))

    beta = [(2.0 / int(len(LOWER_BOUND) / obj_num)) * b for b in beta]
    return beta
This function is used to calculate the unimodal beta function. Input are
    the decision variable (x), time (t) and g function (g).
    
pymoo/vendor/gta.py