class_docstr: A TWO class, inherited from Optimizer.
  
  This is the designed class to define TWO-related
  variables and methods.
  
  References:
      A. Kaveh. Tug of War Optimization.
      Advances in Metaheuristic Algorithms for Optimal Design of Structures (2016).
class_docstr_tok: ["A","TWO","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","TWO-related","variables","and","methods",".","References",":","A.","Kaveh",".","Tug","of","War","Optimization",".","Advances","in","Metaheuristic","Algorithms","for","Optimal","Design","of","Structures","(","2016",")","."]
docstr: Performs the constraint handling procedure (eq. 11).
  
  Args:
      agents (list): List of agents.
      best_agent (Agent): Global best agent.
      function: A Function object that will be used as the objective function.
      iteration: Current iteration.
docstr_tok: ["Performs","the","constraint","handling","procedure","(","eq",".","11",")",".","Args",":","agents","(","list",")",":","List","of","agents",".","best_agent","(","Agent",")",":","Global","best","agent",".","function",":","A","Function","object","that","will","be","used","as","the","objective","function",".","iteration",":","Current","iteration","."]
code: def _constraint_handle(
      self,
      agents: List[Agent],
      best_agent: Agent,
      function: Function,
      iteration: int,
  ) -> None:
      """Performs the constraint handling procedure (eq. 11).
  
      Args:
          agents (list): List of agents.
          best_agent (Agent): Global best agent.
          function: A Function object that will be used as the objective function.
          iteration: Current iteration.
  
      """
  
      for agent in agents:
          r1 = r.generate_uniform_random_number()
          if r1 < 0.5:
              r2 = r.generate_gaussian_random_number()
  
              agent.position = best_agent.position + (
                  r2 / iteration
              ) * (best_agent.position - agent.position)
          agent.clip_by_bound()
  
          agent.fit = function(agent.position)
  
imports: import copy
  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 12 for calling the TWO obj's underlying member method code with example usage: obj._constraint_handle(agents, best_agent, function, iteration) without return types