src.environment.problem.MOO.MOO_synthetic.wfg_torch

Module Contents

Classes

WFG_Torch

Introduction

A PyTorch version of the WFG test suite for multi-objective optimization problems.

WFG1_Torch

WFG2_Torch

WFG3_Torch

WFG4_Torch

WFG5_Torch

WFG6_Torch

WFG7_Torch

WFG8_Torch

WFG9_Torch

Functions

crtup

Introduction

Generates a set of uniformly distributed reference points (weight vectors) for a given number of objectives. This function is typically used in multi-objective optimization algorithms such as NSGA-III and RVEA, where reference points are required to guide the selection process.

find_non_dominated_indices

Introduction

Find the indices of non-dominated solutions in a population.

A solution is said to be non-dominated if no other solution in the population dominates it. This function performs a pairwise comparison between all solutions.

convex

mixed

linear

s_linear

b_flat

b_poly

r_sum

disc

_transformation_shift_linear

_transformation_shift_deceptive

_transformation_shift_multi_modal

_transformation_bias_flat

_transformation_bias_poly

_transformation_param_dependent

_transformation_param_deceptive

_reduction_weighted_sum

_reduction_weighted_sum_uniform

_reduction_non_sep

_shape_concave

_shape_convex

_shape_linear

_shape_mixed

_shape_disconnected

validate_wfg2_wfg3

correct_to_01

API

src.environment.problem.MOO.MOO_synthetic.wfg_torch.crtup(n_obj, n_ref_points=1000)[source]

Introduction

Generates a set of uniformly distributed reference points (weight vectors) for a given number of objectives. This function is typically used in multi-objective optimization algorithms such as NSGA-III and RVEA, where reference points are required to guide the selection process.

Args:

  • n_obj (int): Number of objectives (i.e., the dimensionality of the reference points).

  • n_ref_points (int): Approximate number of desired reference points (default: 1000).

Returns:

  • W (np.ndarray): A 2D array of shape (n_comb, n_obj) representing the generated reference vectors.

  • n_comb (int): Actual number of generated reference vectors.

src.environment.problem.MOO.MOO_synthetic.wfg_torch.find_non_dominated_indices(Point)[source]

Introduction

Find the indices of non-dominated solutions in a population.

A solution is said to be non-dominated if no other solution in the population dominates it. This function performs a pairwise comparison between all solutions.

Args:

  • Point (np.ndarray): A 2D array of shape (n_points, n_objectives), where each row represents the objective values of a solution.

Returns:

  • non_dominated_indices (np.ndarray): Indices of the non-dominated solutions.

class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch(n_var, n_obj, k=None, l=None, **kwargs)[source]

Bases: src.environment.problem.basic_problem.Basic_Problem_Torch

Introduction

A PyTorch version of the WFG test suite for multi-objective optimization problems.

Initialization

validate(l, k, n_obj)[source]
_post(t, a)[source]
_calculate(x, s, h)[source]
_rand_optimal_position(n)[source]
_positional_to_optimal(K)[source]
__str__()[source]
class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG1_Torch(n_var, n_obj, k=None, l=None, **kwargs)[source]

Bases: src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch

static t1(x, n, k)[source]
static t2(x, n, k)[source]
static t3(x, n)[source]
static t4(x, m, n, k)[source]
func(x, *args, **kwargs)[source]
get_ref_set(n_ref_points=1000)[source]
class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG2_Torch(n_var, n_obj, k=None, l=None, **kwargs)[source]

Bases: src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch

validate(l, k, n_obj)[source]
static t2(x, n, k)[source]
static t3(x, m, n, k)[source]
func(x, *args, **kwargs)[source]
get_ref_set(n_ref_points=1000)[source]
class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG3_Torch(n_var, n_obj, k=None, **kwargs)[source]

Bases: src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch

validate(l, k, n_obj)[source]
func(x, *args, **kwargs)[source]
get_ref_set(n_ref_points=1000)[source]
class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG4_Torch(n_var, n_obj, k=None, l=None, **kwargs)[source]

Bases: src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch

static t1(x)[source]
static t2(x, m, k)[source]
func(x, *args, **kwargs)[source]
get_ref_set(n_ref_points=1000)[source]
class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG5_Torch(n_var, n_obj, k=None, l=None, **kwargs)[source]

Bases: src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch

static t1(x)[source]
func(x, *args, **kwargs)[source]
get_ref_set(n_ref_points=1000)[source]
class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG6_Torch(n_var, n_obj, k=None, l=None, **kwargs)[source]

Bases: src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch

static t2(x, m, n, k)[source]
func(x, *args, **kwargs)[source]
get_ref_set(n_ref_points=1000)[source]
class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG7_Torch(n_var, n_obj, k=None, l=None, **kwargs)[source]

Bases: src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch

static t1(x, k)[source]
func(x, *args, **kwargs)[source]
get_ref_set(n_ref_points=1000)[source]
class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG8_Torch(n_var, n_obj, k=None, l=None, **kwargs)[source]

Bases: src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch

static t1(x, n, k)[source]
func(x, *args, **kwargs)[source]
_positional_to_optimal(K)[source]
get_ref_set(n_ref_points=1000)[source]
class src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG9_Torch(n_var, n_obj, k=None, l=None, **kwargs)[source]

Bases: src.environment.problem.MOO.MOO_synthetic.wfg_torch.WFG_Torch

static t1(x, n)[source]
static t2(x, n, k)[source]
static t3(x, m, n, k)[source]
func(x, *args, **kwargs)[source]
_positional_to_optimal(K)[source]
get_ref_set(n_ref_points=1000)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.convex(x)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.mixed(x)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.linear(x)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.s_linear(x, A)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.b_flat(x, A, B, C)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.b_poly(x, a)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.r_sum(x, w)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.disc(x)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._transformation_shift_linear(value, shift=0.35)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._transformation_shift_deceptive(y, A=0.35, B=0.005, C=0.05)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._transformation_shift_multi_modal(y, A, B, C)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._transformation_bias_flat(y, a, b, c)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._transformation_bias_poly(y, alpha)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._transformation_param_dependent(y, y_deg, A=0.98 / 49.98, B=0.02, C=50.0)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._transformation_param_deceptive(y, A=0.35, B=0.001, C=0.05)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._reduction_weighted_sum(y, w)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._reduction_weighted_sum_uniform(y)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._reduction_non_sep(y, A)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._shape_concave(x, m)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._shape_convex(x, m)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._shape_linear(x, m)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._shape_mixed(x, A=5.0, alpha=1.0)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch._shape_disconnected(x, alpha=1.0, beta=1.0, A=5.0)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.validate_wfg2_wfg3(l)[source]
src.environment.problem.MOO.MOO_synthetic.wfg_torch.correct_to_01(X, epsilon=1e-10)[source]