pymoo 0.6.1.5.dev0__cp310-cp310-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pymoo might be problematic. Click here for more details.
- pymoo/__init__.py +3 -0
- pymoo/algorithms/__init__.py +0 -0
- pymoo/algorithms/base/__init__.py +0 -0
- pymoo/algorithms/base/bracket.py +38 -0
- pymoo/algorithms/base/genetic.py +109 -0
- pymoo/algorithms/base/line.py +62 -0
- pymoo/algorithms/base/local.py +39 -0
- pymoo/algorithms/base/meta.py +79 -0
- pymoo/algorithms/hyperparameters.py +89 -0
- pymoo/algorithms/moo/__init__.py +0 -0
- pymoo/algorithms/moo/age.py +310 -0
- pymoo/algorithms/moo/age2.py +194 -0
- pymoo/algorithms/moo/ctaea.py +298 -0
- pymoo/algorithms/moo/dnsga2.py +76 -0
- pymoo/algorithms/moo/kgb.py +446 -0
- pymoo/algorithms/moo/moead.py +183 -0
- pymoo/algorithms/moo/nsga2.py +113 -0
- pymoo/algorithms/moo/nsga3.py +358 -0
- pymoo/algorithms/moo/pinsga2.py +370 -0
- pymoo/algorithms/moo/rnsga2.py +188 -0
- pymoo/algorithms/moo/rnsga3.py +246 -0
- pymoo/algorithms/moo/rvea.py +214 -0
- pymoo/algorithms/moo/sms.py +195 -0
- pymoo/algorithms/moo/spea2.py +190 -0
- pymoo/algorithms/moo/unsga3.py +47 -0
- pymoo/algorithms/soo/__init__.py +0 -0
- pymoo/algorithms/soo/convex/__init__.py +0 -0
- pymoo/algorithms/soo/nonconvex/__init__.py +0 -0
- pymoo/algorithms/soo/nonconvex/brkga.py +161 -0
- pymoo/algorithms/soo/nonconvex/cmaes.py +554 -0
- pymoo/algorithms/soo/nonconvex/de.py +279 -0
- pymoo/algorithms/soo/nonconvex/direct.py +149 -0
- pymoo/algorithms/soo/nonconvex/es.py +203 -0
- pymoo/algorithms/soo/nonconvex/g3pcx.py +94 -0
- pymoo/algorithms/soo/nonconvex/ga.py +93 -0
- pymoo/algorithms/soo/nonconvex/ga_niching.py +223 -0
- pymoo/algorithms/soo/nonconvex/isres.py +74 -0
- pymoo/algorithms/soo/nonconvex/nelder.py +251 -0
- pymoo/algorithms/soo/nonconvex/optuna.py +80 -0
- pymoo/algorithms/soo/nonconvex/pattern.py +183 -0
- pymoo/algorithms/soo/nonconvex/pso.py +399 -0
- pymoo/algorithms/soo/nonconvex/pso_ep.py +297 -0
- pymoo/algorithms/soo/nonconvex/random_search.py +25 -0
- pymoo/algorithms/soo/nonconvex/sres.py +56 -0
- pymoo/algorithms/soo/univariate/__init__.py +0 -0
- pymoo/algorithms/soo/univariate/backtracking.py +59 -0
- pymoo/algorithms/soo/univariate/exp.py +46 -0
- pymoo/algorithms/soo/univariate/golden.py +65 -0
- pymoo/algorithms/soo/univariate/quadr_interp.py +81 -0
- pymoo/algorithms/soo/univariate/wolfe.py +163 -0
- pymoo/config.py +33 -0
- pymoo/constraints/__init__.py +3 -0
- pymoo/constraints/adaptive.py +62 -0
- pymoo/constraints/as_obj.py +56 -0
- pymoo/constraints/as_penalty.py +41 -0
- pymoo/constraints/eps.py +26 -0
- pymoo/constraints/from_bounds.py +36 -0
- pymoo/core/__init__.py +0 -0
- pymoo/core/algorithm.py +394 -0
- pymoo/core/callback.py +38 -0
- pymoo/core/crossover.py +77 -0
- pymoo/core/decision_making.py +102 -0
- pymoo/core/decomposition.py +76 -0
- pymoo/core/duplicate.py +163 -0
- pymoo/core/evaluator.py +116 -0
- pymoo/core/indicator.py +34 -0
- pymoo/core/individual.py +784 -0
- pymoo/core/infill.py +64 -0
- pymoo/core/initialization.py +42 -0
- pymoo/core/mating.py +39 -0
- pymoo/core/meta.py +21 -0
- pymoo/core/mixed.py +165 -0
- pymoo/core/mutation.py +44 -0
- pymoo/core/operator.py +40 -0
- pymoo/core/parameters.py +134 -0
- pymoo/core/plot.py +210 -0
- pymoo/core/population.py +180 -0
- pymoo/core/problem.py +460 -0
- pymoo/core/recorder.py +99 -0
- pymoo/core/repair.py +23 -0
- pymoo/core/replacement.py +96 -0
- pymoo/core/result.py +52 -0
- pymoo/core/sampling.py +43 -0
- pymoo/core/selection.py +61 -0
- pymoo/core/solution.py +10 -0
- pymoo/core/survival.py +103 -0
- pymoo/core/termination.py +70 -0
- pymoo/core/variable.py +399 -0
- pymoo/cython/__init__.py +0 -0
- pymoo/cython/calc_perpendicular_distance.cpython-310-darwin.so +0 -0
- pymoo/cython/calc_perpendicular_distance.pyx +67 -0
- pymoo/cython/decomposition.cpython-310-darwin.so +0 -0
- pymoo/cython/decomposition.pyx +165 -0
- pymoo/cython/hv.cpython-310-darwin.so +0 -0
- pymoo/cython/hv.pyx +18 -0
- pymoo/cython/info.cpython-310-darwin.so +0 -0
- pymoo/cython/info.pyx +5 -0
- pymoo/cython/mnn.cpython-310-darwin.so +0 -0
- pymoo/cython/mnn.pyx +273 -0
- pymoo/cython/non_dominated_sorting.cpython-310-darwin.so +0 -0
- pymoo/cython/non_dominated_sorting.pyx +645 -0
- pymoo/cython/pruning_cd.cpython-310-darwin.so +0 -0
- pymoo/cython/pruning_cd.pyx +197 -0
- pymoo/cython/stochastic_ranking.cpython-310-darwin.so +0 -0
- pymoo/cython/stochastic_ranking.pyx +49 -0
- pymoo/cython/utils.pxd +129 -0
- pymoo/cython/vendor/__init__.py +0 -0
- pymoo/cython/vendor/hypervolume.cpp +1621 -0
- pymoo/cython/vendor/hypervolume.h +63 -0
- pymoo/decomposition/__init__.py +0 -0
- pymoo/decomposition/aasf.py +24 -0
- pymoo/decomposition/asf.py +10 -0
- pymoo/decomposition/pbi.py +13 -0
- pymoo/decomposition/perp_dist.py +13 -0
- pymoo/decomposition/tchebicheff.py +11 -0
- pymoo/decomposition/util.py +13 -0
- pymoo/decomposition/weighted_sum.py +8 -0
- pymoo/docs.py +187 -0
- pymoo/experimental/__init__.py +0 -0
- pymoo/experimental/algorithms/__init__.py +0 -0
- pymoo/experimental/algorithms/gde3.py +57 -0
- pymoo/gradient/__init__.py +21 -0
- pymoo/gradient/automatic.py +57 -0
- pymoo/gradient/grad_autograd.py +105 -0
- pymoo/gradient/grad_complex.py +35 -0
- pymoo/gradient/grad_jax.py +51 -0
- pymoo/gradient/toolbox/__init__.py +6 -0
- pymoo/indicators/__init__.py +0 -0
- pymoo/indicators/distance_indicator.py +55 -0
- pymoo/indicators/gd.py +7 -0
- pymoo/indicators/gd_plus.py +7 -0
- pymoo/indicators/hv/__init__.py +63 -0
- pymoo/indicators/hv/exact.py +71 -0
- pymoo/indicators/hv/exact_2d.py +102 -0
- pymoo/indicators/hv/monte_carlo.py +74 -0
- pymoo/indicators/igd.py +7 -0
- pymoo/indicators/igd_plus.py +7 -0
- pymoo/indicators/kktpm.py +151 -0
- pymoo/indicators/migd.py +55 -0
- pymoo/indicators/rmetric.py +203 -0
- pymoo/indicators/spacing.py +52 -0
- pymoo/mcdm/__init__.py +0 -0
- pymoo/mcdm/compromise_programming.py +19 -0
- pymoo/mcdm/high_tradeoff.py +40 -0
- pymoo/mcdm/pseudo_weights.py +32 -0
- pymoo/operators/__init__.py +0 -0
- pymoo/operators/control.py +187 -0
- pymoo/operators/crossover/__init__.py +0 -0
- pymoo/operators/crossover/binx.py +45 -0
- pymoo/operators/crossover/dex.py +122 -0
- pymoo/operators/crossover/erx.py +162 -0
- pymoo/operators/crossover/expx.py +51 -0
- pymoo/operators/crossover/hux.py +37 -0
- pymoo/operators/crossover/nox.py +13 -0
- pymoo/operators/crossover/ox.py +84 -0
- pymoo/operators/crossover/pcx.py +82 -0
- pymoo/operators/crossover/pntx.py +49 -0
- pymoo/operators/crossover/sbx.py +125 -0
- pymoo/operators/crossover/spx.py +5 -0
- pymoo/operators/crossover/ux.py +20 -0
- pymoo/operators/mutation/__init__.py +0 -0
- pymoo/operators/mutation/bitflip.py +17 -0
- pymoo/operators/mutation/gauss.py +58 -0
- pymoo/operators/mutation/inversion.py +42 -0
- pymoo/operators/mutation/nom.py +7 -0
- pymoo/operators/mutation/pm.py +94 -0
- pymoo/operators/mutation/rm.py +23 -0
- pymoo/operators/repair/__init__.py +0 -0
- pymoo/operators/repair/bounce_back.py +32 -0
- pymoo/operators/repair/bounds_repair.py +95 -0
- pymoo/operators/repair/inverse_penalty.py +89 -0
- pymoo/operators/repair/rounding.py +18 -0
- pymoo/operators/repair/to_bound.py +31 -0
- pymoo/operators/repair/vtype.py +11 -0
- pymoo/operators/sampling/__init__.py +0 -0
- pymoo/operators/sampling/lhs.py +73 -0
- pymoo/operators/sampling/rnd.py +50 -0
- pymoo/operators/selection/__init__.py +0 -0
- pymoo/operators/selection/rnd.py +72 -0
- pymoo/operators/selection/tournament.py +76 -0
- pymoo/operators/survival/__init__.py +0 -0
- pymoo/operators/survival/rank_and_crowding/__init__.py +1 -0
- pymoo/operators/survival/rank_and_crowding/classes.py +209 -0
- pymoo/operators/survival/rank_and_crowding/metrics.py +208 -0
- pymoo/optimize.py +72 -0
- pymoo/problems/__init__.py +157 -0
- pymoo/problems/dyn.py +47 -0
- pymoo/problems/dynamic/__init__.py +0 -0
- pymoo/problems/dynamic/cec2015.py +108 -0
- pymoo/problems/dynamic/df.py +452 -0
- pymoo/problems/dynamic/misc.py +167 -0
- pymoo/problems/functional.py +48 -0
- pymoo/problems/many/__init__.py +5 -0
- pymoo/problems/many/cdtlz.py +159 -0
- pymoo/problems/many/dcdtlz.py +88 -0
- pymoo/problems/many/dtlz.py +264 -0
- pymoo/problems/many/wfg.py +550 -0
- pymoo/problems/multi/__init__.py +14 -0
- pymoo/problems/multi/bnh.py +34 -0
- pymoo/problems/multi/carside.py +48 -0
- pymoo/problems/multi/clutch.py +104 -0
- pymoo/problems/multi/csi.py +55 -0
- pymoo/problems/multi/ctp.py +198 -0
- pymoo/problems/multi/dascmop.py +213 -0
- pymoo/problems/multi/kursawe.py +25 -0
- pymoo/problems/multi/modact.py +68 -0
- pymoo/problems/multi/mw.py +400 -0
- pymoo/problems/multi/omnitest.py +48 -0
- pymoo/problems/multi/osy.py +32 -0
- pymoo/problems/multi/srn.py +28 -0
- pymoo/problems/multi/sympart.py +94 -0
- pymoo/problems/multi/tnk.py +24 -0
- pymoo/problems/multi/truss2d.py +83 -0
- pymoo/problems/multi/welded_beam.py +41 -0
- pymoo/problems/multi/wrm.py +36 -0
- pymoo/problems/multi/zdt.py +151 -0
- pymoo/problems/multi_to_single.py +22 -0
- pymoo/problems/single/__init__.py +12 -0
- pymoo/problems/single/ackley.py +24 -0
- pymoo/problems/single/cantilevered_beam.py +34 -0
- pymoo/problems/single/flowshop_scheduling.py +112 -0
- pymoo/problems/single/g.py +874 -0
- pymoo/problems/single/griewank.py +18 -0
- pymoo/problems/single/himmelblau.py +15 -0
- pymoo/problems/single/knapsack.py +48 -0
- pymoo/problems/single/mopta08.py +26 -0
- pymoo/problems/single/multimodal.py +20 -0
- pymoo/problems/single/pressure_vessel.py +30 -0
- pymoo/problems/single/rastrigin.py +20 -0
- pymoo/problems/single/rosenbrock.py +22 -0
- pymoo/problems/single/schwefel.py +18 -0
- pymoo/problems/single/simple.py +13 -0
- pymoo/problems/single/sphere.py +19 -0
- pymoo/problems/single/traveling_salesman.py +79 -0
- pymoo/problems/single/zakharov.py +19 -0
- pymoo/problems/static.py +14 -0
- pymoo/problems/util.py +42 -0
- pymoo/problems/zero_to_one.py +27 -0
- pymoo/termination/__init__.py +23 -0
- pymoo/termination/collection.py +12 -0
- pymoo/termination/cv.py +48 -0
- pymoo/termination/default.py +45 -0
- pymoo/termination/delta.py +64 -0
- pymoo/termination/fmin.py +16 -0
- pymoo/termination/ftol.py +144 -0
- pymoo/termination/indicator.py +49 -0
- pymoo/termination/max_eval.py +14 -0
- pymoo/termination/max_gen.py +15 -0
- pymoo/termination/max_time.py +20 -0
- pymoo/termination/robust.py +34 -0
- pymoo/termination/xtol.py +33 -0
- pymoo/util/__init__.py +0 -0
- pymoo/util/archive.py +150 -0
- pymoo/util/cache.py +29 -0
- pymoo/util/clearing.py +82 -0
- pymoo/util/display/__init__.py +0 -0
- pymoo/util/display/column.py +52 -0
- pymoo/util/display/display.py +34 -0
- pymoo/util/display/multi.py +96 -0
- pymoo/util/display/output.py +53 -0
- pymoo/util/display/progress.py +54 -0
- pymoo/util/display/single.py +67 -0
- pymoo/util/dominator.py +67 -0
- pymoo/util/function_loader.py +129 -0
- pymoo/util/hv.py +23 -0
- pymoo/util/matlab_engine.py +39 -0
- pymoo/util/misc.py +460 -0
- pymoo/util/mnn.py +70 -0
- pymoo/util/nds/__init__.py +0 -0
- pymoo/util/nds/dominance_degree_non_dominated_sort.py +159 -0
- pymoo/util/nds/efficient_non_dominated_sort.py +152 -0
- pymoo/util/nds/fast_non_dominated_sort.py +70 -0
- pymoo/util/nds/naive_non_dominated_sort.py +36 -0
- pymoo/util/nds/non_dominated_sorting.py +67 -0
- pymoo/util/nds/tree_based_non_dominated_sort.py +133 -0
- pymoo/util/normalization.py +312 -0
- pymoo/util/optimum.py +42 -0
- pymoo/util/plotting.py +177 -0
- pymoo/util/pruning_cd.py +89 -0
- pymoo/util/randomized_argsort.py +60 -0
- pymoo/util/ref_dirs/__init__.py +24 -0
- pymoo/util/ref_dirs/construction.py +88 -0
- pymoo/util/ref_dirs/das_dennis.py +52 -0
- pymoo/util/ref_dirs/energy.py +319 -0
- pymoo/util/ref_dirs/energy_layer.py +119 -0
- pymoo/util/ref_dirs/genetic_algorithm.py +63 -0
- pymoo/util/ref_dirs/incremental.py +68 -0
- pymoo/util/ref_dirs/misc.py +128 -0
- pymoo/util/ref_dirs/optimizer.py +59 -0
- pymoo/util/ref_dirs/performance.py +162 -0
- pymoo/util/ref_dirs/reduction.py +85 -0
- pymoo/util/ref_dirs/sample_and_map.py +24 -0
- pymoo/util/reference_direction.py +260 -0
- pymoo/util/remote.py +55 -0
- pymoo/util/roulette.py +27 -0
- pymoo/util/running_metric.py +128 -0
- pymoo/util/sliding_window.py +25 -0
- pymoo/util/stochastic_ranking.py +32 -0
- pymoo/util/value_functions.py +719 -0
- pymoo/util/vectors.py +40 -0
- pymoo/util/vf_dominator.py +99 -0
- pymoo/vendor/__init__.py +0 -0
- pymoo/vendor/cec2018.py +398 -0
- pymoo/vendor/gta.py +617 -0
- pymoo/vendor/hv.py +267 -0
- pymoo/vendor/vendor_cmaes.py +412 -0
- pymoo/vendor/vendor_coco.py +81 -0
- pymoo/vendor/vendor_scipy.py +232 -0
- pymoo/version.py +1 -0
- pymoo/visualization/__init__.py +8 -0
- pymoo/visualization/fitness_landscape.py +127 -0
- pymoo/visualization/heatmap.py +123 -0
- pymoo/visualization/pcp.py +120 -0
- pymoo/visualization/petal.py +91 -0
- pymoo/visualization/radar.py +108 -0
- pymoo/visualization/radviz.py +68 -0
- pymoo/visualization/scatter.py +150 -0
- pymoo/visualization/star_coordinate.py +75 -0
- pymoo/visualization/util.py +123 -0
- pymoo/visualization/video/__init__.py +0 -0
- pymoo/visualization/video/callback_video.py +82 -0
- pymoo/visualization/video/one_var_one_obj.py +57 -0
- pymoo/visualization/video/two_var_one_obj.py +62 -0
- pymoo-0.6.1.5.dev0.dist-info/METADATA +187 -0
- pymoo-0.6.1.5.dev0.dist-info/RECORD +328 -0
- pymoo-0.6.1.5.dev0.dist-info/WHEEL +6 -0
- pymoo-0.6.1.5.dev0.dist-info/licenses/LICENSE +191 -0
- pymoo-0.6.1.5.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,874 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The G problems were originally defined at a CEC competition in 2006:
|
|
3
|
+
Liang, Jing J., Thomas Philip Runarsson, Efrén Mezura-Montes, Maurice Clerc, Ponnuthurai Nagaratnam Suganthan, Carlos A. Coello Coello, and Kalyanmoy Deb.
|
|
4
|
+
Problem Definitions and Evaluation Criteria for the CEC 2006 Special Session on Constrained Real-Parameter Optimization.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import math
|
|
8
|
+
|
|
9
|
+
import numpy as np
|
|
10
|
+
|
|
11
|
+
import pymoo.gradient.toolbox as anp
|
|
12
|
+
from pymoo.core.problem import Problem
|
|
13
|
+
from pymoo.util.misc import at_least_2d_array
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class G(Problem):
|
|
17
|
+
|
|
18
|
+
def _calc_pareto_front(self):
|
|
19
|
+
ps = at_least_2d_array(self._calc_pareto_set(), extend_as="r")
|
|
20
|
+
return self.evaluate(ps, return_as_dictionary=True)["F"].min(axis=0)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class G1(G):
|
|
24
|
+
def __init__(self):
|
|
25
|
+
n_var = 13
|
|
26
|
+
xl = np.zeros(n_var, dtype=float)
|
|
27
|
+
xu = np.array([1, 1, 1, 1, 1, 1, 1, 1, 1, 100, 100, 100, 1], dtype=float)
|
|
28
|
+
super().__init__(n_var=n_var, n_obj=1, n_ieq_constr=9, xl=xl, xu=xu, vtype=float)
|
|
29
|
+
|
|
30
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
31
|
+
x1 = x[:, 0: 4]
|
|
32
|
+
x2 = x[:, 4: 13]
|
|
33
|
+
|
|
34
|
+
f = 5 * x1.sum(axis=1) - 5 * (x1 ** 2).sum(axis=1) - x2.sum(axis=1)
|
|
35
|
+
|
|
36
|
+
# Constraints
|
|
37
|
+
g1 = 2 * x[:, 0] + 2 * x[:, 1] + x[:, 9] + x[:, 10] - 10
|
|
38
|
+
g2 = 2 * x[:, 0] + 2 * x[:, 2] + x[:, 9] + x[:, 11] - 10
|
|
39
|
+
g3 = 2 * x[:, 1] + 2 * x[:, 2] + x[:, 10] + x[:, 11] - 10
|
|
40
|
+
g4 = -8 * x[:, 0] + x[:, 9]
|
|
41
|
+
g5 = -8 * x[:, 1] + x[:, 10]
|
|
42
|
+
g6 = -8 * x[:, 2] + x[:, 11]
|
|
43
|
+
g7 = -2 * x[:, 3] - x[:, 4] + x[:, 9]
|
|
44
|
+
g8 = -2 * x[:, 5] - x[:, 6] + x[:, 10]
|
|
45
|
+
g9 = -2 * x[:, 7] - x[:, 8] + x[:, 11]
|
|
46
|
+
|
|
47
|
+
out["F"] = f
|
|
48
|
+
out["G"] = [g1, g2, g3, g4, g5, g6, g7, g8, g9]
|
|
49
|
+
|
|
50
|
+
def _calc_pareto_front(self):
|
|
51
|
+
return -15.0
|
|
52
|
+
|
|
53
|
+
def _calc_pareto_set(self):
|
|
54
|
+
return np.array([1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1], dtype=float)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class G2(G):
|
|
58
|
+
def __init__(self, n_var=20):
|
|
59
|
+
xl = np.full(n_var, 1e-16)
|
|
60
|
+
xu = 10 * np.ones(n_var)
|
|
61
|
+
super().__init__(n_var=n_var, n_obj=1, n_ieq_constr=2, xl=xl, xu=xu, vtype=float)
|
|
62
|
+
|
|
63
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
64
|
+
a = anp.sum(anp.cos(x) ** 4, axis=1)
|
|
65
|
+
b = 2 * anp.prod(anp.cos(x) ** 2, axis=1)
|
|
66
|
+
|
|
67
|
+
sum_jx = 0.0
|
|
68
|
+
for j in range(self.n_var):
|
|
69
|
+
sum_jx = sum_jx + (j + 1) * x[:, j] ** 2
|
|
70
|
+
|
|
71
|
+
c = anp.sqrt(sum_jx) + (sum_jx == 0) * 1e-64
|
|
72
|
+
f = -anp.absolute((a - b) / c)
|
|
73
|
+
|
|
74
|
+
# Constraints
|
|
75
|
+
g1 = -anp.prod(x, 1) + 0.75
|
|
76
|
+
g2 = anp.sum(x, axis=1) - 7.5 * self.n_var
|
|
77
|
+
|
|
78
|
+
out["F"] = f
|
|
79
|
+
out["G"] = anp.column_stack([g1, g2])
|
|
80
|
+
|
|
81
|
+
def _calc_pareto_set(self):
|
|
82
|
+
if self.n_var == 2:
|
|
83
|
+
return np.array([1.600859, 0.4684985])
|
|
84
|
+
elif self.n_var == 10:
|
|
85
|
+
return np.array([3.1238477, 3.0690696, 3.0139085, 2.9572856, 1.4654789, 0.3684877, 0.3633289, 0.3592627,
|
|
86
|
+
0.3547453, 0.3510025])
|
|
87
|
+
|
|
88
|
+
# the version of the paper with 20 variables
|
|
89
|
+
elif self.n_var == 20:
|
|
90
|
+
return np.array([3.16246061572185, 3.12833142812967, 3.09479212988791, 3.06145059523469, 3.02792915885555,
|
|
91
|
+
2.99382606701730, 2.95866871765285, 2.92184227312450, 0.49482511456933, 0.48835711005490,
|
|
92
|
+
0.48231642711865, 0.47664475092742, 0.47129550835493, 0.46623099264167, 0.46142004984199,
|
|
93
|
+
0.45683664767217, 0.45245876903267, 0.44826762241853, 0.44424700958760, 0.44038285956317])
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class G3(G):
|
|
97
|
+
|
|
98
|
+
def __init__(self, n_var=10):
|
|
99
|
+
xl = np.zeros(n_var)
|
|
100
|
+
xu = np.ones(n_var)
|
|
101
|
+
super().__init__(n_var=n_var, n_obj=1, n_eq_constr=1, xl=xl, xu=xu, vtype=float)
|
|
102
|
+
|
|
103
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
104
|
+
f = - anp.sqrt(self.n_var) ** self.n_var * anp.prod(x, axis=1)
|
|
105
|
+
h = anp.sum(x ** 2, axis=1) - 1
|
|
106
|
+
|
|
107
|
+
out["F"] = f
|
|
108
|
+
out["H"] = h
|
|
109
|
+
|
|
110
|
+
def _calc_pareto_set(self):
|
|
111
|
+
return np.full(self.n_var, 1 / np.sqrt(self.n_var))
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
class G4(G):
|
|
115
|
+
|
|
116
|
+
def __init__(self):
|
|
117
|
+
xl = np.array([78, 33, 27, 27, 27], dtype=float)
|
|
118
|
+
xu = np.array([102, 45, 45, 45, 45], dtype=float)
|
|
119
|
+
super().__init__(n_var=5, n_obj=1, n_ieq_constr=6, xl=xl, xu=xu, vtype=float)
|
|
120
|
+
|
|
121
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
122
|
+
f = 5.3578547 * x[:, 2] ** 2 + 0.8356891 * x[:, 0] * x[:, 4] + 37.293239 * x[:, 0] - 40792.141
|
|
123
|
+
|
|
124
|
+
# Constraints
|
|
125
|
+
u = 85.334407 + 0.0056858 * x[:, 1] * x[:, 4] + 0.0006262 * x[:, 0] * x[:, 3] - 0.0022053 * x[:, 2] * x[:, 4]
|
|
126
|
+
g1 = -u
|
|
127
|
+
g2 = u - 92
|
|
128
|
+
v = 80.51249 + 0.0071317 * x[:, 1] * x[:, 4] + 0.0029955 * x[:, 0] * x[:, 1] + 0.0021813 * x[:, 2] ** 2
|
|
129
|
+
g3 = -v + 90
|
|
130
|
+
g4 = v - 110
|
|
131
|
+
w = 9.300961 + 0.0047026 * x[:, 2] * x[:, 4] + 0.0012547 * x[:, 0] * x[:, 2] + 0.0019085 * x[:, 2] * x[:, 3]
|
|
132
|
+
g5 = -w + 20
|
|
133
|
+
g6 = w - 25
|
|
134
|
+
|
|
135
|
+
out["F"] = f
|
|
136
|
+
out["G"] = anp.column_stack([g1, g2, g3, g4, g5, g6])
|
|
137
|
+
|
|
138
|
+
def _calc_pareto_set(self):
|
|
139
|
+
return [78, 33, 29.9952560256815985, 45, 36.7758129057882073]
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class G5(G):
|
|
143
|
+
|
|
144
|
+
def __init__(self):
|
|
145
|
+
xl = np.array([0, 0, -0.55, -0.55], dtype=float)
|
|
146
|
+
xu = np.array([1200, 1200, 0.55, 0.55], dtype=float)
|
|
147
|
+
super().__init__(n_var=4, n_obj=1, n_ieq_constr=2, n_eq_constr=3, xl=xl, xu=xu, vtype=float)
|
|
148
|
+
|
|
149
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
150
|
+
f = 3 * x[:, 0] + (10 ** -6) * x[:, 0] ** 3 + 2 * x[:, 1] + (2 * 10 ** (-6)) / 3 * x[:, 1] ** 3
|
|
151
|
+
|
|
152
|
+
# Inequality Constraints
|
|
153
|
+
g1 = x[:, 2] - x[:, 3] - 0.55
|
|
154
|
+
g2 = x[:, 3] - x[:, 2] - 0.55
|
|
155
|
+
|
|
156
|
+
# Equality Constraints
|
|
157
|
+
h1 = 1000 * anp.sin(-x[:, 2] - 0.25) + 1000 * anp.sin(-x[:, 3] - 0.25) + 894.8 - x[:, 0]
|
|
158
|
+
h2 = 1000 * anp.sin(x[:, 2] - 0.25) + 1000 * anp.sin(x[:, 2] - x[:, 3] - 0.25) + 894.8 - x[:, 1]
|
|
159
|
+
h3 = 1000 * anp.sin(x[:, 3] - 0.25) + 1000 * anp.sin(x[:, 3] - x[:, 2] - 0.25) + 1294.8
|
|
160
|
+
|
|
161
|
+
out["F"] = f
|
|
162
|
+
out["G"] = anp.column_stack([g1, g2])
|
|
163
|
+
out["H"] = anp.column_stack([h1, h2, h3])
|
|
164
|
+
|
|
165
|
+
def _calc_pareto_set(self):
|
|
166
|
+
return [679.94531748791177961,
|
|
167
|
+
1026.06713513571594376,
|
|
168
|
+
0.11887636617838561,
|
|
169
|
+
-0.39623355240329272]
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class G6(G):
|
|
173
|
+
|
|
174
|
+
def __init__(self):
|
|
175
|
+
xl = np.array([13, 0], dtype=float)
|
|
176
|
+
xu = np.array([100, 100], dtype=float)
|
|
177
|
+
super().__init__(n_var=2, n_obj=1, n_ieq_constr=2, xl=xl, xu=xu, vtype=float)
|
|
178
|
+
|
|
179
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
180
|
+
f = (x[:, 0] - 10) ** 3 + (x[:, 1] - 20) ** 3
|
|
181
|
+
|
|
182
|
+
# Constraints
|
|
183
|
+
g1 = -(x[:, 0] - 5) ** 2 - (x[:, 1] - 5) ** 2 + 100
|
|
184
|
+
g2 = (x[:, 0] - 6) ** 2 + (x[:, 1] - 5) ** 2 - 82.81
|
|
185
|
+
|
|
186
|
+
out["F"] = f
|
|
187
|
+
out["G"] = anp.column_stack([g1, g2])
|
|
188
|
+
|
|
189
|
+
def _calc_pareto_set(self):
|
|
190
|
+
return np.array([14.095, 5 - np.sqrt(100 - (14.095 - 5) ** 2)])
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class G7(G):
|
|
194
|
+
|
|
195
|
+
def __init__(self):
|
|
196
|
+
n_var = 10
|
|
197
|
+
xl = -10 * np.ones(n_var)
|
|
198
|
+
xu = 10 * np.ones(n_var)
|
|
199
|
+
super().__init__(n_var=n_var, n_obj=1, n_ieq_constr=8, xl=xl, xu=xu, vtype=float)
|
|
200
|
+
|
|
201
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
202
|
+
f = x[:, 0] ** 2 + x[:, 1] ** 2 + x[:, 0] * x[:, 1] - 14 * x[:, 0] - 16 * x[:, 1] + (x[:, 2] - 10) ** 2 \
|
|
203
|
+
+ 4 * (x[:, 3] - 5) ** 2 + (x[:, 4] - 3) ** 2 + 2 * (x[:, 5] - 1) ** 2 + 5 * x[:, 6] ** 2 \
|
|
204
|
+
+ 7 * (x[:, 7] - 11) ** 2 + 2 * (x[:, 8] - 10) ** 2 + (x[:, 9] - 7) ** 2 + 45
|
|
205
|
+
|
|
206
|
+
# Constraints
|
|
207
|
+
g1 = 4 * x[:, 0] + 5 * x[:, 1] - 3 * x[:, 6] + 9 * x[:, 7] - 105
|
|
208
|
+
g2 = 10 * x[:, 0] - 8 * x[:, 1] - 17 * x[:, 6] + 2 * x[:, 7]
|
|
209
|
+
g3 = -8 * x[:, 0] + 2 * x[:, 1] + 5 * x[:, 8] - 2 * x[:, 9] - 12
|
|
210
|
+
g4 = 3 * (x[:, 0] - 2) ** 2 + 4 * (x[:, 1] - 3) ** 2 + 2 * x[:, 2] ** 2 - 7 * x[:, 3] - 120
|
|
211
|
+
g5 = 5 * x[:, 0] ** 2 + 8 * x[:, 1] + (x[:, 2] - 6) ** 2 - 2 * x[:, 3] - 40
|
|
212
|
+
g6 = x[:, 0] ** 2 + 2 * (x[:, 1] - 2) ** 2 - 2 * x[:, 0] * x[:, 1] + 14 * x[:, 4] - 6 * x[:, 5]
|
|
213
|
+
g7 = 0.5 * (x[:, 0] - 8) ** 2 + 2 * (x[:, 1] - 4) ** 2 + 3 * x[:, 4] ** 2 - x[:, 5] - 30
|
|
214
|
+
g8 = -3 * x[:, 0] + 6 * x[:, 1] + 12 * (x[:, 8] - 8) ** 2 - 7 * x[:, 9]
|
|
215
|
+
|
|
216
|
+
out["F"] = f
|
|
217
|
+
out["G"] = anp.column_stack([g1, g2, g3, g4, g5, g6, g7, g8])
|
|
218
|
+
|
|
219
|
+
def _calc_pareto_set(self):
|
|
220
|
+
return [2.171997834812,
|
|
221
|
+
2.363679362798,
|
|
222
|
+
8.773925117415,
|
|
223
|
+
5.095984215855,
|
|
224
|
+
0.990655966387,
|
|
225
|
+
1.430578427576,
|
|
226
|
+
1.321647038816,
|
|
227
|
+
9.828728107011,
|
|
228
|
+
8.280094195305,
|
|
229
|
+
8.375923511901]
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
class G8(G):
|
|
233
|
+
|
|
234
|
+
def __init__(self):
|
|
235
|
+
n_var = 2
|
|
236
|
+
xl = np.full(n_var, 0.00001)
|
|
237
|
+
xu = np.full(n_var, 10.0)
|
|
238
|
+
super().__init__(n_var=n_var, n_obj=1, n_ieq_constr=2, xl=xl, xu=xu, vtype=float)
|
|
239
|
+
|
|
240
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
241
|
+
f = -(anp.sin(2 * math.pi * x[:, 0]) ** 3 * anp.sin(2 * math.pi * x[:, 1])) / (
|
|
242
|
+
x[:, 0] ** 3 * (x[:, 0] + x[:, 1]))
|
|
243
|
+
|
|
244
|
+
# Constraints
|
|
245
|
+
g1 = x[:, 0] ** 2 - x[:, 1] + 1
|
|
246
|
+
g2 = 1 - x[:, 0] + (x[:, 1] - 4) ** 2
|
|
247
|
+
|
|
248
|
+
out["F"] = f
|
|
249
|
+
out["G"] = anp.column_stack([g1, g2])
|
|
250
|
+
|
|
251
|
+
def _calc_pareto_set(self):
|
|
252
|
+
return [1.22797135260752599, 4.24537336612274885]
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
class G9(G):
|
|
256
|
+
|
|
257
|
+
def __init__(self):
|
|
258
|
+
n_var = 7
|
|
259
|
+
xl = np.full(n_var, -10.0)
|
|
260
|
+
xu = np.full(n_var, +10.0)
|
|
261
|
+
super().__init__(n_var=n_var, n_obj=1, n_ieq_constr=4, xl=xl, xu=xu, vtype=float)
|
|
262
|
+
|
|
263
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
264
|
+
f = (x[:, 0] - 10) ** 2 + 5 * (x[:, 1] - 12) ** 2 + x[:, 2] ** 4 \
|
|
265
|
+
+ 3 * (x[:, 3] - 11) ** 2 + 10 * x[:, 4] ** 6 + 7 * x[:, 5] ** 2 \
|
|
266
|
+
+ x[:, 6] ** 4 - 4 * x[:, 5] * x[:, 6] - 10 * x[:, 5] - 8 * x[:, 6]
|
|
267
|
+
|
|
268
|
+
# Constraints
|
|
269
|
+
v1 = 2 * x[:, 0] ** 2
|
|
270
|
+
v2 = x[:, 1] ** 2
|
|
271
|
+
g1 = v1 + 3 * v2 ** 2 + x[:, 2] + 4 * x[:, 3] ** 2 + 5 * x[:, 4] - 127
|
|
272
|
+
g2 = 7 * x[:, 0] + 3 * x[:, 1] + 10 * x[:, 2] ** 2 + x[:, 3] - x[:, 4] - 282
|
|
273
|
+
g3 = 23 * x[:, 0] + v2 + 6 * x[:, 5] ** 2 - 8 * x[:, 6] - 196
|
|
274
|
+
g4 = 2 * v1 + v2 - 3 * x[:, 0] * x[:, 1] + 2 * x[:, 2] ** 2 + 5. * x[:, 5] - 11 * x[:, 6]
|
|
275
|
+
|
|
276
|
+
out["F"] = f[:, None]
|
|
277
|
+
out["G"] = anp.column_stack([g1, g2, g3, g4])
|
|
278
|
+
|
|
279
|
+
def _calc_pareto_set(self):
|
|
280
|
+
# return [2.33049935147405174, 1.95137236847114592, -0.477541399510615805, 4.36572624923625874,
|
|
281
|
+
# -0.624486959100388983, 1.03813099410962173, 1.5942266780671519]
|
|
282
|
+
return [
|
|
283
|
+
2.33049949323300210,
|
|
284
|
+
1.95137239646596039,
|
|
285
|
+
-0.47754041766198602,
|
|
286
|
+
4.36572612852776931,
|
|
287
|
+
-0.62448707583702823,
|
|
288
|
+
1.03813092302119347,
|
|
289
|
+
1.59422663221959926]
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
class G10(G):
|
|
293
|
+
|
|
294
|
+
def __init__(self):
|
|
295
|
+
xl = np.array([100, 1000, 1000, 10, 10, 10, 10, 10], dtype=float)
|
|
296
|
+
xu = np.array([10000, 10000, 10000, 1000, 1000, 1000, 1000, 1000], dtype=float)
|
|
297
|
+
super().__init__(n_var=8, n_obj=1, n_ieq_constr=6, xl=xl, xu=xu, vtype=float)
|
|
298
|
+
|
|
299
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
300
|
+
f = x[:, 0] + x[:, 1] + x[:, 2]
|
|
301
|
+
|
|
302
|
+
# Constraints
|
|
303
|
+
g1 = -1 + 0.0025 * (x[:, 3] + x[:, 5])
|
|
304
|
+
g2 = -1 + 0.0025 * (-x[:, 3] + x[:, 4] + x[:, 6])
|
|
305
|
+
g3 = -1 + 0.01 * (-x[:, 4] + x[:, 7])
|
|
306
|
+
g4 = 100 * x[:, 0] - x[:, 0] * x[:, 5] + 833.33252 * x[:, 3] - 83333.333
|
|
307
|
+
g5 = x[:, 1] * x[:, 3] - x[:, 1] * x[:, 6] - 1250 * x[:, 3] + 1250 * x[:, 4]
|
|
308
|
+
g6 = x[:, 2] * x[:, 4] - x[:, 2] * x[:, 7] - 2500. * x[:, 4] + 1250000
|
|
309
|
+
|
|
310
|
+
out["F"] = f
|
|
311
|
+
out["G"] = anp.column_stack([g1, g2, g3, g4, g5, g6])
|
|
312
|
+
|
|
313
|
+
def _calc_pareto_set(self):
|
|
314
|
+
return [579.29340269759155,
|
|
315
|
+
1359.97691009458777,
|
|
316
|
+
5109.97770901501008,
|
|
317
|
+
182.01659025342749,
|
|
318
|
+
295.60089166064103,
|
|
319
|
+
217.98340973906758,
|
|
320
|
+
286.41569858295981,
|
|
321
|
+
395.60089165381908]
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
class G11(G):
|
|
325
|
+
|
|
326
|
+
def __init__(self):
|
|
327
|
+
xl = np.array([-1, -1], dtype=float)
|
|
328
|
+
xu = np.array([1, 1], dtype=float)
|
|
329
|
+
super().__init__(n_var=2, n_obj=1, n_ieq_constr=1, xl=xl, xu=xu, vtype=float)
|
|
330
|
+
|
|
331
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
332
|
+
f = x[:, 0] ** 2 + (x[:, 1] - 1) ** 2
|
|
333
|
+
g = x[:, 1] - x[:, 0] ** 2
|
|
334
|
+
|
|
335
|
+
out["F"] = f
|
|
336
|
+
out["G"] = g
|
|
337
|
+
|
|
338
|
+
def _calc_pareto_set(self):
|
|
339
|
+
return [-np.sqrt(0.5), 0.5]
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
class G12(G):
|
|
343
|
+
|
|
344
|
+
def __init__(self):
|
|
345
|
+
xl = np.full(3, 0.0)
|
|
346
|
+
xu = np.full(3, 10.0)
|
|
347
|
+
super().__init__(n_var=3, n_obj=1, n_ieq_constr=1, xl=xl, xu=xu, vtype=float)
|
|
348
|
+
|
|
349
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
350
|
+
f = -1 + 0.01 * ((x[:, 0] - 5) ** 2 + (x[:, 1] - 5) ** 2 + (x[:, 2] - 5) ** 2)
|
|
351
|
+
|
|
352
|
+
g = anp.full(len(x), anp.inf)
|
|
353
|
+
for i in range(1, 10):
|
|
354
|
+
for j in range(1, 10):
|
|
355
|
+
for k in range(1, 10):
|
|
356
|
+
g = anp.minimum(g, (x[:, 0] - i) ** 2 + (x[:, 1] - j) ** 2 + (x[:, 2] - k) ** 2 - 0.0625)
|
|
357
|
+
|
|
358
|
+
out["F"] = f
|
|
359
|
+
out["G"] = g
|
|
360
|
+
|
|
361
|
+
def _calc_pareto_set(self):
|
|
362
|
+
return [5.0, 5.0, 5.0]
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
class G13(G):
|
|
366
|
+
|
|
367
|
+
def __init__(self):
|
|
368
|
+
xl = np.array([-2.3, -2.3, -3.2, -3.2, -3.2])
|
|
369
|
+
xu = np.array([+2.3, +2.3, +3.2, +3.2, +3.2])
|
|
370
|
+
super().__init__(n_var=5, n_obj=1, n_eq_constr=3, xl=xl, xu=xu, vtype=float)
|
|
371
|
+
|
|
372
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
373
|
+
f = anp.exp(x[:, 0] * x[:, 1] * x[:, 2] * x[:, 3] * x[:, 4])
|
|
374
|
+
|
|
375
|
+
h1 = x[:, 0] ** 2 + x[:, 1] ** 2 + x[:, 2] ** 2 + x[:, 3] ** 2 + x[:, 4] ** 2 - 10
|
|
376
|
+
h2 = x[:, 1] * x[:, 2] - 5 * x[:, 3] * x[:, 4]
|
|
377
|
+
h3 = x[:, 0] ** 3 + x[:, 1] ** 3 + 1
|
|
378
|
+
|
|
379
|
+
out["F"] = f
|
|
380
|
+
out["H"] = anp.column_stack([h1, h2, h3])
|
|
381
|
+
|
|
382
|
+
def _calc_pareto_set(self):
|
|
383
|
+
opt = np.array([-1.7171435947203, 1.5957097321519, 1.8272456947885, -0.7636422812896, -0.7636439027742])
|
|
384
|
+
ps = [opt,
|
|
385
|
+
np.array([opt[0], opt[1], -opt[2], -opt[3], +opt[4]]),
|
|
386
|
+
np.array([opt[0], opt[1], -opt[2], +opt[3], -opt[4]]),
|
|
387
|
+
np.array([opt[0], opt[1], +opt[2], -opt[3], -opt[4]]),
|
|
388
|
+
np.array([opt[0], opt[1], -opt[2], +opt[3], -opt[4]]),
|
|
389
|
+
np.array([opt[0], opt[1], -opt[2], -opt[3], +opt[4]])
|
|
390
|
+
]
|
|
391
|
+
return np.row_stack(ps)
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
class G14(G):
|
|
395
|
+
|
|
396
|
+
def __init__(self):
|
|
397
|
+
xl = np.full(10, 1e-06)
|
|
398
|
+
xu = np.full(10, 10.0)
|
|
399
|
+
super().__init__(n_var=10, n_obj=1, n_eq_constr=3, xl=xl, xu=xu, vtype=float)
|
|
400
|
+
|
|
401
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
402
|
+
v = anp.array([-6.089, -17.164, -34.054, -5.914, -24.721, -14.986, -24.1, -10.708, -26.662, -22.179])
|
|
403
|
+
y = anp.log(x / anp.sum(x, axis=1, keepdims=True))
|
|
404
|
+
f = anp.sum(x * (v + y), axis=1)
|
|
405
|
+
|
|
406
|
+
h1 = x[:, 0] + 2 * x[:, 1] + 2 * x[:, 2] + x[:, 5] + x[:, 9] - 2
|
|
407
|
+
h2 = x[:, 3] + 2 * x[:, 4] + x[:, 5] + x[:, 6] - 1
|
|
408
|
+
h3 = x[:, 2] + x[:, 6] + x[:, 7] + 2 * x[:, 8] + x[:, 9] - 1
|
|
409
|
+
|
|
410
|
+
out["F"] = f
|
|
411
|
+
out["H"] = anp.column_stack([h1, h2, h3])
|
|
412
|
+
|
|
413
|
+
def _calc_pareto_set(self):
|
|
414
|
+
return [0.0406684113216282, 0.147721240492452, 0.783205732104114, 0.00141433931889084, 0.485293636780388,
|
|
415
|
+
0.000693183051556082, 0.0274052040687766, 0.0179509660214818, 0.0373268186859717, 0.0968844604336845]
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
class G15(G):
|
|
419
|
+
|
|
420
|
+
def __init__(self):
|
|
421
|
+
n_var = 3
|
|
422
|
+
xl = np.full(n_var, 0.0)
|
|
423
|
+
xu = np.full(n_var, 10.0)
|
|
424
|
+
super().__init__(n_var=n_var, n_obj=1, n_eq_constr=2, xl=xl, xu=xu, vtype=float)
|
|
425
|
+
|
|
426
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
427
|
+
f = 1000 - (x[:, 0] ** 2) - 2 * x[:, 1] ** 2 - x[:, 2] ** 2 - x[:, 0] * x[:, 1] - x[:, 0] * x[:, 2]
|
|
428
|
+
|
|
429
|
+
h1 = x[:, 0] ** 2 + x[:, 1] ** 2 + x[:, 2] ** 2 - 25
|
|
430
|
+
h2 = 8 * x[:, 0] + 14 * x[:, 1] + 7 * x[:, 2] - 56
|
|
431
|
+
|
|
432
|
+
out["F"] = f
|
|
433
|
+
out["H"] = anp.column_stack([h1, h2])
|
|
434
|
+
|
|
435
|
+
def _calc_pareto_set(self):
|
|
436
|
+
return [3.51212812611795133, 0.216987510429556135, 3.55217854929179921]
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
class G16(G):
|
|
440
|
+
|
|
441
|
+
def __init__(self):
|
|
442
|
+
xl = np.array([704.4148, 68.6, 0, 193, 25], dtype=float)
|
|
443
|
+
xu = np.array([906.3855, 288.88, 134.75, 287.0966, 84.1988], dtype=float)
|
|
444
|
+
super().__init__(n_var=5, n_obj=1, n_ieq_constr=38, xl=xl, xu=xu, vtype=float)
|
|
445
|
+
|
|
446
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
447
|
+
y1 = x[:, 1] + x[:, 2] + 41.6
|
|
448
|
+
c1 = 0.024 * x[:, 3] - 4.62
|
|
449
|
+
y2 = (12.5 / c1) + 12
|
|
450
|
+
c2 = 0.0003535 * (x[:, 0] ** 2) + 0.5311 * x[:, 0] + 0.08705 * y2 * x[:, 0]
|
|
451
|
+
c3 = 0.052 * x[:, 0] + 78 + 0.002377 * y2 * x[:, 0]
|
|
452
|
+
y3 = c2 / c3
|
|
453
|
+
y4 = 19 * y3
|
|
454
|
+
c4 = 0.04782 * (x[:, 0] - y3) + (0.1956 * (x[:, 0] - y3) ** 2) / x[:, 1] + 0.6376 * y4 + 1.594 * y3
|
|
455
|
+
c5 = 100 * x[:, 1]
|
|
456
|
+
c6 = x[:, 0] - y3 - y4
|
|
457
|
+
c7 = 0.950 - (c4 / c5)
|
|
458
|
+
y5 = c6 * c7
|
|
459
|
+
y6 = x[:, 0] - y5 - y4 - y3
|
|
460
|
+
c8 = (y5 + y4) * 0.995
|
|
461
|
+
y7 = c8 / y1
|
|
462
|
+
y8 = c8 / 3798
|
|
463
|
+
c9 = y7 - (0.0663 * (y7 / y8)) - 0.3153
|
|
464
|
+
y9 = (96.82 / c9) + 0.321 * y1
|
|
465
|
+
y10 = 1.29 * y5 + 1.258 * y4 + 2.29 * y3 + 1.71 * y6
|
|
466
|
+
y11 = 1.71 * x[:, 0] - 0.452 * y4 + 0.580 * y3
|
|
467
|
+
c10 = 12.3 / 752.3
|
|
468
|
+
c11 = (1.75 * y2) * (0.995 * x[:, 0])
|
|
469
|
+
c12 = (0.995 * y10) + 1998
|
|
470
|
+
y12 = c10 * x[:, 0] + (c11 / c12)
|
|
471
|
+
y13 = c12 - 1.75 * y2
|
|
472
|
+
y14 = 3623 + 64.4 * x[:, 1] + 58.4 * x[:, 2] + 146312 / (y9 + x[:, 4])
|
|
473
|
+
c13 = 0.995 * y10 + 60.8 * x[:, 1] + 48 * x[:, 3] - 0.1121 * y14 - 5095
|
|
474
|
+
y15 = y13 / c13
|
|
475
|
+
y16 = 148000 - 331000 * y15 + 40 * y13 - 61 * y15 * y13
|
|
476
|
+
c14 = 2324 * y10 - 28740000 * y2
|
|
477
|
+
y17 = 14130000 - (1328 * y10) - (531 * y11) + (c14 / c12)
|
|
478
|
+
c15 = (y13 / y15) - (y13 / 0.52)
|
|
479
|
+
c16 = 1.104 - 0.72 * y15
|
|
480
|
+
c17 = y9 + x[:, 4]
|
|
481
|
+
|
|
482
|
+
f = (0.000117 * y14) + 0.1365 + (0.00002358 * y13) + (0.000001502 * y16) + (0.0321 * y12) + (0.004324 * y5) + (
|
|
483
|
+
0.0001 * c15 / c16) + (37.48 * (y2 / c12)) - (0.0000005843 * y17)
|
|
484
|
+
|
|
485
|
+
g1 = (0.28 / 0.72) * y5 - y4
|
|
486
|
+
g2 = x[:, 2] - 1.5 * x[:, 1]
|
|
487
|
+
g3 = 3496 * (y2 / c12) - 21
|
|
488
|
+
g4 = 110.6 + y1 - (62212 / c17)
|
|
489
|
+
g5 = 213.1 - y1
|
|
490
|
+
g6 = y1 - 405.23
|
|
491
|
+
g7 = 17.505 - y2
|
|
492
|
+
g8 = y2 - 1053.6667
|
|
493
|
+
g9 = 11.275 - y3
|
|
494
|
+
g10 = y3 - 35.03
|
|
495
|
+
g11 = 214.228 - y4
|
|
496
|
+
g12 = y4 - 665.585
|
|
497
|
+
g13 = 7.458 - y5
|
|
498
|
+
g14 = y5 - 584.463
|
|
499
|
+
g15 = 0.961 - y6
|
|
500
|
+
g16 = y6 - 265.916
|
|
501
|
+
g17 = 1.612 - y7
|
|
502
|
+
g18 = y7 - 7.046
|
|
503
|
+
g19 = 0.146 - y8
|
|
504
|
+
g20 = y8 - 0.222
|
|
505
|
+
g21 = 107.99 - y9
|
|
506
|
+
g22 = y9 - 273.366
|
|
507
|
+
g23 = 922.693 - y10
|
|
508
|
+
g24 = y10 - 1286.105
|
|
509
|
+
g25 = 926.832 - y11
|
|
510
|
+
g26 = y11 - 1444.046
|
|
511
|
+
g27 = 18.766 - y12
|
|
512
|
+
g28 = y12 - 537.141
|
|
513
|
+
g29 = 1072.163 - y13
|
|
514
|
+
g30 = y13 - 3247.039
|
|
515
|
+
g31 = 8961.448 - y14
|
|
516
|
+
g32 = y14 - 26844.086
|
|
517
|
+
g33 = 0.063 - y15
|
|
518
|
+
g34 = y15 - 0.386
|
|
519
|
+
g35 = 71084.33 - y16
|
|
520
|
+
g36 = -140000 + y16
|
|
521
|
+
g37 = 2802713 - y17
|
|
522
|
+
g38 = y17 - 12146108
|
|
523
|
+
|
|
524
|
+
out["F"] = f
|
|
525
|
+
out["G"] = anp.column_stack([g1, g2, g3, g4, g5, g6, g7, g8, g9, g10, g11, g12, g13, g14, g15, g16, g17, g18,
|
|
526
|
+
g19, g20, g21, g22, g23, g24, g25, g26, g27, g28, g29, g30, g31, g32, g33, g34,
|
|
527
|
+
g35, g36, g37, g38])
|
|
528
|
+
|
|
529
|
+
def _calc_pareto_set(self):
|
|
530
|
+
return [705.17454, 68.60000, 102.90000, 282.32493, 37.58412]
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
class G17(G):
|
|
534
|
+
|
|
535
|
+
def __init__(self):
|
|
536
|
+
xl = np.array([0, 0, 340, 340, -1000, 0], dtype=float)
|
|
537
|
+
xu = np.array([400, 1000, 420, 420, 1000, 0.5236], dtype=float)
|
|
538
|
+
super().__init__(n_var=6, n_obj=1, n_eq_constr=4, xl=xl, xu=xu, vtype=float)
|
|
539
|
+
|
|
540
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
541
|
+
f = anp.zeros(len(x))
|
|
542
|
+
|
|
543
|
+
x1_less_than_300 = x[:, 0] < 300
|
|
544
|
+
f = f + x1_less_than_300 * 30 * x[:, 0]
|
|
545
|
+
f = f + (~x1_less_than_300) * 31 * x[:, 0]
|
|
546
|
+
|
|
547
|
+
x2_less_than_100 = x[:, 1] < 100
|
|
548
|
+
x2_greater_equal_200 = x[:, 1] >= 200
|
|
549
|
+
|
|
550
|
+
f = f + x2_less_than_100 * 28 * x[:, 1]
|
|
551
|
+
f = f + x2_greater_equal_200 * 30 * x[:, 1]
|
|
552
|
+
|
|
553
|
+
x2_between_100_and_200 = anp.logical_and(~x2_less_than_100, ~x2_greater_equal_200)
|
|
554
|
+
f = f + x2_between_100_and_200 * 29 * x[:, 1]
|
|
555
|
+
|
|
556
|
+
h1 = -x[:, 0] + 300 - ((x[:, 2] * x[:, 3]) / 131.078) * anp.cos(1.48477 - x[:, 5]) + (
|
|
557
|
+
(0.90798 * x[:, 2] ** 2) / 131.078) * anp.cos(1.47588)
|
|
558
|
+
h2 = -x[:, 1] - ((x[:, 2] * x[:, 3]) / 131.078) * anp.cos(1.48477 + x[:, 5]) + (
|
|
559
|
+
(0.90798 * x[:, 3] ** 2) / 131.078) * anp.cos(1.47588)
|
|
560
|
+
h3 = -x[:, 4] - ((x[:, 2] * x[:, 3]) / 131.078) * anp.sin(1.48477 + x[:, 5]) + (
|
|
561
|
+
(0.90798 * x[:, 3] ** 2) / 131.078) * anp.sin(1.47588)
|
|
562
|
+
h4 = 200 - ((x[:, 2] * x[:, 3]) / 131.078) * anp.sin(1.48477 - x[:, 5]) + (
|
|
563
|
+
(0.90798 * x[:, 2] ** 2) / 131.078) * anp.sin(1.47588)
|
|
564
|
+
|
|
565
|
+
out["F"] = f
|
|
566
|
+
out["H"] = anp.column_stack([h1, h2, h3, h4])
|
|
567
|
+
|
|
568
|
+
def _calc_pareto_set(self):
|
|
569
|
+
return [201.784467214523659, 99.9999999999999005, 383.071034852773266, 420, -10.9076584514292652,
|
|
570
|
+
0.0731482312084287128]
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
class G18(G):
|
|
574
|
+
|
|
575
|
+
def __init__(self):
|
|
576
|
+
xl = np.array([-10, -10, -10, -10, -10, -10, -10, -10, 0], dtype=float)
|
|
577
|
+
xu = np.array([+10, +10, +10, +10, +10, +10, +10, +10, 20], dtype=float)
|
|
578
|
+
super().__init__(n_var=9, n_obj=1, n_ieq_constr=13, xl=xl, xu=xu, vtype=float)
|
|
579
|
+
|
|
580
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
581
|
+
f = -0.5 * (x[:, 0] * x[:, 3] - x[:, 1] * x[:, 2] + x[:, 2] * x[:, 8] - x[:, 4] * x[:, 8] + x[:, 4]
|
|
582
|
+
* x[:, 7] - x[:, 5] * x[:, 6])
|
|
583
|
+
|
|
584
|
+
g1 = x[:, 2] ** 2 + x[:, 3] ** 2 - 1
|
|
585
|
+
g2 = x[:, 8] ** 2 - 1
|
|
586
|
+
g3 = x[:, 4] ** 2 + x[:, 5] ** 2 - 1
|
|
587
|
+
g4 = x[:, 0] ** 2 + (x[:, 1] - x[:, 8]) ** 2 - 1
|
|
588
|
+
g5 = (x[:, 0] - x[:, 4]) ** 2 + (x[:, 1] - x[:, 5]) ** 2 - 1
|
|
589
|
+
g6 = (x[:, 0] - x[:, 6]) ** 2 + (x[:, 1] - x[:, 7]) ** 2 - 1
|
|
590
|
+
g7 = (x[:, 2] - x[:, 4]) ** 2 + (x[:, 3] - x[:, 5]) ** 2 - 1
|
|
591
|
+
g8 = (x[:, 2] - x[:, 6]) ** 2 + (x[:, 3] - x[:, 7]) ** 2 - 1
|
|
592
|
+
g9 = x[:, 6] ** 2 + (x[:, 7] - x[:, 8]) ** 2 - 1
|
|
593
|
+
g10 = x[:, 1] * x[:, 2] - x[:, 0] * x[:, 3]
|
|
594
|
+
g11 = -x[:, 2] * x[:, 8]
|
|
595
|
+
g12 = x[:, 4] * x[:, 8]
|
|
596
|
+
g13 = x[:, 5] * x[:, 6] - x[:, 4] * x[:, 7]
|
|
597
|
+
|
|
598
|
+
out["F"] = f
|
|
599
|
+
out["G"] = anp.column_stack([g1, g2, g3, g4, g5, g6, g7, g8, g9, g10, g11, g12, g13])
|
|
600
|
+
|
|
601
|
+
def _calc_pareto_set(self):
|
|
602
|
+
return [
|
|
603
|
+
-0.9890005492667746, 0.1479118418638228, -0.6242897641574451, -0.7811841737429015, -0.9876159387318453,
|
|
604
|
+
0.1504778305249072, -0.6225959783340022, -0.782543417629948, 0.0
|
|
605
|
+
]
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
class G19(G):
|
|
609
|
+
|
|
610
|
+
def __init__(self):
|
|
611
|
+
super().__init__(n_var=15, n_obj=1, n_ieq_constr=5, xl=np.full(15, 0.0), xu=np.full(15, 10.0), vtype=float)
|
|
612
|
+
|
|
613
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
614
|
+
aMat19 = anp.array([-16, 2, 0, 1, 0,
|
|
615
|
+
+0, -2, 0, 0.4, 2,
|
|
616
|
+
-3.5, 0, 2, 0, 0,
|
|
617
|
+
+0, -2, 0, -4, -1,
|
|
618
|
+
+0, -9, -2, 1, -2.8,
|
|
619
|
+
+2, 0, -4, 0, 0,
|
|
620
|
+
-1, -1, -1, -1, -1,
|
|
621
|
+
-1, -2, -3, -2, -1,
|
|
622
|
+
+1, 2, 3, 4, 5,
|
|
623
|
+
+1, 1, 1, 1, 1]).reshape((10, 5))
|
|
624
|
+
|
|
625
|
+
bVec19 = anp.array([-40, -2, -0.25, -4, -4, -1, -40, -60, 5, 1])
|
|
626
|
+
|
|
627
|
+
cMat19 = anp.array([+30, -20, -10, 32, -10,
|
|
628
|
+
-20, 39, -6, -31, 32,
|
|
629
|
+
-10, -6, 10, -6, -10,
|
|
630
|
+
+32, -31, -6, 39, -20,
|
|
631
|
+
-10, 32, -10, -20, 30]).reshape((5, 5))
|
|
632
|
+
|
|
633
|
+
dVec19 = anp.array([4, 8, 10, 6, 2])
|
|
634
|
+
eVec19 = anp.array([-15, -27, -36, -18, -12])
|
|
635
|
+
|
|
636
|
+
f = - anp.sum(bVec19 * x[:, :10], axis=1) + 2 * anp.sum(dVec19 * x[:, 10:] * x[:, 10:] * x[:, 10:], axis=1)
|
|
637
|
+
|
|
638
|
+
for i in range(5):
|
|
639
|
+
f = f + x[:, 10 + i] * anp.sum(cMat19[i] * x[:, 10:], axis=1)
|
|
640
|
+
|
|
641
|
+
g = []
|
|
642
|
+
for j in range(5):
|
|
643
|
+
_g = -2 * anp.sum(cMat19[j] * x[:, 10:], axis=1) - 3 * dVec19[j] * x[:, 10 + j] * x[:, 10 + j] \
|
|
644
|
+
- eVec19[j] + anp.sum(aMat19[:, j] * x[:, :10], axis=1)
|
|
645
|
+
g.append(_g)
|
|
646
|
+
|
|
647
|
+
out["F"] = f
|
|
648
|
+
out["G"] = anp.column_stack(g)
|
|
649
|
+
|
|
650
|
+
def _calc_pareto_set(self):
|
|
651
|
+
return [
|
|
652
|
+
0, 0, 3.94600628013917, 0, 3.28318162727873, 10, 0, 0, 0, 0, 0.370762125835098, 0.278454209512692,
|
|
653
|
+
0.523838440499861, 0.388621589976956, 0.29815843730292
|
|
654
|
+
]
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
class G20(G):
|
|
658
|
+
|
|
659
|
+
def __init__(self):
|
|
660
|
+
n_var = 24
|
|
661
|
+
xl = np.full(n_var, 0.0)
|
|
662
|
+
xu = np.full(n_var, 10.0)
|
|
663
|
+
super().__init__(n_var=n_var, n_obj=1, n_ieq_constr=6, n_eq_constr=14, xl=xl, xu=xu, vtype=float)
|
|
664
|
+
|
|
665
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
666
|
+
a = anp.array([0.0693, 0.0577, 0.05, 0.2,
|
|
667
|
+
0.26, 0.55, 0.06, 0.1, 0.12,
|
|
668
|
+
0.18, 0.1, 0.09, 0.0693, 0.0577,
|
|
669
|
+
0.05, 0.2, 0.26, 0.55, 0.06,
|
|
670
|
+
0.1, 0.12, 0.18, 0.1, 0.09])
|
|
671
|
+
|
|
672
|
+
f = anp.sum(a * x, axis=1)
|
|
673
|
+
|
|
674
|
+
e = anp.array([0.1, 0.3, 0.4, 0.3, 0.6, 0.3])
|
|
675
|
+
|
|
676
|
+
b = anp.array([44.094, 58.12, 58.12, 137.4, 120.9, 170.9, 62.501, 84.94,
|
|
677
|
+
133.425, 82.507, 46.07, 60.097, 44.094, 58.12, 58.12,
|
|
678
|
+
137.4, 120.9, 170.9, 62.501, 84.94, 133.425, 82.507, 46.07, 60.097])
|
|
679
|
+
|
|
680
|
+
cVec = anp.array([123.7, 31.7, 45.7, 14.7, 84.7, 27.7, 49.7, 7.1, 2.1, 17.7, 0.85, 0.64])
|
|
681
|
+
d = anp.array([31.244, 36.12, 34.784, 92.7, 82.7, 91.6, 56.708, 82.7, 80.8, 64.517, 49.4, 49.1])
|
|
682
|
+
k = 0.7302 * 530 * (14.7 / 40)
|
|
683
|
+
sumX = anp.sum(x, axis=1)
|
|
684
|
+
|
|
685
|
+
g123 = [(x[:, i] + x[:, i + 12]) / (sumX + e[i]) for i in range(3)]
|
|
686
|
+
g456 = [(x[:, i + 3] + x[:, i + 15]) / (sumX + e[i]) for i in range(3, 6)]
|
|
687
|
+
|
|
688
|
+
h = []
|
|
689
|
+
for i in range(12):
|
|
690
|
+
h1 = x[:, i + 12] / (b[i + 12] * anp.sum((x / b)[:, 12:], axis=1))
|
|
691
|
+
h2 = cVec[i] * x[:, i] / (40 * b[i] * anp.sum((x / b)[:, :12], axis=1))
|
|
692
|
+
h.append(h1 - h2)
|
|
693
|
+
|
|
694
|
+
h13 = sumX - 1
|
|
695
|
+
h14 = anp.sum((x[:, :12] / d), axis=1) + k * anp.sum((x / b)[:, 12:], axis=1) - 1.671
|
|
696
|
+
|
|
697
|
+
out["F"] = f
|
|
698
|
+
out["G"] = anp.column_stack(g123 + g456)
|
|
699
|
+
out["H"] = anp.column_stack(h + [h13, h14])
|
|
700
|
+
|
|
701
|
+
def _calc_pareto_set(self):
|
|
702
|
+
return [
|
|
703
|
+
9.53E-7,
|
|
704
|
+
0,
|
|
705
|
+
4.21E-3,
|
|
706
|
+
1.039E-4,
|
|
707
|
+
0,
|
|
708
|
+
0,
|
|
709
|
+
2.072E-1,
|
|
710
|
+
5.979E-1,
|
|
711
|
+
1.298E-1,
|
|
712
|
+
3.35E-2,
|
|
713
|
+
1.711E-2,
|
|
714
|
+
8.827E-3,
|
|
715
|
+
4.657E-10,
|
|
716
|
+
0,
|
|
717
|
+
0,
|
|
718
|
+
0,
|
|
719
|
+
0,
|
|
720
|
+
0,
|
|
721
|
+
2.868E-4,
|
|
722
|
+
1.193E-3,
|
|
723
|
+
8.332E-5,
|
|
724
|
+
1.239E-4,
|
|
725
|
+
2.07E-5,
|
|
726
|
+
1.829E-5
|
|
727
|
+
]
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
class G21(G):
|
|
731
|
+
|
|
732
|
+
def __init__(self):
|
|
733
|
+
xl = np.array([0, 0, 0, 100, 6.3, 5.9, 4.5], dtype=float)
|
|
734
|
+
xu = np.array([1000, 40, 40, 300, 6.7, 6.4, 6.25], dtype=float)
|
|
735
|
+
super().__init__(n_var=7, n_obj=1, n_ieq_constr=1, n_eq_constr=5, xl=xl, xu=xu, vtype=float)
|
|
736
|
+
|
|
737
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
738
|
+
f = x[:, 0]
|
|
739
|
+
g = -x[:, 0] + 35 * (x[:, 1] ** (0.6)) + 35 * (x[:, 2] ** 0.6)
|
|
740
|
+
h1 = -300 * x[:, 2] + 7500 * x[:, 4] - 7500 * x[:, 5] - 25 * x[:, 3] * x[:, 4] + 25 * x[:, 3] * x[:, 5] + x[:,
|
|
741
|
+
2] * x[
|
|
742
|
+
:,
|
|
743
|
+
3]
|
|
744
|
+
h2 = 100 * x[:, 1] + 155.365 * x[:, 3] + 2500 * x[:, 6] - x[:, 1] * x[:, 3] - 25 * x[:, 3] * x[:, 6] - 15536.5
|
|
745
|
+
h3 = -x[:, 4] + anp.log(-x[:, 3] + 900)
|
|
746
|
+
h4 = -x[:, 5] + anp.log(x[:, 3] + 300)
|
|
747
|
+
h5 = -x[:, 6] + anp.log(-2 * x[:, 3] + 700)
|
|
748
|
+
|
|
749
|
+
out["F"] = f
|
|
750
|
+
out["G"] = g
|
|
751
|
+
out["H"] = anp.column_stack([h1, h2, h3, h4, h5])
|
|
752
|
+
|
|
753
|
+
def _calc_pareto_set(self):
|
|
754
|
+
return [
|
|
755
|
+
193.724510070034967,
|
|
756
|
+
5.56944131553368433 * (10 ** -27),
|
|
757
|
+
17.3191887294084914,
|
|
758
|
+
100.047897801386839,
|
|
759
|
+
6.68445185362377892,
|
|
760
|
+
5.99168428444264833,
|
|
761
|
+
6.21451648886070451
|
|
762
|
+
]
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
class G22(G):
|
|
766
|
+
|
|
767
|
+
def __init__(self):
|
|
768
|
+
xl = np.array([0, 0, 0, 0, 0, 0, 0, 100, 100, 100.01, 100, 100, 0, 0, 0, 0.01, 0.01, -4.7, -4.7, -4.7,
|
|
769
|
+
-4.7, -4.7], dtype=float)
|
|
770
|
+
|
|
771
|
+
xu = np.array([20000, 10 ** 6, 10 ** 6, 10 ** 6, 4 * (10 ** 7), 4 * (10 ** 7), 4 * (10 ** 7), 299.99, 399.99,
|
|
772
|
+
300, 400, 600, 500, 500, 500, 300, 400, 6.25, 6.25, 6.25, 6.25, 6.25], dtype=float)
|
|
773
|
+
super().__init__(n_var=22, n_obj=1, n_ieq_constr=1, n_eq_constr=19, xl=xl, xu=xu, vtype=float)
|
|
774
|
+
|
|
775
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
776
|
+
f = x[:, 0]
|
|
777
|
+
|
|
778
|
+
g = -x[:, 0] + x[:, 1] ** 0.6 + x[:, 2] ** 0.6 + x[:, 3] ** 0.6
|
|
779
|
+
|
|
780
|
+
h1 = x[:, 4] - 100000 * x[:, 7] + 10 ** 7
|
|
781
|
+
h2 = x[:, 5] + 100000 * x[:, 7] - 100000 * x[:, 8]
|
|
782
|
+
h3 = x[:, 6] + 100000 * x[:, 8] - 5 * 10 ** 7
|
|
783
|
+
h4 = x[:, 4] + 100000 * x[:, 9] - 3.3 * 10 ** 7
|
|
784
|
+
h5 = x[:, 5] + 100000 * x[:, 10] - 4.4 * 10 ** 7
|
|
785
|
+
h6 = x[:, 6] + 100000 * x[:, 11] - 6.6 * 10 ** 7
|
|
786
|
+
h7 = x[:, 4] - 120 * x[:, 1] * x[:, 12]
|
|
787
|
+
h8 = x[:, 5] - 80 * x[:, 2] * x[:, 13]
|
|
788
|
+
h9 = x[:, 6] - 40 * x[:, 3] * x[:, 14]
|
|
789
|
+
h10 = x[:, 7] - x[:, 10] + x[:, 15]
|
|
790
|
+
h11 = x[:, 8] - x[:, 11] + x[:, 16]
|
|
791
|
+
h12 = -x[:, 17] + anp.log(x[:, 9] - 100)
|
|
792
|
+
h13 = -x[:, 18] + anp.log(-x[:, 7] + 300)
|
|
793
|
+
h14 = -x[:, 19] + anp.log(x[:, 15])
|
|
794
|
+
h15 = -x[:, 20] + anp.log(-x[:, 8] + 400)
|
|
795
|
+
h16 = -x[:, 21] + anp.log(x[:, 16])
|
|
796
|
+
h17 = -x[:, 7] - x[:, 9] + x[:, 12] * x[:, 17] - x[:, 12] * x[:, 18] + 400
|
|
797
|
+
h18 = x[:, 7] - x[:, 8] - x[:, 10] + x[:, 13] * x[:, 19] - x[:, 13] * x[:, 20] + 400
|
|
798
|
+
h19 = x[:, 8] - x[:, 11] - 4.60517 * x[:, 14] + x[:, 14] * x[:, 21] + 100
|
|
799
|
+
|
|
800
|
+
out["F"] = f
|
|
801
|
+
out["G"] = g
|
|
802
|
+
out["H"] = anp.column_stack(
|
|
803
|
+
[h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14, h15, h16, h17, h18, h19])
|
|
804
|
+
|
|
805
|
+
def _calc_pareto_set(self):
|
|
806
|
+
return [
|
|
807
|
+
236.430975504001054,
|
|
808
|
+
135.82847151732463,
|
|
809
|
+
204.818152544824585,
|
|
810
|
+
6446.54654059436416,
|
|
811
|
+
3007540.83940215595,
|
|
812
|
+
4074188.65771341929,
|
|
813
|
+
32918270.5028952882,
|
|
814
|
+
130.075408394314167,
|
|
815
|
+
170.817294970528621,
|
|
816
|
+
299.924591605478554,
|
|
817
|
+
399.258113423595205,
|
|
818
|
+
330.817294971142758,
|
|
819
|
+
184.51831230897065,
|
|
820
|
+
248.64670239647424,
|
|
821
|
+
127.658546694545862,
|
|
822
|
+
269.182627528746707,
|
|
823
|
+
160.000016724090955,
|
|
824
|
+
5.29788288102680571,
|
|
825
|
+
5.13529735903945728,
|
|
826
|
+
5.59531526444068827,
|
|
827
|
+
5.43444479314453499,
|
|
828
|
+
5.07517453535834395
|
|
829
|
+
]
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
class G23(G):
|
|
833
|
+
|
|
834
|
+
def __init__(self):
|
|
835
|
+
xl = np.array([0, 0, 0, 0, 0, 0, 0, 0, 0.01], dtype=float)
|
|
836
|
+
xu = np.array([300, 300, 100, 200, 100, 300, 100, 200, 0.03], dtype=float)
|
|
837
|
+
super().__init__(n_var=9, n_obj=1, n_ieq_constr=2, n_eq_constr=4, xl=xl, xu=xu, vtype=float)
|
|
838
|
+
|
|
839
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
840
|
+
f = -9 * x[:, 4] - 15 * x[:, 7] + 6 * x[:, 0] + 16 * x[:, 1] + 10 * (x[:, 5] + x[:, 6])
|
|
841
|
+
|
|
842
|
+
g1 = x[:, 8] * x[:, 2] + 0.02 * x[:, 5] - 0.025 * x[:, 4]
|
|
843
|
+
g2 = x[:, 8] * x[:, 3] + 0.02 * x[:, 6] - 0.015 * x[:, 7]
|
|
844
|
+
|
|
845
|
+
h1 = x[:, 0] + x[:, 1] - x[:, 2] - x[:, 3]
|
|
846
|
+
h2 = 0.03 * x[:, 0] + 0.01 * x[:, 1] - x[:, 8] * (x[:, 2] + x[:, 3])
|
|
847
|
+
h3 = x[:, 2] + x[:, 5] - x[:, 4]
|
|
848
|
+
h4 = x[:, 3] + x[:, 6] - x[:, 7]
|
|
849
|
+
|
|
850
|
+
out["F"] = f
|
|
851
|
+
out["G"] = anp.column_stack([g1, g2])
|
|
852
|
+
out["H"] = anp.column_stack([h1, h2, h3, h4])
|
|
853
|
+
|
|
854
|
+
def _calc_pareto_set(self):
|
|
855
|
+
return [0, 100, 0, 100, 0, 0, 100, 200, 0.01]
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
class G24(G):
|
|
859
|
+
|
|
860
|
+
def __init__(self):
|
|
861
|
+
xl = np.array([0, 0], dtype=float)
|
|
862
|
+
xu = np.array([3, 4], dtype=float)
|
|
863
|
+
super().__init__(n_var=2, n_obj=1, n_ieq_constr=2, xl=xl, xu=xu, vtype=float)
|
|
864
|
+
|
|
865
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
866
|
+
f = -x[:, 0] - x[:, 1]
|
|
867
|
+
g1 = -2 * x[:, 0] ** 4 + 8 * x[:, 0] ** 3 - 8 * x[:, 0] ** 2 + x[:, 1] - 2
|
|
868
|
+
g2 = -4 * x[:, 0] ** 4 + 32 * x[:, 0] ** 3 - 88 * x[:, 0] ** 2 + 96 * x[:, 0] + x[:, 1] - 36
|
|
869
|
+
|
|
870
|
+
out["F"] = f
|
|
871
|
+
out["G"] = anp.column_stack([g1, g2])
|
|
872
|
+
|
|
873
|
+
def _calc_pareto_set(self):
|
|
874
|
+
return [2.329520197477607, 3.17849307411768]
|