class_docstr: A BPSO class, inherited from Optimizer.
  
  This is the designed class to define boolean PSO-related
  variables and methods.
  
  References:
      F. Afshinmanesh, A. Marandi and A. Rahimi-Kian.
      A Novel Binary Particle Swarm Optimization Method Using Artificial Immune System.
      IEEE International Conference on Smart Technologies (2005).
class_docstr_tok: ["A","BPSO","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","boolean","PSO-related","variables","and","methods",".","References",":","F.","Afshinmanesh",",","A.","Marandi","and","A.","Rahimi-Kian",".","A","Novel","Binary","Particle","Swarm","Optimization","Method","Using","Artificial","Immune","System",".","IEEE","International","Conference","on","Smart","Technologies","(","2005",")","."]
docstr: Compiles additional information that is used by this optimizer.
  
  Args:
      space: A Space object containing meta-information.
docstr_tok: ["Compiles","additional","information","that","is","used","by","this","optimizer",".","Args",":","space",":","A","Space","object","containing","meta-information","."]
code: def compile(self, space: Space) -> None:
      """Compiles additional information that is used by this optimizer.
  
      Args:
          space: A Space object containing meta-information.
  
      """
  
      self.local_position = np.zeros(
          (space.n_agents, space.n_variables, space.n_dimensions),
          dtype=bool,
      )
      self.velocity = np.zeros(
          (space.n_agents, space.n_variables, space.n_dimensions),
          dtype=bool,
      )
  
imports: import copy
  import time
  from typing import Any, Dict, Optional
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 10 for calling the BPSO obj's underlying member method code with example usage: obj.compile(space) without return types