class_docstr: A VPSO class, inherited from Optimizer.
  
  This is the designed class to define VPSO-related
  variables and methods.
  
  References:
      W.-P. Yang. Vertical particle swarm optimization algorithm and its application in soft-sensor modeling.
      International Conference on Machine Learning and Cybernetics (2007).
class_docstr_tok: ["A","VPSO","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","VPSO-related","variables","and","methods",".","References",":","W.-P.","Yang",".","Vertical","particle","swarm","optimization","algorithm","and","its","application","in","soft-sensor","modeling",".","International","Conference","on","Machine","Learning","and","Cybernetics","(","2007",")","."]
docstr: Wraps Vertical Particle Swarm Optimization over all agents and variables.
  
  Args:
      space: Space containing agents and update-related information.
docstr_tok: ["Wraps","Vertical","Particle","Swarm","Optimization","over","all","agents","and","variables",".","Args",":","space",":","Space","containing","agents","and","update-related","information","."]
code: def update(self, space: Space) -> None:
      """Wraps Vertical Particle Swarm Optimization over all agents and variables.
  
      Args:
          space: Space containing agents and update-related information.
  
      """
  
      for i, agent in enumerate(space.agents):
          r1 = r.generate_uniform_random_number()
          r2 = r.generate_uniform_random_number()
  
          # Updates current agent velocity (eq. 3)
          self.velocity[i] = (
              self.w * self.velocity[i]
              + self.c1 * r1 * (self.local_position[i] - agent.position)
              + self.c2
              * r2
              * (space.best_agent.position - agent.position)
          )
  
          # Updates current agent vertical velocity (eq. 4)
          self.v_velocity[i] -= (
              np.dot(self.velocity[i].T, self.v_velocity[i])
              / (
                  np.dot(self.velocity[i].T, self.velocity[i])
                  + c.EPSILON
              )
          ) * self.velocity[i]
  
          # Updates current agent position (eq. 5)
          r1 = r.generate_uniform_random_number()
          agent.position += (
              r1 * self.velocity[i] + (1 - r1) * self.v_velocity[i]
          )
  
imports: import copy
  import time
  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.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 5 for calling the VPSO obj's underlying member method code with example usage: obj.update(space) without return types