USE(7)
USE(7)
AbEC - Adding New Components
<< >>
< [ Home ] < 1. [ Use ] > 2. [ Configuration files ] > 3. [ Fitness function ] > 4. [ Running ] > 5. [ Results ] > 6. [ Example ] > 7. [ Adding new components ] >> 7.1. [ Adding a New Optimizer ] >>>> 7.1.1. [ Example of a New Optimizer ] >> 7.2. [ Adding a New Component ] >>>> 7.2.1. [ Example of a New Component ] >> 7.3. [ Adding a New Metric File ] >>>> 7.3.1. [ Example of a New Metric ]
[~]$ Overview
In the framework the algorithms are composed by components, these are divided into two categories:
  • Optimizers: These are the strategies used for the individuals during the optimization process, for example, Genetic Algorithm, Particle Swarm Optimization , etc ...

  • General Components: These are the components with specific objectives used to enhance the performance of the optimizer during the optimization process. For simplicity from now on we are going to reference to this class only by Components.

  • Metrics: These are the measures used to evaluate the algorithm during the optimization process. It can be for example a measure evaluating the performance or the behavior of the algorithm. The Metrics are divided into three scopes, depending on the caracteristcs of the measure.
In order to test the compatibility, performance or even to just know if a new component works in the optimization, the framework provide a easy way to add a new component to the list of the available components. Basically you just need to write the script of the new component in python, and place it in AbEC/abec/optimizers/, AbEC/abec/components/ or AbEC/abec/metrics/, depends on which class the component belongs.

Below is detailed how this works and is showed two examples, one for an optimizer and one for a component.
[~]$ How to do
The most important part here is the python file that defines the component. The name of this file is used by the framework to reference to this component. Now, lets define some rules that this file need to follow in order to be correctly interpreted by the framework, remembering that each type of component has different rules and need to be placed in different folders.

Adding a new:

> [ Optimizer ] > [ Component ] > [ Metric ]
Be free to use this framework.
AbEC © 2023.