opytimizer.optimizers.swarm.abc¶
Artificial Bee Colony.
-
class
opytimizer.optimizers.swarm.abc.
ABC
(params: Optional[Dict[str, Any]] = None)¶ An ABC class, inherited from Optimizer.
This is the designed class to define ABC-related variables and methods.
References
D. Karaboga and B. Basturk. A powerful and efficient algorithm for numerical function optimization: Artificial bee colony (ABC) algorithm. Journal of Global Optimization (2007).
-
__init__
(params: Optional[Dict[str, Any]] = None) → None¶ Initialization method.
Parameters: params – Contains key-value parameters to the meta-heuristics.
-
n_trials
¶ Number of trial limits.
-
trial
¶ Array of trial.
-
compile
(space: opytimizer.core.space.Space) → None¶ Compiles additional information that is used by this optimizer.
Parameters: space – A Space object containing meta-information.
-
_evaluate_location
(agent: opytimizer.core.agent.Agent, neighbour: opytimizer.core.agent.Agent, function: opytimizer.core.function.Function, index: int) → None¶ Evaluates a food source location and update its value if possible (eq. 2.2).
Parameters: - agent – An agent.
- neighbour – A neightbour agent.
- function – A function object.
- index – Index of trial.
-
_send_employee
(agents: List[opytimizer.core.agent.Agent], function: opytimizer.core.function.Function) → None¶ Sends employee bees onto food source to evaluate its nectar.
Parameters: - agents – List of agents.
- function – A function object.
-
_send_onlooker
(agents: List[opytimizer.core.agent.Agent], function: opytimizer.core.function.Function) → None¶ Sends onlooker bees to select new food sources (eq. 2.1).
Parameters: - agents – List of agents.
- function – A function object.
-
_send_scout
(agents: List[opytimizer.core.agent.Agent], function: opytimizer.core.function.Function) → None¶ Sends scout bees to scout for new possible food sources.
Parameters: - agents – List of agents.
- function – A function object.
-
update
(space: opytimizer.core.space.Space, function: opytimizer.core.function.Function) → None¶ Wraps Artificial Bee Colony 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.
-