evox.algorithms.mo.nsga3#
Module Contents#
Classes#
An implementation of the tensorized NSGA-III for many-objective optimization problems. |
Functions#
Compile-safe replacement for |
Data#
API#
- evox.algorithms.mo.nsga3._get_table_row_inner(bool_ref_candidate: torch.Tensor, upper_bound: torch.Tensor)[source]#
- evox.algorithms.mo.nsga3.vmap_get_table_row#
‘vmap(…)’
- evox.algorithms.mo.nsga3._select_from_index_by_min_inner(group_id: torch.Tensor, group_dist: torch.Tensor, idx: torch.Tensor)[source]#
- evox.algorithms.mo.nsga3.vmap_select_from_index_by_min#
‘vmap(…)’
- evox.algorithms.mo.nsga3.vmap_get_extreme#
‘vmap(…)’
- evox.algorithms.mo.nsga3._masked_assign(target: torch.Tensor, index: torch.Tensor, mask: torch.Tensor, value: torch.Tensor)[source]#
Compile-safe replacement for
target[index[mask]] = value.Boolean (advanced) indexing such as
target[index[mask]] = valuelowers toaten.nonzero, a dynamic-shape operator that graph-breaks undertorch.compile/torch.while_loop(which requirefullgraph=True).This performs the same assignment without any dynamic-shape op: for masked-in positions it writes
value; for masked-out positions it writes the entry already stored at the (clamped) index, which is a no-op. Duplicate indices are safe because the same scalarvalueis written.
- class evox.algorithms.mo.nsga3.NSGA3(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, selection_op: Optional[Callable] = None, mutation_op: Optional[Callable] = None, crossover_op: Optional[Callable] = None, data_type: Optional[torch.dtype] = None, device: torch.device | None = None)[source]#
Bases:
evox.core.AlgorithmAn implementation of the tensorized NSGA-III for many-objective optimization problems.
- References:
[1] K. Deb and H. Jain, “An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part I: Solving Problems With Box Constraints,” IEEE Transactions on Evolutionary Computation, vol. 18, no. 4, pp. 577-601, 2014. Available: https://ieeexplore.ieee.org/document/6600851
[2] H. Li, Z. Liang, and R. Cheng, “GPU-accelerated Evolutionary Many-objective Optimization Using Tensorized NSGA-III,” in 2025 IEEE Congress on Evolutionary Computation, 2025.
Initialization
Initializes the NSGA-III algorithm.
- Parameters:
pop_size – The size of the population.
n_objs – The number of objective functions in the optimization problem.
lb – The lower bounds for the decision variables (1D tensor).
ub – The upper bounds for the decision variables (1D tensor).
selection_op – The selection operation for evolutionary strategy (optional).
mutation_op – The mutation operation, defaults to
polynomial_mutationif not provided (optional).crossover_op – The crossover operation, defaults to
simulated_binaryif not provided (optional).data_type – The data type for the decision variables (optional). Defaults to torch.float32.
device – The device on which computations should run (optional). Defaults to PyTorch’s default device.