def _business_two(self, agents, function):
    'Performs the second 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))
    (A_1, A_2, A_3) = (copy.deepcopy(agents[0]), copy.deepcopy(agents[1]), copy.deepcopy(agents[2]))
    (q_1, q_2, _) = self._calculate_queue(len(agents), A_1.fit, A_2.fit, A_3.fit)
    pr = [(i / len(agents)) for i in range(1, (len(agents) + 1))]
    cv = (A_1.fit / ((A_2.fit + A_3.fit) + c.EPSILON))
    for (i, agent) in enumerate(agents):
        a = copy.deepcopy(agent)
        if (i < q_1):
            A = copy.deepcopy(A_1)
        elif (q_1 <= i < (q_1 + q_2)):
            A = copy.deepcopy(A_2)
        else:
            A = copy.deepcopy(A_3)
        r1 = r.generate_uniform_random_number()
        if (r1 < pr[i]):
            (A_1, A_2) = np.random.choice(agents, 2, replace=False)
            r2 = r.generate_uniform_random_number()
            e = r.generate_gamma_random_number(1, 0.5, 1)
            if (r2 < cv):
                F_1 = (e * (A_1.position - A_2.position))
                a.position += F_1
            else:
                F_2 = (e * (A.position - A_1.position))
                a.position += F_2
            a.fit = function(a.position)
            if (a.fit < agent.fit):
                agent.position = copy.deepcopy(a.position)
                agent.fit = copy.deepcopy(a.fit)
Performs the second business phase.

Args:
    agents (list): List of agents.
    function (Function): A Function object that will be used as the objective function.
def _business_two(self, agents, function):
    'Performs the second 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))
    (A_1, A_2, A_3) = (copy.deepcopy(agents[0]), copy.deepcopy(agents[1]), copy.deepcopy(agents[2]))
    (q_1, q_2, _) = self._calculate_queue(len(agents), A_1.fit, A_2.fit, A_3.fit)
    pr = [(i / len(agents)) for i in range(1, (len(agents) + 1))]
    cv = (A_1.fit / ((A_2.fit + A_3.fit) + c.EPSILON))
    for (i, agent) in enumerate(agents):
        a = copy.deepcopy(agent)
        if (i < q_1):
            A = copy.deepcopy(A_1)
        elif (q_1 <= i < (q_1 + q_2)):
            A = copy.deepcopy(A_2)
        else:
            A = copy.deepcopy(A_3)
        r1 = r.generate_uniform_random_number()
        if (r1 < pr[i]):
            (A_1, A_2) = np.random.choice(agents, 2, replace=False)
            r2 = r.generate_uniform_random_number()
            e = r.generate_gamma_random_number(1, 0.5, 1)
            if (r2 < cv):
                F_1 = (e * (A_1.position - A_2.position))
                a.position += F_1
            else:
                F_2 = (e * (A.position - A_1.position))
                a.position += F_2
            a.fit = function(a.position)
            if (a.fit < agent.fit):
                agent.position = copy.deepcopy(a.position)
                agent.fit = copy.deepcopy(a.fit)