class_docstr: AbstractSolver base class for mystic optimizers.
      
class_docstr_tok: ["AbstractSolver","base","class","for","mystic","optimizers","."]
docstr: Takes one initial input::
  
      dim      -- dimensionality of the problem.
  
  Additional inputs::
  
      npop     -- size of the trial solution population.       [default = 1]
  
  Important class members::
  
      nDim, nPop       = dim, npop
      generations      - an iteration counter.
      evaluations      - an evaluation counter.
      bestEnergy       - current best energy.
      bestSolution     - current best parameter set.           [size = dim]
      popEnergy        - set of all trial energy solutions.    [size = npop]
      population       - set of all trial parameter solutions. [size = dim*npop]
      solution_history - history of bestSolution status.       [StepMonitor.x]
      energy_history   - history of bestEnergy status.         [StepMonitor.y]
      signal_handler   - catches the interrupt signal.
          
code: def __init__(self, dim, **kwds):
      """
      Takes one initial input::
  
          dim      -- dimensionality of the problem.
  
      Additional inputs::
  
          npop     -- size of the trial solution population.       [default = 1]
  
      Important class members::
  
          nDim, nPop       = dim, npop
          generations      - an iteration counter.
          evaluations      - an evaluation counter.
          bestEnergy       - current best energy.
          bestSolution     - current best parameter set.           [size = dim]
          popEnergy        - set of all trial energy solutions.    [size = npop]
          population       - set of all trial parameter solutions. [size = dim*npop]
          solution_history - history of bestSolution status.       [StepMonitor.x]
          energy_history   - history of bestEnergy status.         [StepMonitor.y]
          signal_handler   - catches the interrupt signal.
      """
      NP = kwds["npop"] if "npop" in kwds else 1
  
      self.nDim = dim
      self.nPop = NP
      self._init_popEnergy = inf
      self.popEnergy = [self._init_popEnergy] * NP
      self.population = [[0.0 for i in range(dim)] for j in range(NP)]
      self.trialSolution = [0.0] * dim
      self._map_solver = False
      self._bestEnergy = None
      self._bestSolution = None
      self._state = None
      self._type = self.__class__.__name__
  
      self.sigint_callback = None
      self._handle_sigint = False
      self._useStrictRange = False
      self._useTightRange = None
      self._useClipRange = None
      self._defaultMin = [-1e3] * dim
      self._defaultMax = [1e3] * dim
      self._strictMin = []
      self._strictMax = []
      self._maxiter = None
      self._maxfun = None
      self._saveiter = None
      # self._saveeval        = None
  
      from mystic.monitors import Null, Monitor
  
      self._evalmon = Null()
      self._stepmon = Monitor()
      self._fcalls = [0]
      self._energy_history = None
      self._solution_history = None
      self.id = None  # identifier (use like "rank" for MPI)
  
      self._strictbounds = lambda x: x
      self._constraints = lambda x: x
      self._penalty = lambda x: 0.0
      self._reducer = None
      self._cost = (None, None, None)
      #                       (cost, raw_cost, args) #,callback)
      self._collapse = False
      self._termination = (
          lambda x, *ar, **kw: False
          if len(ar) < 1
          or ar[0] is False
          or (kw["info"] if "info" in kw else True) == False
          else ""
      )  # XXX: better default ?
      # (get termination details with self._termination.__doc__)
  
      import mystic.termination as mt
  
      self._EARLYEXIT = mt.EARLYEXIT
      self._live = False
      return
  
imports: import random
  import numpy
  from numpy import inf, shape, asarray, absolute, asfarray, seterr
  from mystic.tools import wrap_function, wrap_nested, wrap_reducer
  from mystic.tools import wrap_bounds, wrap_penalty, reduced
  from klepto import isvalid, validate
  from collections.abc import Callable
label_desc: Use image node_id 1 to create a new AbstractSolver object from inherited base classes: object with example: obj = AbstractSolver(dim)