SPEA2 configuration¶
Configure spea2 through vamos.algorithms.SPEA2Config. This page is the parameter reference, not a tutorial about the algorithm.
Stable public API. The 1.x compatibility policy defines the supported surface; import from the public facade shown below.
from vamos.algorithms import SPEA2Config
Configuration overview · Algorithm contracts · Optimization
SPEA2Config
dataclass
¶
Bases: _SerializableConfig
default(pop_size=100, n_var=None)
classmethod
¶
Create a default SPEA2 configuration.
Builder methods¶
Use SPEA2Config.builder() to obtain the fluent builder; do not import the private builder class directly. The methods below are generated from that returned object, so their signatures are not maintained as a second manual parameter table.
Bases: _ConfigBuilderState, _PopSizeBuilder, _CrossoverBuilder, _MutationBuilder, _SelectionBuilder, _RepairBuilder, _InitializerBuilder, _MutationProbFactorBuilder, _ConstraintModeBuilder, _TrackGenealogyBuilder, _ResultArchiveBuilder
Declarative configuration holder for SPEA2 settings.
Examples: cfg = SPEA2Config.default() cfg = SPEA2Config.builder().pop_size(100).archive_size(100).build()
external_archive(capacity=None, **kwargs)
¶
Configure an external archive for result storage.
Note
This is separate from archive_size, which controls the internal SPEA2 archive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
capacity
|
int | None
|
Maximum number of solutions. |
None
|
**kwargs
|
Any
|
Forwarded to :class: |
{}
|