class_docstr: A JS class, inherited from Optimizer.
  
  This is the designed class to define JS-related
  variables and methods.
  
  References:
      J.-S. Chou and D.-N. Truong. A novel metaheuristic optimizer inspired by behavior of jellyfish in ocean.
      Applied Mathematics and Computation (2020).
class_docstr_tok: ["A","JS","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","JS-related","variables","and","methods",".","References",":","J.-S.","Chou","and","D.-N.","Truong",".","A","novel","metaheuristic","optimizer","inspired","by","behavior","of","jellyfish","in","ocean",".","Applied","Mathematics","and","Computation","(","2020",")","."]
docstr: Calculates the ocean current (eq. 9).
  
  Args:
      agents: List of agents.
      best_agent: Best agent.
  
  Returns:
      (np.ndarray): A trend value for the ocean current.
docstr_tok: ["Calculates","the","ocean","current","(","eq",".","9",")",".","Args",":","agents",":","List","of","agents",".","best_agent",":","Best","agent",".","Returns",":","(","np.ndarray",")",":","A","trend","value","for","the","ocean","current","."]
code: def _ocean_current(
      self, agents: List[Agent], best_agent: Agent
  ) -> np.ndarray:
      """Calculates the ocean current (eq. 9).
  
      Args:
          agents: List of agents.
          best_agent: Best agent.
  
      Returns:
          (np.ndarray): A trend value for the ocean current.
  
      """
  
      r1 = r.generate_uniform_random_number()
      u = np.mean([agent.position for agent in agents])
  
      # Calculates the ocean current (eq. 9)
      trend = best_agent.position - self.beta * r1 * u
  
      return trend
  
imports: from typing import Any, Dict, List, Optional
  import numpy
  import opytimizer.math.random
  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 10 for calling the JS obj's underlying member method code with example usage: obj._ocean_current(agents, best_agent) and returns: trend