evomo.algorithms#
Submodules#
- evomo.algorithms.age_moea
- evomo.algorithms.bce_ibea
- evomo.algorithms.bce_moead
- evomo.algorithms.bige
- evomo.algorithms.clia
- evomo.algorithms.cmoea_ms
- evomo.algorithms.cmopso
- evomo.algorithms.commea
- evomo.algorithms.dm_moea
- evomo.algorithms.e_moea
- evomo.algorithms.efr_rr
- evomo.algorithms.gde3
- evomo.algorithms.grea
- evomo.algorithms.gwasf_ga
- evomo.algorithms.hype
- evomo.algorithms.ibea
- evomo.algorithms.knea
- evomo.algorithms.lmocso
- evomo.algorithms.lsmof
- evomo.algorithms.maoea_css
- evomo.algorithms.moead
- evomo.algorithms.moead_awa
- evomo.algorithms.moead_dcwv
- evomo.algorithms.moead_de
- evomo.algorithms.moead_dra
- evomo.algorithms.moead_du
- evomo.algorithms.moead_dyts
- evomo.algorithms.moead_frrmab
- evomo.algorithms.moead_pas
- evomo.algorithms.moead_uraw
- evomo.algorithms.nsbidico
- evomo.algorithms.nsga2
- evomo.algorithms.nsga2_sdr
- evomo.algorithms.nsga3
- evomo.algorithms.osp_nsde
- evomo.algorithms.pesa2
- evomo.algorithms.picea_g
- evomo.algorithms.prea
- evomo.algorithms.rvea
- evomo.algorithms.rveaa
- evomo.algorithms.sibea
- evomo.algorithms.smpso
- evomo.algorithms.snsga2
- evomo.algorithms.sparseea
- evomo.algorithms.sparseea2
- evomo.algorithms.spear
- evomo.algorithms.sscea
- evomo.algorithms.tdea_cpbi
- evomo.algorithms.telso
- evomo.algorithms.tensormoead
- evomo.algorithms.theta_dea
- evomo.algorithms.ts_nsga2
- evomo.algorithms.ts_sparseea
- evomo.algorithms.two_arch2
- evomo.algorithms.vaea
- evomo.algorithms.wasf_ga
- evomo.algorithms.wof
Classes#
Initialize the AGEMOEA population and optimization state. |
|
Initialize the BCE_IBEA population and optimization state. |
|
Initialize the BCEMOEAD population and optimization state. |
|
Initialize the BiGE population and optimization state. |
|
Initialize the CLIA population and optimization state. |
|
Initialize the CMOEA_MS population and optimization state. |
|
Initialize the CMOPSO population and optimization state. |
|
Initialize the CoMMEA population and optimization state. |
|
Initialize the DMMOEA population and optimization state. |
|
Initialize the eMOEA population and optimization state. |
|
Initialize the EFRRR population and optimization state. |
|
Initialize GDE3 with differential evolution and nondominated environmental selection. |
|
Initialize the GrEA population and optimization state. |
|
Initialize the GWASFGA population and optimization state. |
|
The tensorized version of HypE algorithm. |
|
The tensorized version of IBEA algorithm. |
|
Initialize the KnEA population and optimization state. |
|
The tensorized version of LMOCSO algorithm. |
|
Initialize two-phase weight-space optimization and NSGA-II refinement. |
|
Initialize the MaOEACSS population and optimization state. |
|
Implementation of the Original MOEA/D algorithm. |
|
Initialize the MOEADAWA population and optimization state. |
|
Initialize the MOEAD_DCWV population and optimization state. |
|
Initialize the MOEADDE population and optimization state. |
|
Initialize the MOEAD_DRA population and optimization state. |
|
Initialize the MOEADDU population and optimization state. |
|
Initialize the MOEADDYTS population and optimization state. |
|
Initialize MOEA/D with fitness-rate-rank bandit selection among four DE operators. |
|
Initialize the MOEAD_PaS population and optimization state. |
|
Initialize the MOEAURAW population and optimization state. |
|
Initialize the NSBiDiCo population and optimization state. |
|
A tensorized implementation of the Non-dominated Sorting Genetic Algorithm II (NSGA-II) |
|
Initialize the NSGAII_SDR population and optimization state. |
|
An implementation of the tensorized NSGA-III for many-objective optimization problems. |
|
Initialize the OSP_NSDE population and optimization state. |
|
Initialize the PESA2 population and optimization state. |
|
Initialize the PICEAg population and optimization state. |
|
Initialize the PREA population and optimization state. |
|
A tensorized implementation of the Reference Vector Guided Evolutionary Algorithm (RVEA) |
|
An implementation of the Reference Vector Guided Evolutionary Algorithm embedded with the reference vector |
|
Initialize the SIBEA population and optimization state. |
|
Initialize the SMPSO population and optimization state. |
|
Initialize the SNSGA2 population and optimization state. |
|
Initialize the SparseEA population and optimization state. |
|
Initialize the SparseEA2 population and optimization state. |
|
Initialize the SPEAR population and optimization state. |
|
Initialize the SSCEA population and optimization state. |
|
Initialize the tDEA_CPBI population and optimization state. |
|
Initialize the TELSO population and optimization state. |
|
TensorMOEA/D |
|
Initialize the ThetaDEA population and optimization state. |
|
Initialize the TSNSGAII population and optimization state. |
|
Initialize the TSSparseEA population and optimization state. |
|
Initialize the Two_Arch2 population and optimization state. |
|
Initialize the VaEA population and optimization state. |
|
Initialize the WASFGA population and optimization state. |
|
Initialize the WOF population and optimization state. |
Package Contents#
- class evomo.algorithms.AGEMOEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the AGEMOEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.BCE_IBEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, kappa: float = 0.05, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the BCE_IBEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kappa (float) – Default:
0.05. Positive scale in the exponential indicator-fitness calculation. Smaller values make indicator differences more influential. Objective scaling also affects the resulting selection pressure.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- crossover(x)#
- mutation(x, lb, ub)#
- class evomo.algorithms.BCEMOEAD(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, T: int | None = None, nr: int | None = None, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the BCEMOEAD population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.T (int or None) – Default:
None. Neighborhood size.Noneusesceil(N / 10)for the sampled population sizeN. The effective value ismin(max(2, T), N)after resolving the default.nr (int or None) – Default:
None. Maximum replacements per offspring.Noneusesceil(N / 100); the effective value is clamped to[1, N]for sampled population sizeN.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.BiGE(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the BiGE population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.CLIA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the CLIA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.CMOEA_MS(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, type: int = 1, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the CMOEA_MS population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.type (int) – Default:
1. Variation selector:1uses simulated binary crossover and polynomial mutation. Any other value uses the current differential-variation branch with fixed scale0.5.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.CMOPSO(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the CMOPSO population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.CoMMEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, eps: float = 0.2, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the CoMMEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.eps (float) – Default:
0.2. Multiplicative epsilon tolerance for comparing the second population with the first population’s front. Comparisons use(1 + eps) * front1_fit. This is distinct from the additive grid width used byeMOEA; choose it with the objective scale and sign in mind.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.DMMOEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the DMMOEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.eMOEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, epsilon: float = 0.05, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the eMOEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.epsilon (float) – Default:
0.05. Positive scalar objective-space grid width for epsilon-dominance archive updates. The same width is applied to every objective. It has objective-value units, so rescaling objectives changes the archive resolution.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.EFRRR(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, K: int = 2, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the EFRRR population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.K (int) – Default:
2. Number of closest reference weights allowed for each solution in restricted ranking. Use1 <= K <= number_of_reference_weights. Increasing it broadens the ranking neighborhoods.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.GDE3(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, F: float = 0.5, CR: float = 0.5)#
Bases:
evox.core.AlgorithmInitialize GDE3 with differential evolution and nondominated environmental selection.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below. At least four candidates are required for three distinct DE parents per target.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.F (float) – Default:
0.5. Differential-evolution scale multiplying a difference between parent decision vectors. Use a positive value; larger values produce larger differential steps before bound repair.CR (float) – Default:
0.5. Binomial crossover probability in[0, 1]of taking a decision component from the mutant rather than the target. The implementation also forces a mutant component in each trial.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.GrEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, div: int | None = None, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the GrEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.div (int) – Default:
None. Positive number of grid divisions per objective. More divisions give finer objective-space cells; grid occupancy or grid distance is used during selection.Noneuses the setting recommended for the number of objectives (45, 15, 10, 9, 9, 8, 8, 10, 12 for 2 to 10 objectives, as in PlatEMO).kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.GWASFGA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the GWASFGA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.HypE(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, n_sample: int = 10000, selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmThe tensorized version of HypE algorithm.
- References:
- [1] J. Bader and E. Zitzler, “HypE: An algorithm for fast hypervolume-based many-objective optimization,”
Evolutionary Computation, vol. 19, no. 1, pp. 45-76, 2011. Available: https://direct.mit.edu/evco/article-abstract/19/1/45/1363/HypE-An-Algorithm-for-Fast-Hypervolume-Based-Many
- [2] Z. Liang, H. Li, N. Yu, K. Sun, and R. Cheng, “Bridging Evolutionary Multiobjective Optimization and
GPU Acceleration via Tensorization,” IEEE Transactions on Evolutionary Computation, 2025. Available: https://ieeexplore.ieee.org/document/10944658
Initialize the HypE population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.n_sample (int) – Default:
10000. Positive number of Monte Carlo samples for each hypervolume contribution estimate. More samples reduce sampling noise at higher computation and memory cost.selection_op (Callable or None) – Default:
None. Accepted in the signature, but the current constructor overwrites it with EvoX’stournament_selection. A custom value has no effect.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.crossover_op (Callable or None) – Default:
None. Crossover callablecrossover_op(parents) -> offspringreceiving a two-dimensional decision tensor.Noneselects EvoX’ssimulated_binary. Preserve the decision dimension and device, and produce the offspring count expected by this algorithm.device (torch.device or None) – Default:
None. Execution device.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.- init_step()#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step()#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.IBEA(n_objs: int, pop_size: int, lb: torch.Tensor, ub: torch.Tensor, kappa: float = 0.05, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmThe tensorized version of IBEA algorithm.
- References:
- [1] E. Zitzler and S. Künzli, “Indicator-based selection in multiobjective search,” in Proceedings of the International
Conference on Parallel Problem Solving from Nature, 2004, pp. 832-842. Available: https://link.springer.com/chapter/10.1007/978-3-540-30217-9_84
Initialize the IBEA population and optimization state.
- Parameters:
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kappa (float) – Default:
0.05. Positive scale in the exponential indicator-fitness calculation. Smaller values make indicator differences more influential. Objective scaling also affects the resulting selection pressure.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.crossover_op (Callable or None) – Default:
None. Crossover callablecrossover_op(parents) -> offspringreceiving a two-dimensional decision tensor.Noneselects EvoX’ssimulated_binary. Preserve the decision dimension and device, and produce the offspring count expected by this algorithm.device (torch.device or None) – Default:
None. Execution device.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.- init_step()#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step()#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- cal_fitness(pop_obj, kappa)#
Calculate the indicator-based fitness, indicator matrix, and scaling factor.
- class evomo.algorithms.KnEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the KnEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.LMOCSO(n_objs: int, pop_size: int, lb: torch.Tensor, ub: torch.Tensor, alpha: float = 2.0, max_gen: int = 100, mutation_op: Callable | None = None, selection_op: Callable | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmThe tensorized version of LMOCSO algorithm.
- Reference:
- [1] Ye Tian, Xiutao Zheng, Xingyi Zhang and Yaochu Jin, “Efficient Large-Scale Multiobjective Optimization Based
on a Competitive Swarm,” in IEEE Transactions on Cybernetics , 2020, pp. 3696 - 3708. Available: https://ieeexplore.ieee.org/document/8681243
Initialize the LMOCSO population and optimization state.
- Parameters:
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.alpha (float) – Default:
2.0. Exponent in the angle-penalty schedule(gen / max_gen) ** alphaused by reference-vector guided selection. A larger positive exponent delays the growth of angular selection pressure.max_gen (int) – Default:
100. Positive generation horizon used to normalize the algorithm’s adaptation schedule. Set it consistently with your run length. It does not stop the workflow; the caller controls the loop.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.selection_op (Callable or None) – Default:
None. Environmental selection callableselection_op(pop, fit, vectors, theta) -> (pop, fit)for the merged population. Return matching decision and fitness tensors on the input device with the reference-vector output shape.Noneselects EvoX’sref_vec_guided.device (torch.device or None) – Default:
None. Execution device.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.- init_step()#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step()#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- cal_fitness(obj)#
Calculate the fitness by shift-based density
- class evomo.algorithms.LSMOF(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize two-phase weight-space optimization and NSGA-II refinement.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Optional settings:wD=5(reference solutions),SubN=20(weight population size),wmax=0.1(decision reconstruction scale), andmax_fe=10000(evaluation horizon). Other keywords are ignored. The full meanings and limits are listed below.
Additional keyword settings
wD(int, default5)Reference solution count for building directions from both bounds. Use a positive value no larger than the available distinct population. The reconstruction assumes that exactly this many reference solutions are selected.
SubN(int, default20)Positive weight-population size. The first phase evaluates
2 * wD * SubNreconstructed decision vectors per step.wmax(float, default0.1)Positive scale multiplying weighted unit-direction offsets in decision reconstruction. This is a decision- space step scale, not a fraction of the evaluation budget.
max_fe(int, default10000)Positive evaluation horizon. The second phase begins when the evaluation counter reaches
max_fe // 2; the initial evaluations are included. Termination remains controlled by the caller.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MaOEACSS(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, t: float = 0.0, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the MaOEACSS population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.t (float) – Default:
0.0. Convergence-difference threshold when eliminating one member of a close angular pair. Differences above this threshold determine which member is removed; the fallback tie rule applies otherwise. The threshold is measured on normalized convergence scores.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEAD(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmImplementation of the Original MOEA/D algorithm.
- References:
- [1] Q. Zhang and H. Li, “MOEA/D: A Multiobjective Evolutionary Algorithm Based on Decomposition,”
IEEE Transactions on Evolutionary Computation, vol. 11, no. 6, pp. 712-731, 2007. Available: https://ieeexplore.ieee.org/document/4358754
- Note:
This implementation is based on the original paper and may not be the most efficient implementation.
Initialize the MOEAD population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.selection_op (Callable or None) – Default:
None. Accepted and stored, but not called by the current optimization step. Mating uses random neighborhood parents internally, so a custom value does not change mating selection.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.crossover_op (Callable or None) – Default:
None. Crossover callablecrossover_op(parents) -> offspring. For each pair of parents, return one child. The step passes two parents and expects an offspring batch with one row. Preserve the decision dimension and device.Noneselects EvoX’ssimulated_binary_half.device (torch.device or None) – Default:
None. Execution device.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.The sampled population size must be greater than 10, providing at least two neighborhood parents.
- init_step()#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step()#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEADAWA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, T: int = None, nr: int = None, nEP: int = None, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the MOEADAWA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.T (int or None) – Default:
None. Neighborhood size.Noneusesceil(N / 10)for the sampled population sizeN. An explicit value must satisfy1 <= T <= N; this constructor does not cap it.nr (int or None) – Default:
None. Positive maximum replacements per offspring.Noneusesceil(N / 100)for sampled population sizeN.nEP (int or None) – Default:
None. Positive external archive capacity for adaptive weights.Noneusesceil(1.5 * N)for sampled population sizeN.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEAD_DCWV(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, T: int = 20, p: float = -1.0, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the MOEAD_DCWV population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.T (int) – Default:
20. Number of nearest weight vectors in each mating neighborhood, including the subproblem itself. Use a positive integer. Values above the sampled population size are capped to that size.p (float) – Default:
-1.0. Weight-adaptation switch.-1.0enables estimation of a transformation parameter from current normalized fitness on each step. Any other value disables that branch; the numeric value itself is not applied as a fixed transformation in the current implementation.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEADDE(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, delta: float = 0.9, nr: int = 2, F: float = 0.5, CR: float = 1.0, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the MOEADDE population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.delta (float) – Default:
0.9. Probability in[0, 1]of drawing mating parents from the current subproblem’s neighborhood. The remaining draws use the full population. This controls mating, not the replacement limit.nr (int) – Default:
2. Maximum number of incumbent solutions replaced by one offspring during decomposition-based updating. Use a positive integer; the number actually replaced also depends on fitness comparisons.F (float) – Default:
0.5. Differential-evolution scale multiplying a difference between parent decision vectors. Use a positive value; larger values produce larger differential steps before bound repair.CR (float) – Default:
1.0. Accepted and stored, but not used by the current variation step. The implementation forms differential offspring and applies polynomial mutation without binomial crossover, so changing this value has no effect.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEAD_DRA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, T: int = 20, nr: int = 2, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the MOEAD_DRA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.T (int) – Default:
20. Number of nearest weight vectors in each mating neighborhood, including the subproblem itself. Use a positive integer. Values above the sampled population size are capped to that size.nr (int) – Default:
2. Maximum number of incumbent solutions replaced by one offspring during decomposition-based updating. Use a positive integer; the number actually replaced also depends on fitness comparisons.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEADDU(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, T: int = 20, delta: float = 0.9, K: int = 5, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the MOEADDU population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.T (int) – Default:
20. Number of nearest weight vectors in each mating neighborhood, including the subproblem itself. Use a positive integer. Values above the sampled population size are capped to that size.delta (float) – Default:
0.9. Probability in[0, 1]of drawing mating parents from the current subproblem’s neighborhood. The remaining draws use the full population. This controls mating, not the replacement limit.K (int) – Default:
5. Number of subproblems considered for distance-based updating per offspring, selected by cosine similarity to weight vectors. Use1 <= K <= Nfor sampled population sizeN. This is separate from mating neighborhood sizeT.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEADDYTS(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, T: int = 20, nr: int = 2, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the MOEADDYTS population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.T (int) – Default:
20. Number of nearest weight vectors in each mating neighborhood, including the subproblem itself. Use a positive integer. Values above the sampled population size are capped to that size.nr (int) – Default:
2. Maximum number of incumbent solutions replaced by one offspring during decomposition-based updating. Use a positive integer; the number actually replaced also depends on fitness comparisons.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEADFRRMAB(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, T: int = 20, delta: float = 0.9, nr: int = 2, window_size: int = None, **kwargs)#
Bases:
evox.core.AlgorithmInitialize MOEA/D with fitness-rate-rank bandit selection among four DE operators.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.T (int) – Default:
20. Number of nearest weight vectors in each mating neighborhood, including the subproblem itself. Use a positive integer. Values above the sampled population size are capped to that size.delta (float) – Default:
0.9. Probability in[0, 1]of drawing mating parents from the current subproblem’s neighborhood. The remaining draws use the full population. This controls mating, not the replacement limit.nr (int) – Default:
2. Maximum number of incumbent solutions replaced by one offspring during decomposition-based updating. Use a positive integer; the number actually replaced also depends on fitness comparisons.window_size (int or None) – Default:
None. Positive sliding-window capacity for operator identifiers and improvement rewards used in bandit credit assignment.Noneusesceil(N / 2)for sampled population sizeN. It counts recorded operator/reward entries, rather than workflow generations.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.One workflow step performs five internal subgenerations and can evaluate multiple offspring batches. Count evaluations explicitly when comparing budgets.
- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEAD_PaS(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, T: int | None = None, max_gen: int = 100, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the MOEAD_PaS population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.T (int or None) – Default:
None. Neighborhood size.Noneusesceil(N / 10)for sampled population sizeN; the effective value ismin(max(2, T), N)after resolving the default.max_gen (int) – Default:
100. Positive generation horizon for scalarization adaptation. The probability of adapting decreases withmin(gen / max_gen, 1). It does not terminate the workflow.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.MOEAURAW(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, delta: float = 0.9, nr: int = 2, nEP: int = 200, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the MOEAURAW population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below. Use at least
n_objscandidates because initial weights include all objective axes.n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.delta (float) – Default:
0.9. Probability in[0, 1]of drawing mating parents from the current subproblem’s neighborhood. The remaining draws use the full population. This controls mating, not the replacement limit.nr (int) – Default:
2. Maximum number of incumbent solutions replaced by one offspring during decomposition-based updating. Use a positive integer; the number actually replaced also depends on fitness comparisons.nEP (int) – Default:
200. Capacity of the external nondominated archive used for adaptive weight updates. Use a positive integer; increasing it stores more candidate solutions and increases archive work.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.NSBiDiCo(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the NSBiDiCo population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.NSGA2(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmA tensorized implementation of the Non-dominated Sorting Genetic Algorithm II (NSGA-II) for multi-objective optimization problems.
- References:
- [1] K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan, “A fast and elitist multiobjective genetic algorithm: NSGA-II,”
IEEE Transactions on Evolutionary Computation, vol. 6, no. 2, pp. 182-197, 2002. Available: https://ieeexplore.ieee.org/document/996017
- [2] Z. Liang, H. Li, N. Yu, K. Sun, and R. Cheng, “Bridging Evolutionary Multiobjective Optimization and
GPU Acceleration via Tensorization,” IEEE Transactions on Evolutionary Computation, 2025. Available: https://ieeexplore.ieee.org/document/10944658
Initialize NSGA-II with rank and crowding-distance selection.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.selection_op (Callable or None) – Default:
None. Mating selection callableselection_op(pop_size, keys) -> indices.keysis a list of one-dimensional sort-key tensors for crowding distance, rank and, when present, constraints. Returnpop_sizeparent indices on the population device.Noneselects EvoX’stournament_selection_multifit. This does not replace environmental selection.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.crossover_op (Callable or None) – Default:
None. Crossover callablecrossover_op(parents) -> offspringreceiving a two-dimensional decision tensor.Noneselects EvoX’ssimulated_binary. Preserve the decision dimension and device, and produce the offspring count expected by this algorithm.device (torch.device or None) – Default:
None. Execution device.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. Evaluation accepts an objective tensor of shape(B, n_objs)or(fitness, constraint_violation); violations are retained in selection.- init_step()#
Perform the initialization step of the workflow.
- step()#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.NSGAII_SDR(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the NSGAII_SDR population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.NSGA3(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, data_type: torch.dtype | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmAn implementation of the tensorized NSGA-III for many-objective optimization problems.
Uses rank-based tournament mating and fixed-shape reference-direction selection. Initialize the workflow before compiling its step with
fullgraph=True.- 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.
Initialize NSGA-III with reference-point environmental selection.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.selection_op (Callable or None) – Default:
None. Mating selection callableselection_op(pop_size, [rank]) -> indices. Returnpop_sizeparent indices on the population device.Noneselects EvoX’stournament_selection_multifit. Reference-point environmental selection remains internal.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.crossover_op (Callable or None) – Default:
None. Crossover callablecrossover_op(parents) -> offspringreceiving a two-dimensional decision tensor.Noneselects EvoX’ssimulated_binary. Preserve the decision dimension and device, and produce the offspring count expected by this algorithm.data_type (torch.dtype or None) – Default:
None. Initialization mode.torch.boolinitializes Boolean decisions; all other values use continuous random initialization. This argument does not cast the population to an arbitrary requested dtype. For Boolean runs, supply compatible crossover and mutation operators.device (torch.device or None) – Default:
None. Execution device.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.- init_step()#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step()#
Generate offspring and select survivors while preserving their true ranks.
- class evomo.algorithms.OSP_NSDE(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, t_max: int = 100, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the OSP_NSDE population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.t_max (int) – Default:
100. Positive capacity of the population and fitness trajectory buffers, including the initial entry. Keep the number of subsequentstep()calls belowt_maxbecause the current implementation indexes these buffers without wrapping. Larger values increase history storage.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.PESA2(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, div: int = 10, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the PESA2 population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.div (int) – Default:
10. Positive number of grid divisions per objective. More divisions give finer objective-space cells; grid occupancy or grid distance is used during selection.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.PICEAg(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the PICEAg population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.PREA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the PREA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.RVEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, alpha: float = 2.0, fr: float = 0.1, max_gen: int = 100, selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmA tensorized implementation of the Reference Vector Guided Evolutionary Algorithm (RVEA) for multi-objective optimization problems.
- References:
- [1] R. Cheng, Y. Jin, M. Olhofer, and B. Sendhoff, “A reference vector guided evolutionary algorithm
for many-objective optimization,” IEEE Transactions on Evolutionary Computation, vol. 20, no. 5, pp. 773-791, 2016. Available: https://ieeexplore.ieee.org/document/7386636
- [2] Z. Liang, T. Jiang, K. Sun, and R. Cheng, “GPU-accelerated Evolutionary Multiobjective Optimization
Using Tensorized RVEA,” in Proceedings of the Genetic and Evolutionary Computation Conference, ser. GECCO ’24, 2024, pp. 566–575. Available: https://doi.org/10.1145/3638529.3654223
Initialize the RVEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.alpha (float) – Default:
2.0. Exponent in the angle-penalty schedule(gen / max_gen) ** alphaused by reference-vector guided selection. A larger positive exponent delays the growth of angular selection pressure.fr (float) – Default:
0.1. Positive reference-vector adaptation rate. The current implementation adapts everymax(round(1 / fr), 1)steps:0.1means every 10 steps. The interval is independent ofmax_gen.max_gen (int) – Default:
100. Positive generation horizon used to normalize the algorithm’s adaptation schedule. Set it consistently with your run length. It does not stop the workflow; the caller controls the loop.selection_op (Callable or None) – Default:
None. Environmental selection callableselection_op(pop, fit, vectors, theta) -> (pop, fit). The input includes parents and offspring. Return matching decision and fitness tensors on the input device; preserve reference-vector slots, including NaN padding where required.Noneselects EvoMO’sref_vec_guided.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.crossover_op (Callable or None) – Default:
None. Crossover callablecrossover_op(parents) -> offspringreceiving a two-dimensional decision tensor.Noneselects EvoX’ssimulated_binary. Preserve the decision dimension and device, and produce the offspring count expected by this algorithm.device (torch.device or None) – Default:
None. Execution device.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.- init_step()#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step()#
Perform a single optimization step.
- class evomo.algorithms.RVEAa(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, alpha: float = 2.0, fr: float = 0.1, max_gen: int = 100, selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmAn implementation of the Reference Vector Guided Evolutionary Algorithm embedded with the reference vector regeneration strategy (RVEAa) for multi-objective optimization problems.
This class is designed to solve multi-objective optimization problems using a reference vector guided evolutionary algorithm.
- References:
- [1] R. Cheng, Y. Jin, M. Olhofer, and B. Sendhoff, “A reference vector guided evolutionary algorithm
for many-objective optimization,” IEEE Transactions on Evolutionary Computation, vol. 20, no. 5, pp. 773-791, 2016. Available: https://ieeexplore.ieee.org/document/7386636
Initialize the RVEAa population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.alpha (float) – Default:
2.0. Exponent in the angle-penalty schedule(gen / max_gen) ** alphaused by reference-vector guided selection. A larger positive exponent delays the growth of angular selection pressure.fr (float) – Default:
0.1. Positive reference-vector adaptation rate. The current implementation adapts everymax(round(1 / fr), 1)steps:0.1means every 10 steps. The interval is independent ofmax_gen.max_gen (int) – Default:
100. Positive generation horizon used to normalize the algorithm’s adaptation schedule. Set it consistently with your run length. It does not stop the workflow; the caller controls the loop.selection_op (Callable or None) – Default:
None. Environmental selection callableselection_op(pop, fit, vectors, theta) -> (pop, fit). The input includes parents and offspring. Return matching decision and fitness tensors on the input device, preserving reference-vector slots and NaN padding where required.Noneselects EvoMO’sref_vec_guided.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.crossover_op (Callable or None) – Default:
None. Crossover callablecrossover_op(parents) -> offspringreceiving a two-dimensional decision tensor.Noneselects EvoX’ssimulated_binary. Preserve the decision dimension and device, and produce the offspring count expected by this algorithm.device (torch.device or None) – Default:
None. Execution device.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.- init_step()#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step()#
Perform a single optimization step.
- class evomo.algorithms.SIBEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the SIBEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.SMPSO(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the SMPSO population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.SNSGA2(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, sLower: float = 0.1, sUpper: float = 0.9, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the SNSGA2 population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.sLower (float) – Default:
0.1. Lower endpoint of the initial fraction of zero-valued decision components. Use0 <= sLower <= sUpper <= 1. The active count isceil((1 - s) * D)assvaries across the initial population.sUpper (float) – Default:
0.9. Upper endpoint of the initial fraction of zero-valued decision components. Larger values initialize sparser solutions; this is an initialization setting, not a guaranteed sparsity level for subsequent generations.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.SparseEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the SparseEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.SparseEA2(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the SparseEA2 population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.SPEAR(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the SPEAR population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.SSCEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, max_gen: int = 100)#
Bases:
evox.core.AlgorithmInitialize the SSCEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.max_gen (int) – Default:
100. Positive generation horizon used to adapt convergence-archive size and variable perturbation parameters throughgen_counter / max_gen. The caller still controls termination.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.tDEA_CPBI(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the tDEA_CPBI population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.TELSO(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, max_fe: int = 10000, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the TELSO population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.max_fe (int) – Default:
10000. Positive evaluation horizon for the mask-learning ratio and reference-vector angle penalty, using the internalfe / max_feprogress value. It does not enforce termination.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.TensorMOEAD(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, aggregate_op=('pbi', 'pbi'), selection_op: Callable | None = None, mutation_op: Callable | None = None, crossover_op: Callable | None = None, device: torch.device | None = None)#
Bases:
evox.core.AlgorithmTensorMOEA/D
This is a tensorized implementation of the original MOEA/D algorithm, which incorporates GPU acceleration for improved computational performance in solving multi-objective optimization problems.
- References:
- [1] Q. Zhang and H. Li, “MOEA/D: A Multiobjective Evolutionary Algorithm Based on Decomposition,”
IEEE Transactions on Evolutionary Computation, vol. 11, no. 6, pp. 712-731, 2007. Available: https://ieeexplore.ieee.org/document/4358754
- [2] Z. Liang, H. Li, N. Yu, K. Sun, and R. Cheng, “Bridging Evolutionary Multiobjective Optimization and
GPU Acceleration via Tensorization,” IEEE Transactions on Evolutionary Computation, 2025. Available: https://ieeexplore.ieee.org/document/10944658
- Note:
This implementation differs from the original MOEA/D algorithm by incorporating tensorization for GPU acceleration, significantly improving performance for large-scale optimization tasks.
Initialize tensorized MOEA/D with configurable aggregation for two update stages.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.aggregate_op (tuple[str, str]) – Default:
('pbi', 'pbi'). Two aggregation names: the first compares offspring with incumbents, and the second chooses among eligible offspring for a subproblem. Each name must bepbi,tchebycheff,tchebycheff_norm,modified_tchebychefforweighted_sum. These are names, not callables.selection_op (Callable or None) – Default:
None. Accepted and stored, but not called by the current optimization step. Neighborhood parents are shuffled internally, so a custom value has no effect on selection.mutation_op (Callable or None) – Default:
None. Mutation callablemutation_op(offspring, lb, ub) -> mutated_offspring. Input and output are decision tensors of shape(B, D); preserve device and return an appropriate decision dtype.Noneselects EvoX’spolynomial_mutation.crossover_op (Callable or None) – Default:
None. Crossover callablecrossover_op(parents) -> offspring. For each pair of parents, return one child. The step passes2 * Nparents and expectsNoffspring rows. Preserve the decision dimension and device.Noneselects EvoX’ssimulated_binary_half.device (torch.device or None) – Default:
None. Execution device.Noneusestorch.get_default_device(); it does not infer the device from the bounds. Bounds are copied to this device. Passtorch.device('cuda')explicitly for GPU execution.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.The sampled population size must be greater than 10, providing at least two neighborhood parents.
- get_aggregation_function(name: str) Callable#
- init_step()#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step()#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.ThetaDEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the ThetaDEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.TSNSGAII(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, max_fe: int = 10000)#
Bases:
evox.core.AlgorithmInitialize the TSNSGAII population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.max_fe (int) – Default:
10000. Positive evaluation horizon setting the phase boundary atmax_fe // 2. The evaluation counter includes the initial population. This parameter controls the phase switch and does not stop subsequent calls tostep().
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.TSSparseEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the TSSparseEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.Two_Arch2(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the Two_Arch2 population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.VaEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the VaEA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.WASFGA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, point: torch.Tensor = None, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the WASFGA population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.point (torch.Tensor or None) – Default:
None. Preferred point in objective space, with shape(n_objs,)or(1, n_objs).Nonecreates a zero point. Explicit points must be on the bounds’ device with a compatible floating dtype; they are not moved automatically. The point is subtracted from fitness in achievement-scalarizing selection.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Reference-vector sampling can change the requested population size. Read
self.pop.shape[0]for the actual size.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.
- class evomo.algorithms.WOF(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, gamma: int = 10, **kwargs)#
Bases:
evox.core.AlgorithmInitialize the WOF population and optimization state.
- Parameters:
pop_size (int) – Required. Requested number of candidate solutions. Use a positive integer; algorithm-specific minimums and reference-vector sampling are described below.
n_objs (int) – Required. Number of objectives, matching the second dimension of the problem’s objective tensor. Objectives are minimized; this library targets two or more objectives.
lb (torch.Tensor) – Required. Lower decision bounds of shape
(D,), whereDis the number of decision variables. Use floating-point bounds with the same shape, dtype and device asub, andlb <= ubelementwise.ub (torch.Tensor) – Required. Upper decision bounds of shape
(D,). The decision dimension is inferred from the bounds, rather than passed separately. Matchlbin shape, dtype and device.gamma (int) – Default:
10. Positive number of decision-variable groups in weight optimization, also the dimension of its weight vectors. Normally choosegamma <= Dto avoid empty groups. Larger values give more independently weighted groups.kwargs (dict) – Default:
{}. Extra keyword arguments are accepted for constructor compatibility but are not read by this implementation. In particular, passingdevice=...here does not move tensors; place both bounds on the intended device before construction.
Note
Use this algorithm through a workflow that connects the problem’s evaluation method. Call
workflow.init_step()beforeworkflow.step()or compiling the step. The current evaluation path expects an objective tensor of shape(B, n_objs). It does not consume a(fitness, constraint_violation)tuple.Tensor allocation uses
lb.device. There is no explicit device parameter; prepare both bounds on the intended device.- init_step() None#
Evaluate the initial population and initialize algorithm state.
Invoke through
workflow.init_step()before the first optimization step.- Returns:
None; results are stored in algorithm state.
- step() None#
Advance optimization and update population and fitness state in place.
Invoke through
workflow.step()after initialization. The caller controls termination.- Returns:
None; results are stored in algorithm state.