Addons
Contents
Addons
An addons, is an object that is linked to another one. It allows to extend some functionnalities of the target without modifying its implementation. The user can graft addons to Variables and Search space by using the kwargs in the init function.
Known kwargs are:
For Search space:
to_continuous: used in algorithms using continuous Search space, when the given Search space is not continuous.to_discrete: used in algorithms using discrete Search space, when the given Search space is not discrete.distance: used in algorithms where a distance is needed.neighbor: used in algorithms using neighborhood between points.mutation: used in Genetic Algorithm.selection: used in Genetic Algorithm.crossover: used in Genetic Algorithm.
For Variables:
to_continuous: used by the to_continuous Search space Addon.to_discrete: used by the to_discrete Search space Addon.neighbor: Defines what is a neighbor for a given Variables. It uses the neighbor Search space Addon.
- class Addon(object=None)[source]
Bases:
abc.ABCAbstract class describing what an addon is. An
Addonin Zellij, is an additionnal feature that can be added to atargetobject. See Variable Addon for addon targeting Variables or Search space Addon targeting Search space.- Parameters
target (Object, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Object, default=None
- property target
Variable Addon
- class VarAddon(variable=None)[source]
Bases:
zellij.core.addons.AddonAddons where the target must be of type Variables.
- Parameters
target (Variables, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Variables, default=None
- property target
Subclasses
- class VarNeighborhood(neighborhood, variable=None)[source]
Bases:
zellij.core.addons.VarAddonAddons where the target must be of type Variables. Describes what a neighborhood is for a Variables.
- Parameters
target (Variables, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Variables, default=None
- property neighborhood
- class VarConverter(variable=None)[source]
Bases:
zellij.core.addons.VarAddonAddons where the target must be of type Variables. Describes what a converter is for a Variables. Converter allows to convert the type of a Variables to another one.
- Parameters
target (Search space, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Search space, default=None
- abstract convert()[source]
- abstract reverse()[source]
Search space Addon
- class SearchspaceAddon(search_space=None)[source]
Bases:
zellij.core.addons.AddonAddons where the target must be of type Search space.
- Parameters
target (Search space, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Search space, default=None
- property target
Subclasses
- class Neighborhood(neighborhood, search_space=None)[source]
Bases:
zellij.core.addons.SearchspaceAddonAddons where the target must be of type Search space. Describes what a neighborhood is for a Search space.
- Parameters
target (Search space, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Search space, default=None
- property neighborhood
- class Converter(search_space=None)[source]
Bases:
zellij.core.addons.SearchspaceAddonAddons where the target must be of type Search space. Describes what a converter is for a Search space. Converter allows to convert the type of a Search space to another one. All Variables must have a converter Variable Addon implemented.
- Parameters
target (Search space, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Search space, default=None
- abstract convert()[source]
- abstract reverse()[source]
- class Operator(search_space=None)[source]
Bases:
zellij.core.addons.SearchspaceAddonAbstract class describing what an operator is for a Search space. Addons where the target must be of type Search space.
- Parameters
target (Search space, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Search space, default=None
- class Mutator(search_space=None)[source]
Bases:
zellij.core.addons.SearchspaceAddonAbstract class describing what an Mutator is for a Search space. Addons where the target must be of type Search space.
- Parameters
target (Search space, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Search space, default=None
- class Crossover(search_space=None)[source]
Bases:
zellij.core.addons.SearchspaceAddonAbstract class describing what an MCrossover is for a Search space. Addons where the target must be of type Search space.
- Parameters
target (Search space, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Search space, default=None
- class Selector(search_space=None)[source]
Bases:
zellij.core.addons.SearchspaceAddonAbstract class describing what an Selector is for a Search space. Addons where the target must be of type Search space.
- Parameters
target (Search space, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Search space, default=None
- class Distance(search_space=None, weights=None)[source]
Bases:
zellij.core.addons.SearchspaceAddonAbstract class describing what an Distance is for a Search space. Addons where the target must be of type Search space.
- Parameters
target (Search space, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type
Search space, default=None
See also
Many addons are linked to metaheuristics. See: