def _business_three(self, agents, function):
    'Performs the third business phase.\n\n        Args:\n            agents (list): List of agents.\n            function (Function): A Function object that will be used as the objective function.\n\n        '
    agents.sort(key=(lambda x: x.fit))
    pr = [(i / len(agents)) for i in range(1, (len(agents) + 1))]
    for (i, agent) in enumerate(agents):
        a = copy.deepcopy(agent)
        for j in range(agent.n_variables):
            r1 = r.generate_uniform_random_number()
            if (r1 < pr[i]):
                (A_1, A_2) = np.random.choice(agents, 2, replace=False)
                e = r.generate_gamma_random_number(1, 0.5, 1)
                a.position[j] = (A_1.position[j] + (e * (A_2.position[j] - a.position[j])))
            a.fit = function(a.position)
            if (a.fit < agent.fit):
                agent.position = copy.deepcopy(a.position)
                agent.fit = copy.deepcopy(a.fit)
Performs the third business phase.

Args:
    agents (list): List of agents.
    function (Function): A Function object that will be used as the objective function.
def _business_three(self, agents, function):
    'Performs the third business phase.\n\n        Args:\n            agents (list): List of agents.\n            function (Function): A Function object that will be used as the objective function.\n\n        '
    agents.sort(key=(lambda x: x.fit))
    pr = [(i / len(agents)) for i in range(1, (len(agents) + 1))]
    for (i, agent) in enumerate(agents):
        a = copy.deepcopy(agent)
        for j in range(agent.n_variables):
            r1 = r.generate_uniform_random_number()
            if (r1 < pr[i]):
                (A_1, A_2) = np.random.choice(agents, 2, replace=False)
                e = r.generate_gamma_random_number(1, 0.5, 1)
                a.position[j] = (A_1.position[j] + (e * (A_2.position[j] - a.position[j])))
            a.fit = function(a.position)
            if (a.fit < agent.fit):
                agent.position = copy.deepcopy(a.position)
                agent.fit = copy.deepcopy(a.fit)