class_docstr: A PIO class, inherited from Optimizer.
  
  This is the designed class to define PIO-related
  variables and methods.
  
  References:
      H. Duan and P. Qiao.
      Pigeon-inspired optimization:a new swarm intelligence optimizerfor air robot path planning.
      International Journal of IntelligentComputing and Cybernetics (2014).
class_docstr_tok: ["A","PIO","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","PIO-related","variables","and","methods",".","References",":","H.","Duan","and","P.","Qiao",".","Pigeon-inspired","optimization",":","a","new","swarm","intelligence","optimizerfor","air","robot","path","planning",".","International","Journal","of","IntelligentComputing","and","Cybernetics","(","2014",")","."]
docstr: Calculates the center position (eq. 8).
  
  Args:
      agents: List of agents.
  
  Returns:
      (np.ndarray): The center position.
docstr_tok: ["Calculates","the","center","position","(","eq",".","8",")",".","Args",":","agents",":","List","of","agents",".","Returns",":","(","np.ndarray",")",":","The","center","position","."]
code: def _calculate_center(self, agents: List[Agent]) -> np.ndarray:
      """Calculates the center position (eq. 8).
  
      Args:
          agents: List of agents.
  
      Returns:
          (np.ndarray): The center position.
  
      """
  
      total_pos = np.zeros(
          (agents[0].n_variables, agents[0].n_dimensions)
      )
      total_fit = 0.0
  
      for agent in agents:
          total_pos += agent.position * agent.fit
          total_fit += agent.fit
  
      center = total_pos / (self.n_p * total_fit + c.EPSILON)
  
      return center
  
imports: from typing import Any, Dict, List, Optional
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.constant
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.agent import Agent
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 13 for calling the PIO obj's underlying member method code with example usage: obj._calculate_center(agents) and returns: center