class_docstr: A QSA class, inherited from Optimizer.
  
  This is the designed class to define QSA-related
  variables and methods.
  
  References:
      J. Zhang et al. Queuing search algorithm: A novel metaheuristic algorithm
      for solving engineering optimization problems.
      Applied Mathematical Modelling (2018).
class_docstr_tok: ["A","QSA","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","QSA-related","variables","and","methods",".","References",":","J.","Zhang","et","al",".","Queuing","search","algorithm",":","A","novel","metaheuristic","algorithm","for","solving","engineering","optimization","problems",".","Applied","Mathematical","Modelling","(","2018",")","."]
docstr: Calculates the number of agents that belongs to each queue.
  
  Args:
      n_agents: Number of agents.
      t_1: Fitness value of first agent in the population.
      t_2: Fitness value of second agent in the population.
      t_3: Fitness value of third agent in the population.
  
  Returns:
      (Tuple[int, int, int]): The number of agents in first, second and third queues.
docstr_tok: ["Calculates","the","number","of","agents","that","belongs","to","each","queue",".","Args",":","n_agents",":","Number","of","agents",".","t_1",":","Fitness","value","of","first","agent","in","the","population",".","t_2",":","Fitness","value","of","second","agent","in","the","population",".","t_3",":","Fitness","value","of","third","agent","in","the","population",".","Returns",":","(","Tuple","[","int",",","int",",","int","]",")",":","The","number","of","agents","in","first",",","second","and","third","queues","."]
code: def _calculate_queue(
      self, n_agents: int, t_1: float, t_2: float, t_3: float
  ) -> Tuple[int, int, int]:
      """Calculates the number of agents that belongs to each queue.
  
      Args:
          n_agents: Number of agents.
          t_1: Fitness value of first agent in the population.
          t_2: Fitness value of second agent in the population.
          t_3: Fitness value of third agent in the population.
  
      Returns:
          (Tuple[int, int, int]): The number of agents in first, second and third queues.
  
      """
  
      if t_1 > c.EPSILON:
          n_1 = (1 / t_1) / ((1 / t_1) + (1 / t_2) + (1 / t_3))
          n_2 = (1 / t_2) / ((1 / t_1) + (1 / t_2) + (1 / t_3))
          n_3 = (1 / t_3) / ((1 / t_1) + (1 / t_2) + (1 / t_3))
      else:
          n_1 = 1 / 3
          n_2 = 1 / 3
          n_3 = 1 / 3
  
      q_1 = int(n_1 * n_agents)
      q_2 = int(n_2 * n_agents)
      q_3 = int(n_3 * n_agents)
  
      return q_1, q_2, q_3
  
file_path: opytimizer/opytimizer/optimizers/social/qsa.py
imports: import copy
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.constant
  from opytimizer.core import Optimizer
  from opytimizer.core.agent import Agent
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 2 for calling the QSA obj's underlying member method code with example usage: obj._calculate_queue(n_agents, t_1, t_2, t_3) and returns: q_1,  q_2,  q_3