Skip to content

NSGA-III configuration

Configure nsgaiii through vamos.algorithms.NSGAIIIConfig. 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 NSGAIIIConfig

Configuration overview · Algorithm contracts · Optimization

VAMOS 1.3.0: pop_size_auto and enforce_ref_dirs have no effect: NSGA-III runs the largest reference-direction lattice that fits in pop_size and keeps at least one individual per direction. Setting them with the builder, or enforce_ref_dirs=False in the constructor or from_dict(), emits a FutureWarning; both fields are planned for removal in 2.0 (see stable configuration). NSGAIIIConfig.default() does not warn. mutation_prob_factor now sets the mutation probability to factor / n_var, as in NSGA-II.

NSGAIIIConfig dataclass

Bases: _SerializableConfig

default(pop_size=None, n_var=None, n_obj=3, encoding=None) classmethod

Create a default NSGA-III configuration.

Parameters:

Name Type Description Default
pop_size int | None

Population size. Defaults to the generated reference-direction count.

None
n_var int | None

Number of variables used for the default mutation probability.

None
n_obj int

Number of objectives used to choose the reference directions. With pop_size, the complete Das-Dennis lattice with the most directions that fit in it (pop_size - 1 divisions with two objectives). Without it, 99 divisions for two objectives, 12 for three and 6 for four or more, and pop_size is the direction count.

3
encoding EncodingLike | None

Problem encoding. Discrete and mixed encodings take their crossover and mutation from the shared encoding table.

None

Builder methods

Use NSGAIIIConfig.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, _ResultArchiveBuilder, _ConstraintHandlingBuilder, _ConstraintModeBuilder, _TrackGenealogyBuilder

Declarative configuration holder for NSGA-III settings.

Examples: cfg = NSGAIIIConfig.default(n_obj=3) cfg = NSGAIIIConfig.builder().pop_size(92).crossover("sbx", prob=1.0).build()

enforce_ref_dirs(enabled=True)

Kept for compatibility: it has no effect, warns, and goes in VAMOS 2.0.

pop_size_auto(enabled=True)

Kept for compatibility: it has no effect, warns, and goes in VAMOS 2.0.