opytimizer.optimizers.science.aso

Atom Search Optimization.

class opytimizer.optimizers.science.aso.ASO(params: Optional[Dict[str, Any]] = None)

An ASO class, inherited from Optimizer.

This is the designed class to define ASO-related variables and methods.

References

W. Zhao, L. Wang and Z. Zhang. A novel atom search optimization for dispersion coefficient estimation in groundwater. Future Generation Computer Systems (2019).

__init__(params: Optional[Dict[str, Any]] = None) → None

Initialization method.

Parameters:params – Contains key-value parameters to the meta-heuristics.
alpha

Depth weight.

beta

Multiplier weight.

velocity

Array of velocities.

compile(space: opytimizer.core.space.Space) → None

Compiles additional information that is used by this optimizer.

Parameters:space – A Space object containing meta-information.
_calculate_mass(agents: List[opytimizer.core.agent.Agent]) → List[float]

Calculates the atoms’ masses (eq. 17 and 18).

Parameters:agents – List of agents.
Returns:A list holding the atoms’ masses.
Return type:(List[float])
_calculate_potential(agent: opytimizer.core.agent.Agent, K_agent: opytimizer.core.agent.Agent, average: numpy.ndarray, iteration: int, n_iterations: int) → None

Calculates the potential of an agent based on its neighbour and average positioning.

Parameters:
  • agent – Agent to have its potential calculated.
  • K_agent – Neighbour agent.
  • average – Array of average positions.
  • iteration – Current iteration.
  • n_iterations – Maximum number of iterations.
_calculate_acceleration(agents: List[opytimizer.core.agent.Agent], best_agent: opytimizer.core.agent.Agent, mass: numpy.ndarray, iteration: int, n_iterations: int) → numpy.ndarray

Calculates the atoms’ acceleration.

Parameters:
  • agents – List of agents.
  • best_agent – Global best agent.
  • mass – Array of masses.
  • iteration – Current iteration.
  • n_iterations – Maximum number of iterations.
Returns:

An array holding the atoms’ acceleration.

Return type:

(np.ndarray)

update(space: opytimizer.core.space.Space, iteration: int, n_iterations: int) → None

Wraps Atom Search Optimization over all agents and variables.

Parameters:
  • space – Space containing agents and update-related information.
  • iteration – Current iteration.
  • n_iterations – Maximum number of iterations.