Whale Optimization Algorithm.

class opytimizer.optimizers.swarm.woa.WOA(params: Optional[Dict[str, Any]] = None)

A WOA class, inherited from Optimizer.

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


S. Mirjalli and A. Lewis. The Whale Optimization Algorithm. Advances in Engineering Software (2016).

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

Initialization method.

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

Logarithmic spiral.

_generate_random_agent(agent: opytimizer.core.agent.Agent) → opytimizer.core.agent.Agent

Generates a new random-based agent.

Parameters:agent – Agent to be copied.
Returns:Random-based agent.
Return type:(Agent)
update(space: opytimizer.core.space.Space, iteration: int, n_iterations: int) → None

Wraps Whale Optimization Algorithm over all agents and variables.

  • space – Space containing agents and update-related information.
  • iteration – Current iteration.
  • n_iterations (int) – Maximum number of iterations