opytimizer.optimizers.population.aeo¶
Artificial Ecosystem-based Optimization.
-
class
opytimizer.optimizers.population.aeo.
AEO
(params: Optional[Dict[str, Any]] = None)¶ An AEO class, inherited from Optimizer.
This is the designed class to define AEO-related variables and methods.
References
W. Zhao, L. Wang and Z. Zhang. Artificial ecosystem-based optimization: a novel nature-inspired meta-heuristic algorithm. Neural Computing and Applications (2019).
-
__init__
(params: Optional[Dict[str, Any]] = None) → None¶ Initialization method.
Parameters: params – Contains key-value parameters to the meta-heuristics.
-
_production
(agent: opytimizer.core.agent.Agent, best_agent: opytimizer.core.agent.Agent, iteration: int, n_iterations: int) → opytimizer.core.agent.Agent¶ Performs the producer update (eq. 1).
Parameters: - agent – Current agent.
- best_agent – Best agent.
- iteration – Current iteration.
- n_iterations – Maximum number of iterations.
Returns: An updated producer.
Return type: (Agent)
-
_herbivore_consumption
(agent: opytimizer.core.agent.Agent, producer: opytimizer.core.agent.Agent, C: float) → opytimizer.core.agent.Agent¶ Performs the consumption update by a herbivore (eq. 6).
Parameters: - agent – Current agent.
- producer – Producer agent.
- C – Consumption factor.
Returns: An updated consumption by a herbivore.
-
_omnivore_consumption
(agent: opytimizer.core.agent.Agent, producer: opytimizer.core.agent.Agent, consumer: opytimizer.core.agent.Agent, C: float) → opytimizer.core.agent.Agent¶ Performs the consumption update by an omnivore (eq. 8)
Parameters: - agent – Current agent.
- producer – Producer agent.
- consumer – Consumer agent.
- C – Consumption factor.
Returns: An updated consumption by an omnivore.
Return type: (Agent)
-
_carnivore_consumption
(agent: opytimizer.core.agent.Agent, consumer: opytimizer.core.agent.Agent, C: float) → opytimizer.core.agent.Agent¶ Performs the consumption update by a carnivore (eq. 7).
Parameters: - agent – Current agent.
- consumer – Consumer agent.
- C – Consumption factor.
Returns: An updated consumption by a carnivore.
Return type: (Agent)
-
_update_composition
(agents: List[opytimizer.core.agent.Agent], best_agent: opytimizer.core.agent.Agent, function: opytimizer.core.function.Function, iteration: int, n_iterations: int) → None¶ Wraps production and consumption updates over all agents and variables (eq. 1-8).
Parameters: - agents – List of agents.
- best_agent – Global best agent.
- function – A Function object that will be used as the objective function.
- iteration – Current iteration.
- n_iterations – Maximum number of iterations.
-
_update_decomposition
(agents: List[opytimizer.core.agent.Agent], best_agent: opytimizer.core.agent.Agent, function: opytimizer.core.function.Function) → None¶ Wraps decomposition updates over all agents and variables (eq. 9).
Parameters: - agents – List of agents.
- best_agent – Global best agent.
- 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 Artificial Ecosystem-based Optimization 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.
-