opytimizer.optimizers.social.qsa

Queuing Search Algorithm.

class opytimizer.optimizers.social.qsa.QSA(params: Optional[Dict[str, Any]] = None)

A QSA class, inherited from Optimizer.

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

References

J. Zhang et al. Queuing search algorithm: A novel metaheuristic algorithm for solving engineering optimization problems. Applied Mathematical Modelling (2018).

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

Initialization method.

Parameters:params – Contains key-value parameters to the meta-heuristics.
_calculate_queue(n_agents: int, t_1: float, t_2: float, t_3: float) → Tuple[int, int, int]

Calculates the number of agents that belongs to each queue.

Parameters:
  • n_agents – Number of agents.
  • t_1 – Fitness value of first agent in the population.
  • t_2 – Fitness value of second agent in the population.
  • t_3 – Fitness value of third agent in the population.
Returns:

The number of agents in first, second and third queues.

Return type:

(Tuple[int, int, int])

_business_one(agents: List[opytimizer.core.agent.Agent], function: opytimizer.core.function.Function, beta: float) → None

Performs the first business phase.

Parameters:
  • agents – List of agents.
  • function – A Function object that will be used as the objective function.
  • beta – Range of fluctuation.
_business_two(agents: List[opytimizer.core.agent.Agent], function: opytimizer.core.function.Function) → None

Performs the second business phase.

Parameters:
  • agents – List of agents.
  • function – A Function object that will be used as the objective function.
_business_three(agents: List[opytimizer.core.agent.Agent], function: opytimizer.core.function.Function) → None

Performs the third business phase.

Parameters:
  • agents – List of agents.
  • function – A Function object that will be used as the objective function.
update(space: opytimizer.core.space.Space, function: opytimizer.core.function.Function, iteration: int, n_iterations: int) → None

Wraps Queue Search Algorithm over all agents and variables.

Parameters:
  • space – Space containing agents and update-related information.
  • function – A Function object that will be used as the objective function.
  • iteration – Current iteration.
  • n_iterations – Maximum number of iterations.