desdeo 1.2__py3-none-any.whl → 2.0.0__py3-none-any.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.
Files changed (122) hide show
  1. desdeo/__init__.py +8 -8
  2. desdeo/api/README.md +73 -0
  3. desdeo/api/__init__.py +15 -0
  4. desdeo/api/app.py +40 -0
  5. desdeo/api/config.py +69 -0
  6. desdeo/api/config.toml +53 -0
  7. desdeo/api/db.py +25 -0
  8. desdeo/api/db_init.py +79 -0
  9. desdeo/api/db_models.py +164 -0
  10. desdeo/api/malaga_db_init.py +27 -0
  11. desdeo/api/models/__init__.py +66 -0
  12. desdeo/api/models/archive.py +34 -0
  13. desdeo/api/models/preference.py +90 -0
  14. desdeo/api/models/problem.py +507 -0
  15. desdeo/api/models/reference_point_method.py +18 -0
  16. desdeo/api/models/session.py +46 -0
  17. desdeo/api/models/state.py +96 -0
  18. desdeo/api/models/user.py +51 -0
  19. desdeo/api/routers/_NAUTILUS.py +245 -0
  20. desdeo/api/routers/_NAUTILUS_navigator.py +233 -0
  21. desdeo/api/routers/_NIMBUS.py +762 -0
  22. desdeo/api/routers/__init__.py +5 -0
  23. desdeo/api/routers/problem.py +110 -0
  24. desdeo/api/routers/reference_point_method.py +117 -0
  25. desdeo/api/routers/session.py +76 -0
  26. desdeo/api/routers/test.py +16 -0
  27. desdeo/api/routers/user_authentication.py +366 -0
  28. desdeo/api/schema.py +94 -0
  29. desdeo/api/tests/__init__.py +0 -0
  30. desdeo/api/tests/conftest.py +59 -0
  31. desdeo/api/tests/test_models.py +701 -0
  32. desdeo/api/tests/test_routes.py +216 -0
  33. desdeo/api/utils/database.py +274 -0
  34. desdeo/api/utils/logger.py +29 -0
  35. desdeo/core.py +27 -0
  36. desdeo/emo/__init__.py +29 -0
  37. desdeo/emo/hooks/archivers.py +172 -0
  38. desdeo/emo/methods/EAs.py +418 -0
  39. desdeo/emo/methods/__init__.py +0 -0
  40. desdeo/emo/methods/bases.py +59 -0
  41. desdeo/emo/operators/__init__.py +1 -0
  42. desdeo/emo/operators/crossover.py +780 -0
  43. desdeo/emo/operators/evaluator.py +118 -0
  44. desdeo/emo/operators/generator.py +356 -0
  45. desdeo/emo/operators/mutation.py +1053 -0
  46. desdeo/emo/operators/selection.py +1036 -0
  47. desdeo/emo/operators/termination.py +178 -0
  48. desdeo/explanations/__init__.py +6 -0
  49. desdeo/explanations/explainer.py +100 -0
  50. desdeo/explanations/utils.py +90 -0
  51. desdeo/mcdm/__init__.py +19 -0
  52. desdeo/mcdm/nautili.py +345 -0
  53. desdeo/mcdm/nautilus.py +477 -0
  54. desdeo/mcdm/nautilus_navigator.py +655 -0
  55. desdeo/mcdm/nimbus.py +417 -0
  56. desdeo/mcdm/pareto_navigator.py +269 -0
  57. desdeo/mcdm/reference_point_method.py +116 -0
  58. desdeo/problem/__init__.py +79 -0
  59. desdeo/problem/evaluator.py +561 -0
  60. desdeo/problem/gurobipy_evaluator.py +562 -0
  61. desdeo/problem/infix_parser.py +341 -0
  62. desdeo/problem/json_parser.py +944 -0
  63. desdeo/problem/pyomo_evaluator.py +468 -0
  64. desdeo/problem/schema.py +1808 -0
  65. desdeo/problem/simulator_evaluator.py +298 -0
  66. desdeo/problem/sympy_evaluator.py +244 -0
  67. desdeo/problem/testproblems/__init__.py +73 -0
  68. desdeo/problem/testproblems/binh_and_korn_problem.py +88 -0
  69. desdeo/problem/testproblems/dtlz2_problem.py +102 -0
  70. desdeo/problem/testproblems/forest_problem.py +275 -0
  71. desdeo/problem/testproblems/knapsack_problem.py +163 -0
  72. desdeo/problem/testproblems/mcwb_problem.py +831 -0
  73. desdeo/problem/testproblems/mixed_variable_dimenrions_problem.py +83 -0
  74. desdeo/problem/testproblems/momip_problem.py +172 -0
  75. desdeo/problem/testproblems/nimbus_problem.py +143 -0
  76. desdeo/problem/testproblems/pareto_navigator_problem.py +89 -0
  77. desdeo/problem/testproblems/re_problem.py +492 -0
  78. desdeo/problem/testproblems/river_pollution_problem.py +434 -0
  79. desdeo/problem/testproblems/rocket_injector_design_problem.py +140 -0
  80. desdeo/problem/testproblems/simple_problem.py +351 -0
  81. desdeo/problem/testproblems/simulator_problem.py +92 -0
  82. desdeo/problem/testproblems/spanish_sustainability_problem.py +945 -0
  83. desdeo/problem/testproblems/zdt_problem.py +271 -0
  84. desdeo/problem/utils.py +245 -0
  85. desdeo/tools/GenerateReferencePoints.py +181 -0
  86. desdeo/tools/__init__.py +102 -0
  87. desdeo/tools/generics.py +145 -0
  88. desdeo/tools/gurobipy_solver_interfaces.py +258 -0
  89. desdeo/tools/indicators_binary.py +11 -0
  90. desdeo/tools/indicators_unary.py +375 -0
  91. desdeo/tools/interaction_schema.py +38 -0
  92. desdeo/tools/intersection.py +54 -0
  93. desdeo/tools/iterative_pareto_representer.py +99 -0
  94. desdeo/tools/message.py +234 -0
  95. desdeo/tools/ng_solver_interfaces.py +199 -0
  96. desdeo/tools/non_dominated_sorting.py +133 -0
  97. desdeo/tools/patterns.py +281 -0
  98. desdeo/tools/proximal_solver.py +99 -0
  99. desdeo/tools/pyomo_solver_interfaces.py +464 -0
  100. desdeo/tools/reference_vectors.py +462 -0
  101. desdeo/tools/scalarization.py +3138 -0
  102. desdeo/tools/scipy_solver_interfaces.py +454 -0
  103. desdeo/tools/score_bands.py +464 -0
  104. desdeo/tools/utils.py +320 -0
  105. desdeo/utopia_stuff/__init__.py +0 -0
  106. desdeo/utopia_stuff/data/1.json +15 -0
  107. desdeo/utopia_stuff/data/2.json +13 -0
  108. desdeo/utopia_stuff/data/3.json +15 -0
  109. desdeo/utopia_stuff/data/4.json +17 -0
  110. desdeo/utopia_stuff/data/5.json +15 -0
  111. desdeo/utopia_stuff/from_json.py +40 -0
  112. desdeo/utopia_stuff/reinit_user.py +38 -0
  113. desdeo/utopia_stuff/utopia_db_init.py +212 -0
  114. desdeo/utopia_stuff/utopia_problem.py +403 -0
  115. desdeo/utopia_stuff/utopia_problem_old.py +415 -0
  116. desdeo/utopia_stuff/utopia_reference_solutions.py +79 -0
  117. desdeo-2.0.0.dist-info/LICENSE +21 -0
  118. desdeo-2.0.0.dist-info/METADATA +168 -0
  119. desdeo-2.0.0.dist-info/RECORD +120 -0
  120. {desdeo-1.2.dist-info → desdeo-2.0.0.dist-info}/WHEEL +1 -1
  121. desdeo-1.2.dist-info/METADATA +0 -16
  122. desdeo-1.2.dist-info/RECORD +0 -4
