evomo.algorithms.lsmof#
Attributes#
Classes#
Initialize two-phase weight-space optimization and NSGA-II refinement. |
Module Contents#
- class evomo.algorithms.lsmof.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.
- evomo.algorithms.lsmof.algo#