evomo.algorithms.commea#

Attributes#

Classes#

CoMMEA

Initialize the CoMMEA population and optimization state.

Module Contents#

class evomo.algorithms.commea.CoMMEA(pop_size: int, n_objs: int, lb: torch.Tensor, ub: torch.Tensor, eps: float = 0.2, **kwargs)#

Bases: evox.core.Algorithm

Initialize 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,), where D is the number of decision variables. Use floating-point bounds with the same shape, dtype and device as ub, and lb <= ub elementwise.

  • ub (torch.Tensor) – Required. Upper decision bounds of shape (D,). The decision dimension is inferred from the bounds, rather than passed separately. Match lb in 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 by eMOEA; 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, passing device=... 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() before workflow.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.

evomo.algorithms.commea.algo#