evomo.algorithms.moead_du#
Attributes#
Classes#
Initialize the MOEADDU population and optimization state. |
Module Contents#
- class evomo.algorithms.moead_du.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.
- evomo.algorithms.moead_du.algo#