wfg — WFG Problem Collection¶
This module contains the test problems for multiobjective optimization published by the Walking Fish Group (WFG) [Huband2006]. The problems here are a reimplementation of the original C++ code at http://www.wfg.csse.uwa.edu.au/toolkit/ . They are all minimization problems.
-
class
optproblems.wfg.WFG(num_objectives, num_variables, k, **kwargs)¶ The test problem collection WFG as defined in [Huband2006].
This class inherits from
listand fills itself with the nine WFG problems with the chosen configuration. The arguments to the constructor are passed through to the problem classes.References
[Huband2006] (1, 2) Huband, S.; Hingston, P.; Barone, L.; While, L. (2006). A review of multiobjective test problems and a scalable test problem toolkit. IEEE Transactions on Evolutionary Computation, vol.10, no.5, pp. 477-506. -
__init__(num_objectives, num_variables, k, **kwargs)¶ Constructor.
Parameters: - num_objectives (int) – The number of objectives for the optimization problems.
- num_variables (int) – The number of decision variables of the problems.
- k (int) – The number of position related parameters, which are a part
of the phenome. Thus it must hold
k < num_variables. Furthermore, k must be a multiple ofnum_objectives - 1. Huband et al. recommendk = 4for two objectives andk = 2 * (m - 1)for m objectives. - kwargs – Arbitrary keyword arguments, passed through to the constructors of the single WFG problems.
-
-
class
optproblems.wfg.WFGBaseProblem(objective_function, num_objectives, num_variables, k, **kwargs)¶ The base class for WFG problems.
-
get_optimal_solutions(max_number)¶ Return globally optimal or Pareto-optimal solutions.
This is an abstract method. Implementations must be deterministic. In the multi-objective case, the generated solutions should be evenly distributed over the whole Pareto-set.
-
m¶ The number of objective functions.
-
optimal_solution(k, l, pos_params)¶ Create one Pareto-optimal solution with given position parameters.
-
rand_optimal_solution(k, l, rand_generator=None)¶ Generate random position parameters and build optimal solution.
-
Test Problems¶
-
class
optproblems.wfg.WFG1(num_objectives, num_variables, k, **kwargs)¶ The WFG1 problem.
-
class
WFG1Shape¶
-
optimal_solution(k, l, pos_params)¶ Create one Pareto-optimal solution with given position parameters.
-
rand_optimal_solution(k, l, rand_generator=None)¶ Generate random position parameters and build optimal solution.
-
class
-
class
optproblems.wfg.WFG2(num_objectives, num_variables, k, **kwargs)¶ The WFG2 problem.
-
class
WFG2Shape¶
-
class
-
class
optproblems.wfg.WFG3(num_objectives, num_variables, k, **kwargs)¶ The WFG3 problem.
-
class
WFG3Shape¶
-
class
-
class
optproblems.wfg.WFG4(num_objectives, num_variables, k, **kwargs)¶ The WFG4 problem.
-
class
WFG4Shape¶
-
class
-
class
optproblems.wfg.WFG5(num_objectives, num_variables, k, **kwargs)¶ The WFG5 problem.
-
class
optproblems.wfg.WFG6(num_objectives, num_variables, k, **kwargs)¶ The WFG6 problem.
-
class
optproblems.wfg.WFG7(num_objectives, num_variables, k, **kwargs)¶ The WFG7 problem.
Transformation Functions¶
-
optproblems.wfg.b_flat(y, a, b, c)¶ Transformation function.
-
optproblems.wfg.b_param(y, u, a, b, c)¶ Transformation function.
-
optproblems.wfg.b_poly(y, alpha)¶ Transformation function.
-
optproblems.wfg.r_nonsep(y, a)¶ Transformation function.
-
optproblems.wfg.r_sum(y, w)¶ Transformation function.
-
optproblems.wfg.s_decept(y, a, b, c)¶ Transformation function.
-
optproblems.wfg.s_linear(y, a)¶ Transformation function.
-
optproblems.wfg.s_multi(y, a, b, c)¶ Transformation function.
Shape Functions¶
-
optproblems.wfg.concave(x, m)¶ Shape function.
-
optproblems.wfg.convex(x, m)¶ Shape function.
-
optproblems.wfg.disc(x, a, alpha, beta)¶ Shape function.
-
optproblems.wfg.linear(x, m)¶ Shape function.
-
optproblems.wfg.mixed(x, a, alpha)¶ Shape function.
Helper Functions¶
-
optproblems.wfg.calculate_f(d, x, h, s)¶ Helper function.
-
optproblems.wfg.correct_to_01(a, epsilon=1e-10)¶ Sets values in [-epsilon, 0] to 0 and in [1, 1 + epsilon] to 1.
Assumption is that these deviations result from rounding errors.
-
optproblems.wfg.shape_args_ok(x, m)¶ Helper function.
-
optproblems.wfg.vector_in_01(x)¶ Returns True if all elements are in [0, 1].