Skip to main content

NSGA2Tensor

Module: opytimizer.optimizers.multi_objective.evolutionary.nsga2

Tensorized NSGA-II, following the general tensorization methodology of:

Z. Liang, H. Li, N. Yu, K. Sun, and R. Cheng, "Bridging Evolutionary Multiobjective Optimization and GPU Acceleration via Tensorization," IEEE Trans. Evol. Comput., vol. 30, no. 1, pp. 420-434, Feb. 2026.

Constructor​

NSGA2Tensor(params: 'dict' = None, crossover_operator=None, mutation_operator=None) -> 'None'

Parameters​

ParameterTypeDefaultDescription
paramsdictNoneContains key-value parameters to the meta-heuristics.
crossover_operatorNoneTensorized crossover operator applied to the parents.
mutation_operatorNoneTensorized mutation operator applied to the children.

Methods​

compile​

compile(self, space: '_MultiObjectiveTensorSpace') -> 'None'

Allocates the population buffers and binds the optimizer to the backend.

P_tensor / F_tensor hold 2 * n_agents rows: the current population in the first half and the offspring of the generation in the second one.

Parameters​

ParameterTypeDefaultDescription
space_MultiObjectiveTensorSpaceA tensorized MultiObjectiveSpace object.

evaluate​

evaluate(self, space: '_MultiObjectiveTensorSpace', function) -> 'None'

Evaluates the initial population and computes its ranks and crowding.

Offspring are evaluated inside update, so this method replaces itself with a no-op after its first call.

Parameters​

ParameterTypeDefaultDescription
space_MultiObjectiveTensorSpaceA tensorized MultiObjectiveSpace object.
functionA Function object that will be used as the objective function.

update​

update(self, space: '_MultiObjectiveTensorSpace', function) -> 'None'

Performs one generation: creates, evaluates and selects the offspring.

Parameters​

ParameterTypeDefaultDescription
space_MultiObjectiveTensorSpaceA tensorized MultiObjectiveSpace object.
functionA Function object that will be used as the objective function.