saealib.Algorithm¶
Methods
Generate offspring solutions. |
|
Create a ParetoArchive with the correct direction for the problem. |
|
Return the list of attributes required for Population. |
|
Update the population with offspring solutions. |
Method Details
- Algorithm.__init__()¶
- abstract Algorithm.ask(ctx, provider, n_offspring=None)[source]¶
Generate offspring solutions.
- Parameters:
ctx (OptimizationContext) – Context instance.
provider (ComponentProvider) – Provider instance.
n_offspring (int or None, optional) – Number of offspring to generate. If
None, the algorithm determines the count (typically equal to the population size).
- Returns:
Generated offspring solutions.
- Return type:
- Algorithm.create_pareto_archive(attrs, init_capacity, problem)[source]¶
Create a ParetoArchive with the correct direction for the problem.
- Parameters:
attrs (list[PopulationAttribute])
init_capacity (int)
problem (Problem)
- Return type:
ParetoArchive
- abstract Algorithm.get_required_attrs(problem)[source]¶
Return the list of attributes required for Population.
- Parameters:
problem (Problem)
- Return type:
list[PopulationAttribute]
- abstract Algorithm.tell(ctx, provider, offspring)[source]¶
Update the population with offspring solutions.
- Parameters:
ctx (OptimizationContext) – Context instance.
provider (ComponentProvider) – Provider instance.
offspring (Population) – Offspring solutions.
- Return type:
None