Skip to main content

LEO

Module: opytimizer.optimizers.single_objective.social.leo

A LEO class, inherited from Optimizer.

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

References: P. Trojovsk`y, M. Dehghani, E. Trojovsk´a, and E. Milkova, “Language education optimization: A new human-based metaheuristic algorithm for solving optimization problems,” Computer Modeling in Engineering & Sciences, volume 136, issue: 2, 2023

Constructor​

LEO(params: Optional[Dict[str, Any]] = None) -> None

Parameters​

ParameterTypeDefaultDescription
paramsOptional[Dict[str, Any]]None—

Methods​

compile​

compile(self, space: opytimizer.core.space._SingleObjectiveSpace) -> None

Compiles additional information that is used by this optimizer.

Parameters​

ParameterTypeDefaultDescription
spaceopytimizer.core.space._SingleObjectiveSpaceA Space object containing meta-information.

evaluate​

evaluate(self, space: opytimizer.core.space._SingleObjectiveSpace, function: opytimizer.core.function.Function) -> None

Evaluates the search space according to the objective function.

Parameters​

ParameterTypeDefaultDescription
spaceopytimizer.core.space._SingleObjectiveSpaceA Space object that will be evaluated.
functionopytimizer.core.function.FunctionA Function object that will be used as the objective function.

update​

update(self, space: opytimizer.core.space._SingleObjectiveSpace, function: opytimizer.core.function.Function) -> None

Parameters​

ParameterTypeDefaultDescription
spaceopytimizer.core.space._SingleObjectiveSpaceSpace containing a list of Agent objects, each with 'position' (NumPy array of shape (n, 1)) and 'fit' (scalar).
functionopytimizer.core.function.FunctionA Function object that will be used as the objective function.