@@ -0,0 +1,83 @@
1
+ from desdeo.problem.schema import (
2
+ Objective,
3
+ Problem,
4
+ TensorVariable,
5
+ Variable,
6
+ VariableTypeEnum,
7
+ )
8
+
9
+ def mixed_variable_dimensions_problem():
10
+ """Defines a problem with variables with mixed dimensions.
11
+
12
+ Has both Variable and TensorVariable types of variables, where the TensorVariables have
13
+ varying number of dimensions. Mostly for testing purposes.
14
+ """
15
+ x = Variable(
16
+ name="Regular variable",
17
+ symbol="x",
18
+ variable_type=VariableTypeEnum.real,
19
+ lowerbound=-1.0,
20
+ upperbound=1.0,
21
+ initial_value=0.5,
22
+ )
23
+
24
+ y = TensorVariable(
25
+ name="1D vector",
26
+ symbol="Y",
27
+ shape=[5],
28
+ variable_type=VariableTypeEnum.real,
29
+ lowerbounds=5,
30
+ upperbounds=5,
31
+ initial_values=5,
32
+ )
33
+
34
+ z = TensorVariable(
35
+ name="2D vector",
36
+ symbol="Z",
37
+ shape=[5, 2],
38
+ variable_type=VariableTypeEnum.real,
39
+ lowerbounds=-100,
40
+ upperbounds=100,
41
+ initial_values=1,
42
+ )
43
+
44
+ a = TensorVariable(
45
+ name="2D vector",
46
+ symbol="A",
47
+ shape=[2, 3, 2],
48
+ variable_type=VariableTypeEnum.real,
49
+ lowerbounds=-100,
50
+ upperbounds=100,
51
+ initial_values=1,
52
+ )
53
+
54
+ dummy = Objective(
55
+ name="dummy objective, not relevant",
56
+ symbol="f_1",
57
+ func="x - Y[1]",
58
+ maximize=False,
59
+ ideal=-1000,
60
+ nadir=1000,
61
+ is_linear=True,
62
+ is_convex=True,
63
+ is_twice_differentiable=True,
64
+ )
65
+
66
+ dummy2 = Objective(
67
+ name="dummy objective, not relevant",
68
+ symbol="f_2",
69
+ func="-x + Y[1]",
70
+ maximize=False,
71
+ ideal=-1000,
72
+ nadir=1000,
73
+ is_linear=True,
74
+ is_convex=True,
75
+ is_twice_differentiable=True,
76
+ )
77
+
78
+ return Problem(
79
+ name="Mixed variable dimensions problem",
80
+ description="A problem with variables with mixed dimensions. For testing.",
81
+ variables=[x, y, z, a],
82
+ objectives=[dummy, dummy2],
83
+ )
@@ -0,0 +1,172 @@
1
+ from desdeo.problem.schema import (
2
+ Constraint,
3
+ ConstraintTypeEnum,
4
+ Objective,
5
+ ObjectiveTypeEnum,
6
+ Problem,
7
+ Variable,
8
+ VariableTypeEnum,
9
+ )
10
+
11
+
12
+ def momip_ti2() -> Problem:
13
+ """Defines the mixed-integer multiobjective optimization problem test instance 2 (TI2).
14
+
15
+ The problem has four variables, two continuous and two integer. The Pareto optimal solutions
16
+ hold for solutions with x_1^2 + x_2^2 = 0.25 and (x_3, x_4) = {(0, -1), (-1, 0)}.
17
+
18
+ References:
19
+ Eichfelder, G., Gerlach, T., & Warnow, L. (n.d.). Test Instances for
20
+ Multiobjective Mixed-Integer Nonlinear Optimization.
21
+ """
22
+ x_1 = Variable(name="x_1", symbol="x_1", variable_type=VariableTypeEnum.real, lowerbound=-1.0, upperbound=1.0)
23
+ x_2 = Variable(name="x_2", symbol="x_2", variable_type=VariableTypeEnum.real, lowerbound=-1.0, upperbound=1.0)
24
+ x_3 = Variable(name="x_3", symbol="x_3", variable_type=VariableTypeEnum.integer, lowerbound=-1, upperbound=1)
25
+ x_4 = Variable(name="x_4", symbol="x_4", variable_type=VariableTypeEnum.integer, lowerbound=-1, upperbound=1)
26
+
27
+ f_1 = Objective(
28
+ name="f_1",
29
+ symbol="f_1",
30
+ func="x_1 + x_3",
31
+ objective_type=ObjectiveTypeEnum.analytical,
32
+ maximize=False,
33
+ is_linear=True,
34
+ is_convex=True,
35
+ is_twice_differentiable=True,
36
+ )
37
+ f_2 = Objective(
38
+ name="f_2",
39
+ symbol="f_2",
40
+ func="x_2 + x_4",
41
+ objective_type=ObjectiveTypeEnum.analytical,
42
+ maximize=False,
43
+ is_linear=True,
44
+ is_convex=True,
45
+ is_twice_differentiable=True,
46
+ )
47
+
48
+ con_1 = Constraint(
49
+ name="g_1",
50
+ symbol="g_1",
51
+ cons_type=ConstraintTypeEnum.LTE,
52
+ func="x_1**2 + x_2**2 - 0.25",
53
+ is_linear=False,
54
+ is_convex=False,
55
+ is_twice_differentiable=True,
56
+ )
57
+ con_2 = Constraint(
58
+ name="g_2",
59
+ symbol="g_2",
60
+ cons_type=ConstraintTypeEnum.LTE,
61
+ func="x_3**2 + x_4**2 - 1",
62
+ is_linear=False,
63
+ is_convex=False,
64
+ is_twice_differentiable=True,
65
+ )
66
+
67
+ return Problem(
68
+ name="MOMIP Test Instance 2",
69
+ description="Test instance 2",
70
+ variables=[x_1, x_2, x_3, x_4],
71
+ constraints=[con_1, con_2],
72
+ objectives=[f_1, f_2],
73
+ )
74
+
75
+
76
+ def momip_ti7() -> Problem:
77
+ r"""Defines the mixed-integer multiobjective optimization problem test instance 7 (T7).
78
+
79
+ The problem is defined as follows:
80
+
81
+ \begin{align}
82
+ &\min_{\mathbf{x}} & f_1(\mathbf{x}) & = x_1 + x_4 \\
83
+ &\max_{\mathbf{x}} & f_2(\mathbf{x}) & = -(x_2 + x_5) \\
84
+ &\min_{\mathbf{x}} & f_3(\mathbf{x}) & = x_3 + x_6 \\
85
+ &\text{s.t.,} & x_1^2 +x_2^2 + x_3^2 & \leq 1,\\
86
+ & & x_4^2 + x_5^2 + x_6^2 & \leq 1,\\
87
+ & & -1 \leq x_i \leq 1&\;\text{for}\;i=\{1,2,3\},\\
88
+ & & x_i \in \{-1, 0, 1\}&\;\text{for}\;i=\{4, 5, 6\}.
89
+ \end{align}
90
+
91
+ In the problem, $x_1, x_2, x_3$ are real-valued and $x_4, x_5, x_6$ are integer-valued. The problem
92
+ is convex and differentiable.
93
+
94
+ The Pareto optimal integer assignments are $(x_4, x_5, x_6) \in {(0,0,-1), (0, -1, 0), (-1,0,0)}$,
95
+ and the real-valued assignments are $\{x_1, x_2, x_3 \in \mathbb{R}^3 |
96
+ x_1^2 + x_2^2 + x_3^2 = 1, x_1 \leq 0, x_2 \leq 0, x_3 \leq 0\}$. Unlike in the original definition,
97
+ $f_2$ is formulated to be maximized instead of minimized.
98
+
99
+ References:
100
+ Eichfelder, G., Gerlach, T., & Warnow, L. (n.d.). Test Instances for
101
+ Multiobjective Mixed-Integer Nonlinear Optimization.
102
+ """
103
+ x_1 = Variable(name="x_1", symbol="x_1", variable_type=VariableTypeEnum.real)
104
+ x_2 = Variable(name="x_2", symbol="x_2", variable_type=VariableTypeEnum.real)
105
+ x_3 = Variable(name="x_3", symbol="x_3", variable_type=VariableTypeEnum.real)
106
+ x_4 = Variable(name="x_4", symbol="x_4", variable_type=VariableTypeEnum.integer, lowerbound=-1, upperbound=1)
107
+ x_5 = Variable(name="x_5", symbol="x_5", variable_type=VariableTypeEnum.integer, lowerbound=-1, upperbound=1)
108
+ x_6 = Variable(name="x_6", symbol="x_6", variable_type=VariableTypeEnum.integer, lowerbound=-1, upperbound=1)
109
+
110
+ f_1 = Objective(
111
+ name="f_1",
112
+ symbol="f_1",
113
+ func="x_1 + x_4",
114
+ objective_type=ObjectiveTypeEnum.analytical,
115
+ ideal=-3,
116
+ nadir=3,
117
+ maximize=False,
118
+ is_linear=True,
119
+ is_convex=True,
120
+ is_twice_differentiable=True,
121
+ )
122
+ f_2 = Objective(
123
+ name="f_2",
124
+ symbol="f_2",
125
+ func="-(x_2 + x_5)",
126
+ objective_type=ObjectiveTypeEnum.analytical,
127
+ ideal=3,
128
+ nadir=-3,
129
+ maximize=True,
130
+ is_linear=True,
131
+ is_convex=True,
132
+ is_twice_differentiable=True,
133
+ )
134
+ f_3 = Objective(
135
+ name="f_3",
136
+ symbol="f_3",
137
+ func="x_3 + x_6",
138
+ objective_type=ObjectiveTypeEnum.analytical,
139
+ ideal=-3,
140
+ nadir=3,
141
+ maximize=False,
142
+ is_linear=True,
143
+ is_convex=True,
144
+ is_twice_differentiable=True,
145
+ )
146
+
147
+ con_1 = Constraint(
148
+ name="g_1",
149
+ symbol="g_1",
150
+ cons_type=ConstraintTypeEnum.LTE,
151
+ func="x_1**2 + x_2**2 + x_3**2 - 1",
152
+ is_linear=False,
153
+ is_convex=False,
154
+ is_twice_differentiable=True,
155
+ )
156
+ con_2 = Constraint(
157
+ name="g_2",
158
+ symbol="g_2",
159
+ cons_type=ConstraintTypeEnum.LTE,
160
+ func="x_4**2 + x_5**2 + x_6**2 - 1",
161
+ is_linear=False,
162
+ is_convex=False,
163
+ is_twice_differentiable=True,
164
+ )
165
+
166
+ return Problem(
167
+ name="MOMIP Test Instance 7",
168
+ description="Test instance 17",
169
+ variables=[x_1, x_2, x_3, x_4, x_5, x_6],
170
+ constraints=[con_1, con_2],
171
+ objectives=[f_1, f_2, f_3],
172
+ )
@@ -0,0 +1,143 @@
1
+ from desdeo.problem.schema import (
2
+ Objective,
3
+ ObjectiveTypeEnum,
4
+ Problem,
5
+ Variable,
6
+ VariableTypeEnum,
7
+ )
8
+
9
+ def nimbus_test_problem() -> Problem:
10
+ r"""Defines the test problem utilized in the article describing Synchronous NIMBUS.
11
+
12
+ Defines the following multiobjective optimization problem:
13
+
14
+ \begin{align}
15
+ &\max_{\mathbf{x}} & f_1(\mathbf{x}) &= x_1 x_2\\
16
+ &\min_{\mathbf{x}} & f_2(\mathbf{x}) &= (x_1 - 4)^2 + x_2^2\\
17
+ &\min_{\mathbf{x}} & f_3(\mathbf{x}) &= -x_1 - x_2\\
18
+ &\min_{\mathbf{x}} & f_4(\mathbf{x}) &= x_1 - x_2\\
19
+ &\min_{\mathbf{x}} & f_5(\mathbf{x}) &= 50 x_1^4 + 10 x_2^4 \\
20
+ &\min_{\mathbf{x}} & f_6(\mathbf{x}) &= 30 (x_1 - 5)^4 + 100 (x_2 - 3)^4\\
21
+ &\text{s.t.,} && 1 \leq x_i \leq 3\quad i=\{1,2\},
22
+ \end{align}
23
+
24
+ with the following ideal point
25
+ $\mathbf{z}^\star = \left[9.0, 2.0, -6.0, -2.0, 60.0, 480.0 \right]$ and nadir point
26
+ $\mathbf{z}^\text{nad} = \left[ 1.0, 18.0, -2.0, 2.0, 4860.0, 9280.0 \right]$.
27
+
28
+ References:
29
+ Miettinen, K., & Mäkelä, M. M. (2006). Synchronous approach in
30
+ interactive multiobjective optimization. European Journal of Operational
31
+ Research, 170(3), 909–922. https://doi.org/10.1016/j.ejor.2004.07.052
32
+
33
+
34
+ Returns:
35
+ Problem: the NIMBUS test problem.
36
+ """
37
+ variables = [
38
+ Variable(
39
+ name="x_1",
40
+ symbol="x_1",
41
+ variable_type=VariableTypeEnum.real,
42
+ initial_value=1.0,
43
+ lowerbound=1.0,
44
+ upperbound=3.0,
45
+ ),
46
+ Variable(
47
+ name="x_2",
48
+ symbol="x_2",
49
+ variable_type=VariableTypeEnum.real,
50
+ initial_value=1.0,
51
+ lowerbound=1.0,
52
+ upperbound=3.0,
53
+ ),
54
+ ]
55
+
56
+ f_1_expr = "x_1 * x_2"
57
+ f_2_expr = "(x_1 - 4)**2 + x_2**2"
58
+ f_3_expr = "-x_1 - x_2"
59
+ f_4_expr = "x_1 - x_2"
60
+ f_5_expr = "50 * x_1**4 + 10 * x_2**4"
61
+ f_6_expr = "30 * (x_1 - 5)**4 + 100*(x_2 - 3)**4"
62
+
63
+ objectives = [
64
+ Objective(
65
+ name="Objective 1",
66
+ symbol="f_1",
67
+ func=f_1_expr,
68
+ maximize=True,
69
+ objective_type=ObjectiveTypeEnum.analytical,
70
+ ideal=9.0,
71
+ nadir=1.0,
72
+ is_convex=False,
73
+ is_linear=False,
74
+ is_twice_differentiable=True,
75
+ ),
76
+ Objective(
77
+ name="Objective 2",
78
+ symbol="f_2",
79
+ func=f_2_expr,
80
+ maximize=False,
81
+ objective_type=ObjectiveTypeEnum.analytical,
82
+ ideal=2.0,
83
+ nadir=18.0,
84
+ is_convex=False,
85
+ is_linear=False,
86
+ is_twice_differentiable=True,
87
+ ),
88
+ Objective(
89
+ name="Objective 3",
90
+ symbol="f_3",
91
+ func=f_3_expr,
92
+ maximize=False,
93
+ objective_type=ObjectiveTypeEnum.analytical,
94
+ ideal=-6.0,
95
+ nadir=-2.0,
96
+ is_convex=True,
97
+ is_linear=True,
98
+ is_twice_differentiable=True,
99
+ ),
100
+ Objective(
101
+ name="Objective 4",
102
+ symbol="f_4",
103
+ func=f_4_expr,
104
+ maximize=False,
105
+ objective_type=ObjectiveTypeEnum.analytical,
106
+ ideal=-2.0,
107
+ nadir=2.0,
108
+ is_convex=True,
109
+ is_linear=True,
110
+ is_twice_differentiable=True,
111
+ ),
112
+ Objective(
113
+ name="Objective 5",
114
+ symbol="f_5",
115
+ func=f_5_expr,
116
+ maximize=False,
117
+ objective_type=ObjectiveTypeEnum.analytical,
118
+ ideal=60.0,
119
+ nadir=4860.0,
120
+ is_convex=False,
121
+ is_linear=False,
122
+ is_twice_differentiable=True,
123
+ ),
124
+ Objective(
125
+ name="Objective 6",
126
+ symbol="f_6",
127
+ func=f_6_expr,
128
+ maximize=False,
129
+ objective_type=ObjectiveTypeEnum.analytical,
130
+ ideal=480.0,
131
+ nadir=9280.0,
132
+ is_convex=False,
133
+ is_linear=False,
134
+ is_twice_differentiable=True,
135
+ ),
136
+ ]
137
+
138
+ return Problem(
139
+ name="NIMBUS test problem",
140
+ description="The test problem used in the Synchronous NIMBUS article",
141
+ variables=variables,
142
+ objectives=objectives,
143
+ )
@@ -0,0 +1,89 @@
1
+ from desdeo.problem.schema import (
2
+ Constraint,
3
+ ConstraintTypeEnum,
4
+ DiscreteRepresentation,
5
+ Objective,
6
+ ObjectiveTypeEnum,
7
+ Problem,
8
+ Variable,
9
+ VariableTypeEnum,
10
+ )
11
+
12
+ def pareto_navigator_test_problem() -> Problem:
13
+ r"""Defines the problem utilized in the (convex) Pareto navigator article.
14
+
15
+ The problem is defined as follows:
16
+
17
+ \begin{align}
18
+ &\min_{\mathbf{x}} & f_1(\mathbf{x}) & = -x_1 - x_2 + 5 \\
19
+ &\min_{\mathbf{x}} & f_2(\mathbf{x}) & = 0.2(x_1^2 -10x_1 + x_2^2 - 4x_2 + 11) \\
20
+ &\min_{\mathbf{x}} & f_3(\mathbf{x}) & = (5 - x_1)(x_2 - 11)\\
21
+ &\text{s.t.,} & 3x_1 + x_2 - 12 & \leq 0,\\
22
+ & & 2x_1 + x_2 - 9 & \leq 0,\\
23
+ & & x_1 + 2x_2 - 12 & \leq 0,\\
24
+ & & 0 \leq x_1 & \leq 4,\\
25
+ & & 0 \leq x_2 & \leq 6.
26
+ \end{align}
27
+
28
+ The problem comes with seven pre-defined Pareto optimal solutions that were
29
+ utilized in the original article as well. From these, the ideal and nadir
30
+ points of the problem are approximated also.
31
+
32
+ References:
33
+ Eskelinen, P., Miettinen, K., Klamroth, K., & Hakanen, J. (2010). Pareto
34
+ navigator for interactive nonlinear multiobjective optimization. OR
35
+ Spectrum, 32(1), 211-227.
36
+ """
37
+ x_1 = Variable(name="x_1", symbol="x_1", variable_type=VariableTypeEnum.real, lowerbound=0, upperbound=4)
38
+ x_2 = Variable(name="x_2", symbol="x_2", variable_type=VariableTypeEnum.real, lowerbound=0, upperbound=6)
39
+
40
+ f_1 = Objective(
41
+ name="f_1",
42
+ symbol="f_1",
43
+ func="-x_1 - x_2 + 5",
44
+ objective_type=ObjectiveTypeEnum.analytical,
45
+ ideal=-2.0,
46
+ nadir=5.0,
47
+ maximize=False,
48
+ )
49
+ f_2 = Objective(
50
+ name="f_2",
51
+ symbol="f_2",
52
+ func="0.2*(x_1**2 - 10*x_1 + x_2**2 - 4*x_2 + 11)",
53
+ objective_type=ObjectiveTypeEnum.analytical,
54
+ ideal=-3.1,
55
+ nadir=4.60,
56
+ maximize=False,
57
+ )
58
+ f_3 = Objective(
59
+ name="f_3",
60
+ symbol="f_3",
61
+ func="(5 - x_1) * (x_2 - 11)",
62
+ objective_type=ObjectiveTypeEnum.analytical,
63
+ ideal=-55.0,
64
+ nadir=-14.25,
65
+ maximize=False,
66
+ )
67
+
68
+ con_1 = Constraint(name="g_1", symbol="g_1", func="3*x_1 + x_2 - 12", cons_type=ConstraintTypeEnum.LTE)
69
+ con_2 = Constraint(name="g_2", symbol="g_2", func="2*x_1 + x_2 - 9", cons_type=ConstraintTypeEnum.LTE)
70
+ con_3 = Constraint(name="g_3", symbol="g_3", func="x_1 + 2*x_2 - 12", cons_type=ConstraintTypeEnum.LTE)
71
+
72
+ representation = DiscreteRepresentation(
73
+ variable_values={"x_1": [0, 0, 0, 0, 0, 0, 0], "x_2": [0, 0, 0, 0, 0, 0, 0]},
74
+ objective_values={
75
+ "f_1": [-2.0, -1.0, 0.0, 1.38, 1.73, 2.48, 5.0],
76
+ "f_2": [0.0, 4.6, -3.1, 0.62, 1.72, 1.45, 2.2],
77
+ "f_3": [-18.0, -25.0, -14.25, -35.33, -38.64, -42.41, -55.0],
78
+ },
79
+ non_dominated=True,
80
+ )
81
+
82
+ return Problem(
83
+ name="The (convex) Pareto navigator problem.",
84
+ description="The test problem used in the (convex) Pareto navigator paper.",
85
+ variables=[x_1, x_2],
86
+ objectives=[f_1, f_2, f_3],
87
+ constraints=[con_1, con_2, con_3],
88
+ discrete_representation=representation,
89
+ )