evox.operators.selection.rvea_selection
¶
Module Contents¶
Functions¶
Compute the APD (Angle-Penalized Distance) based on the given inputs. |
|
Perform the Reference Vector Guided Evolutionary Algorithm (RVEA) selection process. |
API¶
- evox.operators.selection.rvea_selection.apd_fn(x: torch.Tensor, y: torch.Tensor, z: torch.Tensor, obj: torch.Tensor, theta: torch.Tensor)[source]¶
Compute the APD (Angle-Penalized Distance) based on the given inputs.
- Parameters:
x – A tensor representing the indices of the partition.
y – A tensor representing the gamma.
z – A tensor representing the angle.
obj – A tensor of shape (n, m) representing the objectives of the solutions.
theta – A tensor representing the parameter theta used for scaling the reference vector.
- Returns:
A tensor containing the APD values for each solution.
- evox.operators.selection.rvea_selection.ref_vec_guided(x: torch.Tensor, f: torch.Tensor, v: torch.Tensor, theta: torch.Tensor)[source]¶
Perform the Reference Vector Guided Evolutionary Algorithm (RVEA) selection process.
This function selects solutions based on the Reference Vector Guided Evolutionary Algorithm. It calculates the distances and angles between solutions and reference vectors, and returns the next set of solutions to be evolved.
- Parameters:
x – A tensor of shape (n, d) representing the current population solutions.
f – A tensor of shape (n, m) representing the objective values for each solution.
v – A tensor of shape (r, m) representing the reference vectors.
theta – A tensor representing the parameter theta used in the APD calculation.
- Returns:
A tuple containing:
next_x: The next selected solutions.
next_f: The objective values of the next selected solutions.
Note
The function computes the distances between the solutions and reference vectors, and selects the solutions with the minimum APD. It currently uses a suboptimal selection implementation, and future improvements will optimize the process using a
segment_sort
orsegment_argmin
in CUDA.