class_docstr: An STOA class, inherited from Optimizer.
  
  This is the designed class to define STOA-related
  variables and methods.
  
  References:
      G. Dhiman and A. Kaur. STOA: A bio-inspired based optimization algorithm for industrial engineering problems.
      Engineering Applications of Artificial Intelligence (2019).
class_docstr_tok: ["An","STOA","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","STOA-related","variables","and","methods",".","References",":","G.","Dhiman","and","A.","Kaur",".","STOA",":","A","bio-inspired","based","optimization","algorithm","for","industrial","engineering","problems",".","Engineering","Applications","of","Artificial","Intelligence","(","2019",")","."]
docstr: Wraps Sooty Tern Optimization Algorithm over all agents and variables.
  
  Args:
      space: Space containing agents and update-related information.
      iteration: Current iteration.
      n_iterations: Maximum number of iterations.
docstr_tok: ["Wraps","Sooty","Tern","Optimization","Algorithm","over","all","agents","and","variables",".","Args",":","space",":","Space","containing","agents","and","update-related","information",".","iteration",":","Current","iteration",".","n_iterations",":","Maximum","number","of","iterations","."]
code: def update(
      self, space: Space, iteration: int, n_iterations: int
  ) -> None:
      """Wraps Sooty Tern Optimization Algorithm over all agents and variables.
  
      Args:
          space: Space containing agents and update-related information.
          iteration: Current iteration.
          n_iterations: Maximum number of iterations.
  
      """
  
      # Calculates the movement of search space (eq. 2)
      Sa = self.Cf - (iteration * (self.Cf / n_iterations))
  
      # Calculates the exploration variable (eq. 4)
      Cb = 0.5 * r.generate_uniform_random_number()
  
      for agent in space.agents:
          # Calculates the collision avoidance (eq. 1)
          C = Sa * agent.position
  
          # Calculates the convergence towards the best agent (eq. 3)
          M = Cb * (space.best_agent.position - agent.position)
  
          # Calculates the gap between agent and best agent (eq. 5)
          D = C + M
  
          # Defines the spiral radius (eq. 9)
          k = r.generate_uniform_random_number(0, 2 * np.pi)
          R = self.u * np.exp(k * self.v)
  
          # Calculates the spiral movement (eq. 6, 7 and 8)
          i = r.generate_uniform_random_number(0, k)
          x = R * np.sin(i)
          y = R * np.cos(i)
          z = R * i
  
          # Updates the agent's position (eq. 10)
          agent.position = (D * (x + y + z)) * space.best_agent.position
  
file_path: opytimizer/opytimizer/optimizers/swarm/stoa.py
imports: from typing import Any, Dict, Optional
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 8 for calling the STOA obj's underlying member method code with example usage: obj.update(space, iteration, n_iterations) without return types