class_docstr: An AOA class, inherited from Optimizer.
  
  This is the designed class to define AOA-related
  variables and methods.
  
  References:
      L. Abualigah et al. The Arithmetic Optimization Algorithm.
      Computer Methods in Applied Mechanics and Engineering (2021).
class_docstr_tok: ["An","AOA","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","AOA-related","variables","and","methods",".","References",":","L.","Abualigah","et","al",".","The","Arithmetic","Optimization","Algorithm",".","Computer","Methods","in","Applied","Mechanics","and","Engineering","(","2021",")","."]
docstr: Wraps Arithmetic 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","Arithmetic","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 Arithmetic 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 math optimizer accelarated coefficient (eq. 2)
      MOA = self.a_min + iteration * (
          (self.a_max - self.a_min) / n_iterations
      )
  
      # Calculates math optimizer probability (eq. 4)
      MOP = 1 - (
          iteration ** (1 / self.alpha)
          / n_iterations ** (1 / self.alpha)
      )
  
      for agent in space.agents:
          for j in range(agent.n_variables):
              search_partition = (
                  agent.ub[j] - agent.lb[j]
              ) * self.mu + agent.lb[j]
  
              r1 = r.generate_uniform_random_number()
              if r1 > MOA:
                  r2 = r.generate_uniform_random_number()
                  if r2 > 0.5:
                      # Updates position with (eq. 3 - top)
                      agent.position[j] = (
                          space.best_agent.position[j]
                          / (MOP + c.EPSILON)
                          * search_partition
                      )
                  else:
                      # Updates position with (eq. 3 - bottom)
                      agent.position[j] = (
                          space.best_agent.position[j]
                          * MOP
                          * search_partition
                      )
              else:
                  r3 = r.generate_uniform_random_number()
                  if r3 > 0.5:
                      # Updates position with (eq. 5 - top)
                      agent.position[j] = (
                          space.best_agent.position[j]
                          - MOP * search_partition
                      )
                  else:
                      # Updates position with (eq. 5 - bottom)
                      agent.position[j] = (
                          space.best_agent.position[j]
                          + MOP * search_partition
                      )
  
file_path: opytimizer/opytimizer/optimizers/misc/aoa.py
imports: from typing import Any, Dict, Optional
  import opytimizer.math.random
  import opytimizer.utils.constant
  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 10 for calling the AOA obj's underlying member method code with example usage: obj.update(space, iteration, n_iterations) without return types