The DTLZ Problem Library
To facilitate testing and comparison with other methods, we provide built-in implementations of the DTLZ problems as ParMOO Simulations and Objectives (with gradients defined).
from parmoo.simulations import dtlz
from parmoo.objectives import dtlz
DTLZ Problems as Simulations
This module contains simulation function implementations of the DTLZ test suite, as described in:
Deb, Thiele, Laumanns, and Zitzler. “Scalable test problems for evolutionary multiobjective optimization” in Evolutionary Multiobjective Optimization, Theoretical Advances and Applications, Ch. 6 (pp. 105–145). Springer-Verlag, London, UK, 2005. Abraham, Jain, and Goldberg (Eds).
When run with default settings, the outputs of dtlz{1-7}_sim
have
been confirmed against the outputs from the corresponding problems
in pymoo
up to 8 decimal places of precision.
Blank and Deb. “pymoo: Multi-Objective Optimization in Python.” IEEE Access 8 (pp. 89497–89509). 2020.
One drawback of the original DTLZ problems is that their global minima (Pareto points) always corresponded to design points that satisfy
x_i = 0.5, for i = number of objectives, …, number of design points
or
x_i = 0, for i = number of objectives, …, number of design points.
This was appropriate for testing evolutionary algorithms, but for many deterministic algorithms, these solutions may represent either the best- or worst-case scenarios.
To make these problems applicable for deterministic algorithms, the solution sets must be configurable offset by a user-specified amount, as proposed in:
Chang. Mathematical Software for Multiobjective Optimization Problems. Ph.D. dissertation, Virginia Tech, Dept. of Computer Science, 2020.
For the problems DTLZ8 and DTLZ9, only objective outputs are given
by the simulation function herein. To fully define the problem, also
use one or more of the corresponding constraint classes included in
parmoo.constraints.dtlz
[NOT YET IMPLEMENTED].
The full list of simulation functions in this module includes the kernel functions:
g1_sim
g2_sim
g3_sim
g4_sim
and the 9 DTLZ problems in simulation form, with each simulation output corresponding to an objective:
dtlz1_sim
dtlz2_sim
dtlz3_sim
dtlz4_sim
dtlz5_sim
dtlz6_sim
dtlz7_sim
dtlz8_sim
dtlz9_sim
- class simulations.dtlz.g1_sim(des, num_obj=3, offset=0.5)
Class defining 1 of 4 kernel functions used in the DTLZ problem suite.
- g1 = 100 ( (n - o + 1) +
sum_{i=o}^n ((x_i - offset)^2 - cos(20pi(x_i - offset))) )
- Contains 2 methods:
__init__(des, num_obj)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the g1 kernel.- __init__(des, num_obj=3, offset=0.5)
Constructor for g1 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used to calculate the value of g1. Note that regardless of the number of objectives, the number of simulation outputs from g1 is always 1.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.5.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.g2_sim(des, num_obj=3, offset=0.5)
Class defining 2 of 4 kernel functions used in the DTLZ problem suite.
g2 = (x_o - offset)^2 + … + (x_n - offset)^2
- Contains 2 methods:
__init__(des)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the g2 problem.- __init__(des, num_obj=3, offset=0.5)
Constructor for g2 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used to calculate the value of g2. Note that regardless of the number of objectives, the number of simulation outputs from g2 is always 1.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.5.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.g3_sim(des, num_obj=3, offset=0.0)
Class defining 3 of 4 kernel functions used in the DTLZ problem suite.
g3 = |x_o - offset|^.1 + … + |x_n - offset|^.1
- Contains 2 methods:
__init__(des)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the g3 problem.- __init__(des, num_obj=3, offset=0.0)
Constructor for g3 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used to calculate the value of g3. Note that regardless of the number of objectives, the number of simulation outputs from g3 is always 1.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.0.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.g4_sim(des, num_obj=3, offset=0.0)
Class defining 4 of 4 kernel functions used in the DTLZ problem suite.
g4 = 1 + (9 * (|x_o - offset| + … + |x_n - offset|) / (n + 1 - o))
- Contains 2 methods:
__init__(des)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the g4 problem.- __init__(des, num_obj=3, offset=0.0)
Constructor for g4 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used to calculate the value of g4. Note that regardless of the number of objectives, the number of simulation outputs from g4 is always 1.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.0.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.dtlz1_sim(des, num_obj=3, offset=0.5)
Class defining the DTLZ1 problem with offset minimizer.
DTLZ1 has a linear Pareto front, with all nondominated points on the hyperplane F_1 + F_2 + … + F_o = 0.5. DTLZ1 has 11^k - 1 “local” Pareto fronts where k = n - o + 1, and 1 “global” Pareto front.
- Contains 2 methods:
__init__(des)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the DTLZ1 problem.- __init__(des, num_obj=3, offset=0.5)
Constructor for DTLZ1 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used as the number of simulation outputs.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.5.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.dtlz2_sim(des, num_obj=3, offset=0.5)
Class defining the DTLZ2 problem with offset minimizer.
DTLZ2 has a concave Pareto front, given by the unit sphere in objective space, restricted to the positive orthant. DTLZ2 has no “local” Pareto fronts, besides the true Pareto front.
- Contains 2 methods:
__init__(des, sim)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the DTLZ2 problem.- __init__(des, num_obj=3, offset=0.5)
Constructor for DTLZ2 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used as the number of simulation outputs.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.5.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.dtlz3_sim(des, num_obj=3, offset=0.5)
Class defining the DTLZ3 problem with offset minimizer.
DTLZ3 has a concave Pareto front, given by the unit sphere in objective space, restricted to the positive orthant. DTLZ3 has 3^k - 1 “local” Pareto fronts where k = n - o + 1, and 1 “global” Pareto front.
- Contains 2 methods:
__init__(des, sim)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the DTLZ3 problem.- __init__(des, num_obj=3, offset=0.5)
Constructor for DTLZ3 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used as the number of simulation outputs.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.5.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.dtlz4_sim(des, num_obj=3, offset=0.5, alpha=100.0)
Class defining the DTLZ4 problem with offset minimizer.
DTLZ4 has a concave Pareto front, given by the unit sphere in objective space, restricted to the positive orthant. DTLZ4 has no “local” Pareto fronts, besides the true Pareto front, but by tuning the optional parameter alpha, one can adjust the solution density, making it harder for MOO algorithms to produce a uniform distribution of solutions.
- Contains 2 methods:
__init__(des, sim)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the DTLZ4 problem.- __init__(des, num_obj=3, offset=0.5, alpha=100.0)
Constructor for DTLZ4 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used as the number of simulation outputs.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.5.
alpha (optional, float or int) – The uniformity parameter used for controlling the uniformity of the distribution of solutions across the Pareto front. Must be greater than or equal to 1. A value of 1 results in DTLZ2. Default value is 100.0.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.dtlz5_sim(des, num_obj=3, offset=0.5)
Class defining the DTLZ5 problem with offset minimizer.
DTLZ5 has a lower-dimensional Pareto front embedded in the objective space, given by an arc of the unit sphere in the positive orthant. DTLZ5 has no “local” Pareto fronts, besides the true Pareto front.
- Contains 2 methods:
__init__(des, sim)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the DTLZ5 problem.- __init__(des, num_obj=3, offset=0.5)
Constructor for DTLZ5 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used as the number of simulation outputs.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.5.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.dtlz6_sim(des, num_obj=3, offset=0.0)
Class defining the DTLZ6 problem with offset minimizer.
DTLZ6 has a lower-dimensional Pareto front embedded in the objective space, given by an arc of the unit sphere in the positive orthant. DTLZ6 has no “local” Pareto fronts, but tends to show very little improvement until the algorithm is very close to its solution set.
- Contains 2 methods:
__init__(des, sim)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the DTLZ6 problem.- __init__(des, num_obj=3, offset=0.0)
Constructor for DTLZ6 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used as the number of simulation outputs.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.0.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.dtlz7_sim(des, num_obj=3, offset=0.0)
Class defining the DTLZ7 problem with offset minimizer.
DTLZ7 has a discontinuous Pareto front, with solutions on the 2^(o-1) discontinuous nondominated regions of the surface:
F_m = o - F_1 (1 + sin(3pi F_1)) - … - F_{o-1} (1 + sin3pi F_{o-1}).
- Contains 2 methods:
__init__(des, sim)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the DTLZ7 problem.- __init__(des, num_obj=3, offset=0.0)
Constructor for DTLZ7 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used as the number of simulation outputs.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.0.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.dtlz8_sim(des, num_obj=3, offset=0.0)
Class defining the DTLZ8 problem with offset minimizer.
DTLZ8 is a constrained MOOP, whose Pareto front combines a region of a plane with a line segment. To fully define DTLZ8, you must also use the parmoo.constraints.dtlz module.
- Contains 2 methods:
__init__(des, sim)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the DTLZ8 problem.- __init__(des, num_obj=3, offset=0.0)
Constructor for DTLZ8 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used as the number of simulation outputs.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.0.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class simulations.dtlz.dtlz9_sim(des, num_obj=3, offset=0.0)
Class defining the DTLZ9 problem with offset minimizer.
DTLZ9 is a constrained MOOP, whose Pareto front is a subregion of the arc traced out by the solution to DTLZ5. To fully define DTLZ8, you must also use the parmoo.constraints.dtlz module.
- Contains 2 methods:
__init__(des, sim)
__call__(x)
The
__init__
method inherits from the sim_func ABC.The
__call__
method performs an evaluation of the DTLZ9 problem.- __init__(des, num_obj=3, offset=0.0)
Constructor for DTLZ9 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
num_obj (int, optional) – The number of objectives, which is used as the number of simulation outputs.
offset (optional, float) – The location of the global minimizers is x_i = offset for i = number of objectives, …, number of design variables. The default value is offset = 0.0.
- __call__(x)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- simulations.dtlz.__check_optionals__(num_obj=3, offset=0.5, alpha=100.0)
Check DTLZ optional inputs for illegal values.
Not recommended for external usage.
DTLZ Problems as Objectives
This module contains objective function implementations of the DTLZ test suite, as described in:
Deb, Thiele, Laumanns, and Zitzler. “Scalable test problems for evolutionary multiobjective optimization” in Evolutionary Multiobjective Optimization, Theoretical Advances and Applications, Ch. 6 (pp. 105–145). Springer-Verlag, London, UK, 2005. Abraham, Jain, and Goldberg (Eds).
Since DTLZ[1-7] depended upon kernel functions (implemented in parmoo.simulations.dtlz), each of these problems is implemented here as an algebraic, differentiable objective, with the kernel function output as an input. The problems DTLZ8 and DTLZ9 do not support this modification, so they are omitted.
TODO: DTLZ5, DTLZ6, and DTLZ7 have not yet been added.
To use this module, first import one or more of the following simulation/kernel functions from parmoo.simulations.dtlz:
g1_sim
g2_sim
g3_sim
g4_sim
- The 7 DTLZ problems included here are:
dtlz1_obj
dtlz2_obj
dtlz3_obj
dtlz4_obj
- class objectives.dtlz.dtlz1_obj(des, sim, obj_ind, num_obj=3)
Class defining the DTLZ1 objectives.
Use this class in combination with the g1_sim() class from the parmoo.simulations.dtlz module
DTLZ1 has a linear Pareto front, with all nondominated points on the hyperplane F_1 + F_2 + … + F_o = 0.5. DTLZ1 has 11^k - 1 “local” Pareto fronts where k = n - m + 1, and 1 “global” Pareto front.
- Contains 2 methods:
__init__(des, sim, obj_ind)
__call__(x, sim, der=0)
The
__init__
method inherits from the obj_func ABC.The
__call__
method performs an evaluation of the DTLZ1 problem.- __init__(des, sim, obj_ind, num_obj=3)
Constructor for DTLZ1 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
sim (list, tuple, or int) – Either the numpy.dtype of the simulation outputs (list or tuple) or the number of simulation outputs (assumed to all be unnamed).
obj_ind (int) – The index of the DTLZ1 objective to return.
num_obj (int, optional) – The number of objectives for this problem. Note that this effects the calculation of the objective value, but still only a single objective output is created per instance of this class. To add all objectives, create num_obj instances with obj_ind = 0, …, num_obj - 1.
- __call__(x, sim, der=0)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
sim (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the corresponding simulation outputs.
der (int, optional) –
Specifies whether to take derivative (and wrt which variables).
der=1: take derivatives wrt x
der=2: take derivatives wrt sim
other: no derivatives
Default value is der=0.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class objectives.dtlz.dtlz2_obj(des, sim, obj_ind, num_obj=3)
Class defining the DTLZ2 objectives.
Use this class in combination with the g2_sim() class from the parmoo.simulations.dtlz module.
DTLZ2 has a concave Pareto front, given by the unit sphere in objective space, restricted to the positive orthant. DTLZ2 has no “local” Pareto fronts, besides the true Pareto front.
- Contains 2 methods:
__init__(des, sim, obj_ind)
__call__(x, sim, der=0)
The
__init__
method inherits from the obj_func ABC.The
__call__
method performs an evaluation of the DTLZ2 problem.- __init__(des, sim, obj_ind, num_obj=3)
Constructor for DTLZ2 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
sim (list, tuple, or int) – Either the numpy.dtype of the simulation outputs (list or tuple) or the number of simulation outputs (assumed to all be unnamed).
obj_ind (int) – The index of the DTLZ2 objective to return.
num_obj (int, optional) – The number of objectives for this problem. Note that this effects the calculation of the objective value, but still only a single objective output is created per instance of this class. To add all objectives, create num_obj instances with obj_ind = 0, …, num_obj - 1.
- __call__(x, sim, der=0)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
sim (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the corresponding simulation outputs.
der (int, optional) –
Specifies whether to take derivative (and wrt which variables).
der=1: take derivatives wrt x
der=2: take derivatives wrt sim
other: no derivatives
Default value is der=0.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class objectives.dtlz.dtlz3_obj(des, sim, obj_ind, num_obj=3)
Class defining the DTLZ3 objectives.
Use this class in combination with the g1_sim() class from the parmoo.simulations.dtlz module.
DTLZ3 has a concave Pareto front, given by the unit sphere in objective space, restricted to the positive orthant. DTLZ3 has 3^k - 1 “local” Pareto fronts where k = n - o + 1, and 1 “global” Pareto front.
- Contains 2 methods:
__init__(des, sim, obj_ind)
__call__(x, sim, der=0)
The
__init__
method inherits from the obj_func ABC.The
__call__
method performs an evaluation of the DTLZ3 problem.- __init__(des, sim, obj_ind, num_obj=3)
Constructor for DTLZ3 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
sim (list, tuple, or int) – Either the numpy.dtype of the simulation outputs (list or tuple) or the number of simulation outputs (assumed to all be unnamed).
obj_ind (int) – The index of the DTLZ3 objective to return.
num_obj (int, optional) – The number of objectives for this problem. Note that this effects the calculation of the objective value, but still only a single objective output is created per instance of this class. To add all objectives, create num_obj instances with obj_ind = 0, …, num_obj - 1.
- __call__(x, sim, der=0)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
sim (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the corresponding simulation outputs.
der (int, optional) –
Specifies whether to take derivative (and wrt which variables).
der=1: take derivatives wrt x
der=2: take derivatives wrt sim
other: no derivatives
Default value is der=0.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray
- class objectives.dtlz.dtlz4_obj(des, sim, obj_ind, num_obj=3, alpha=100.0)
Class defining the DTLZ4 objectives.
Use this class in combination with the g2_sim() class from the parmoo.simulations.dtlz module.
DTLZ4 has a concave Pareto front, given by the unit sphere in objective space, restricted to the positive orthant. DTLZ4 has no “local” Pareto fronts, besides the true Pareto front, but by tuning the optional parameter alpha, one can adjust the solution density, making it harder for MOO algorithms to produce a uniform distribution of solutions.
- Contains 2 methods:
__init__(des, sim, obj_ind)
__call__(x, sim, der=0)
The
__init__
method inherits from the obj_func ABC.The
__call__
method performs an evaluation of the DTLZ4 problem.- __init__(des, sim, obj_ind, num_obj=3, alpha=100.0)
Constructor for DTLZ4 class.
- Parameters:
des (np.dtype or int) – Either the numpy.dtype of the design variables or the number of design variables, assumed to all be continuous and unnamed.
sim (list, tuple, or int) – Either the numpy.dtype of the simulation outputs (list or tuple) or the number of simulation outputs (assumed to all be unnamed).
obj_ind (int) – The index of the DTLZ4 objective to return.
num_obj (int, optional) – The number of objectives for this problem. Note that this effects the calculation of the objective value, but still only a single objective output is created per instance of this class. To add all objectives, create num_obj instances with obj_ind = 0, …, num_obj - 1.
alpha (optional, float or int) – The uniformity parameter used for controlling the uniformity of the distribution of solutions across the Pareto front. Must be greater than or equal to 1. A value of 1 results in DTLZ2. Default value is 100.0.
- __call__(x, sim, der=0)
Define simulation evaluation.
- Parameters:
x (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the design point to evaluate.
sim (numpy.array) – A numpy.ndarray (unnamed) or numpy structured array (named), containing the corresponding simulation outputs.
der (int, optional) –
Specifies whether to take derivative (and wrt which variables).
der=1: take derivatives wrt x
der=2: take derivatives wrt sim
other: no derivatives
Default value is der=0.
- Returns:
The output of this simulation for the input x.
- Return type:
numpy.ndarray