parameters: (
          self,
          gen=100,
          minW=0.4,
          maxW=1.0,
          C1=2.0,
          C2=2.0,
          CHI=1.0,
          v_coeff=0.5,
          leader_selection_range=5,
          diversity_mechanism='crowding distance')
docstring: Constructs a Multi Objective PSO
  
      USAGE: algorithm.nspso(self, gen=10, minW = 0.4, maxW = 1.0, C1 = 2.0, C2 = 2.0,
              CHI = 1.0, v_coeff = 0.5, leader_selection = 5, diversity_mechanism = 'crowding_distance'):
  
      * gen: number of generations
      * minW: minimum particles' inertia weight (the inertia weight is decreased troughout the run between maxW and minW)
      * maxW: maximum particles' inertia weight (the inertia weight is decreased troughout the run between maxW and minW)
      * C1: magnitude of the force, applied to the particle's velocity, in the direction of its previous best position
      * C2: magnitude of the force, applied to the particle's velocity, in the direction of its global best (leader)
      * CHI: velocity scaling factor
      * v_coeff: velocity coefficient (determining the maximum allowed particle velocity)
      * leader_selection_range the leader of each particle is selected among the best leader_selection_range% individuals
      * diversity_mechanism one of 'crowding distance', 'niche count' or 'maxmin'. Defines the diversity mechanism used
docstring_summary: Constructs a Multi Objective PSO
docstring_tokens: Constructs a Multi Objective PSO
function: def _nspso_ctor(
          self,
          gen=100,
          minW=0.4,
          maxW=1.0,
          C1=2.0,
          C2=2.0,
          CHI=1.0,
          v_coeff=0.5,
          leader_selection_range=5,
          diversity_mechanism='crowding distance'):
      """
      Constructs a Multi Objective PSO
  
      USAGE: algorithm.nspso(self, gen=10, minW = 0.4, maxW = 1.0, C1 = 2.0, C2 = 2.0,
              CHI = 1.0, v_coeff = 0.5, leader_selection = 5, diversity_mechanism = 'crowding_distance'):
  
      * gen: number of generations
      * minW: minimum particles' inertia weight (the inertia weight is decreased troughout the run between maxW and minW)
      * maxW: maximum particles' inertia weight (the inertia weight is decreased troughout the run between maxW and minW)
      * C1: magnitude of the force, applied to the particle's velocity, in the direction of its previous best position
      * C2: magnitude of the force, applied to the particle's velocity, in the direction of its global best (leader)
      * CHI: velocity scaling factor
      * v_coeff: velocity coefficient (determining the maximum allowed particle velocity)
      * leader_selection_range the leader of each particle is selected among the best leader_selection_range% individuals
      * diversity_mechanism one of 'crowding distance', 'niche count' or 'maxmin'. Defines the diversity mechanism used
      """
      # We set the defaults or the kwargs
      DIVERSITY_MECHANISM = {
          'crowding distance': _algorithm._diversity_mechanism.CROWDING_DISTANCE,
          'niche count': _algorithm._diversity_mechanism.NICHE_COUNT,
          'maxmin': _algorithm._diversity_mechanism.MAXMIN,
      }
  
      arg_list = []
      arg_list.append(gen)
      arg_list.append(minW)
      arg_list.append(maxW)
      arg_list.append(C1)
      arg_list.append(C2)
      arg_list.append(CHI)
      arg_list.append(v_coeff)
      arg_list.append(leader_selection_range)
      arg_list.append(DIVERSITY_MECHANISM[diversity_mechanism])
      self._orig_init(*arg_list)
function_tokens: def _nspso_ctor ( self , gen = 100 , minW = 0.4 , maxW = 1.0 , C1 = 2.0 , C2 = 2.0 , CHI = 1.0 , v_coeff = 0.5 , leader_selection_range = 5 , diversity_mechanism = 'crowding distance' ) : # We set the defaults or the kwargs DIVERSITY_MECHANISM = { 'crowding distance' : _algorithm . _diversity_mechanism . CROWDING_DISTANCE , 'niche count' : _algorithm . _diversity_mechanism . NICHE_COUNT , 'maxmin' : _algorithm . _diversity_mechanism . MAXMIN , } arg_list = [ ] arg_list . append ( gen ) arg_list . append ( minW ) arg_list . append ( maxW ) arg_list . append ( C1 ) arg_list . append ( C2 ) arg_list . append ( CHI ) arg_list . append ( v_coeff ) arg_list . append ( leader_selection_range ) arg_list . append ( DIVERSITY_MECHANISM [ diversity_mechanism ] ) self . _orig_init ( * arg_list )