pydmoo 0.0.18__py3-none-any.whl → 0.1.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.
- pydmoo/algorithms/base/__init__.py +20 -0
- pydmoo/algorithms/base/core/__init__.py +0 -0
- pydmoo/algorithms/base/core/algorithm.py +416 -0
- pydmoo/algorithms/base/core/genetic.py +129 -0
- pydmoo/algorithms/base/dmoo/__init__.py +0 -0
- pydmoo/algorithms/base/dmoo/dmoead.py +131 -0
- pydmoo/algorithms/base/dmoo/dmoeadde.py +131 -0
- pydmoo/algorithms/base/dmoo/dmopso.py +0 -0
- pydmoo/algorithms/base/dmoo/dnsga2.py +137 -0
- pydmoo/algorithms/base/moo/__init__.py +0 -0
- pydmoo/algorithms/base/moo/moead.py +199 -0
- pydmoo/algorithms/base/moo/moeadde.py +105 -0
- pydmoo/algorithms/base/moo/mopso.py +0 -0
- pydmoo/algorithms/base/moo/nsga2.py +122 -0
- pydmoo/algorithms/modern/__init__.py +94 -0
- pydmoo/algorithms/modern/moead_imkt.py +161 -0
- pydmoo/algorithms/modern/moead_imkt_igp.py +56 -0
- pydmoo/algorithms/modern/moead_imkt_lstm.py +109 -0
- pydmoo/algorithms/modern/moead_imkt_n.py +117 -0
- pydmoo/algorithms/modern/moead_imkt_n_igp.py +56 -0
- pydmoo/algorithms/modern/moead_imkt_n_lstm.py +111 -0
- pydmoo/algorithms/modern/moead_ktmm.py +112 -0
- pydmoo/algorithms/modern/moeadde_imkt.py +161 -0
- pydmoo/algorithms/modern/moeadde_imkt_clstm.py +223 -0
- pydmoo/algorithms/modern/moeadde_imkt_igp.py +56 -0
- pydmoo/algorithms/modern/moeadde_imkt_lstm.py +212 -0
- pydmoo/algorithms/modern/moeadde_imkt_n.py +117 -0
- pydmoo/algorithms/modern/moeadde_imkt_n_clstm.py +146 -0
- pydmoo/algorithms/modern/moeadde_imkt_n_igp.py +56 -0
- pydmoo/algorithms/modern/moeadde_imkt_n_lstm.py +114 -0
- pydmoo/algorithms/modern/moeadde_ktmm.py +112 -0
- pydmoo/algorithms/modern/nsga2_imkt.py +162 -0
- pydmoo/algorithms/modern/nsga2_imkt_clstm.py +223 -0
- pydmoo/algorithms/modern/nsga2_imkt_igp.py +56 -0
- pydmoo/algorithms/modern/nsga2_imkt_lstm.py +248 -0
- pydmoo/algorithms/modern/nsga2_imkt_n.py +117 -0
- pydmoo/algorithms/modern/nsga2_imkt_n_clstm.py +146 -0
- pydmoo/algorithms/modern/nsga2_imkt_n_igp.py +57 -0
- pydmoo/algorithms/modern/nsga2_imkt_n_lstm.py +154 -0
- pydmoo/algorithms/modern/nsga2_ktmm.py +112 -0
- pydmoo/algorithms/utils/__init__.py +0 -0
- pydmoo/algorithms/utils/utils.py +166 -0
- pydmoo/core/__init__.py +0 -0
- pydmoo/{response → core}/ar_model.py +4 -4
- pydmoo/{response → core}/bounds.py +35 -2
- pydmoo/core/distance.py +45 -0
- pydmoo/core/inverse.py +55 -0
- pydmoo/core/lstm/__init__.py +0 -0
- pydmoo/core/lstm/base.py +291 -0
- pydmoo/core/lstm/lstm.py +491 -0
- pydmoo/core/manifold.py +93 -0
- pydmoo/core/predictions.py +50 -0
- pydmoo/core/sample_gaussian.py +56 -0
- pydmoo/core/sample_uniform.py +63 -0
- pydmoo/{response/tca_model.py → core/transfer.py} +3 -3
- pydmoo/problems/__init__.py +53 -49
- pydmoo/problems/dyn.py +94 -13
- pydmoo/problems/dynamic/cec2015.py +10 -5
- pydmoo/problems/dynamic/df.py +6 -3
- pydmoo/problems/dynamic/gts.py +69 -34
- pydmoo/problems/real_world/__init__.py +0 -0
- pydmoo/problems/real_world/dsrp.py +168 -0
- pydmoo/problems/real_world/dwbdp.py +189 -0
- {pydmoo-0.0.18.dist-info → pydmoo-0.1.0.dist-info}/METADATA +11 -10
- pydmoo-0.1.0.dist-info/RECORD +70 -0
- {pydmoo-0.0.18.dist-info → pydmoo-0.1.0.dist-info}/WHEEL +1 -1
- pydmoo-0.0.18.dist-info/RECORD +0 -15
- /pydmoo/{response → algorithms}/__init__.py +0 -0
- {pydmoo-0.0.18.dist-info → pydmoo-0.1.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"""Provide the real-world applications of Dynamic Multi-Objective Optimization."""
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
|
|
5
|
+
from pydmoo.problems.dyn import DynamicApplProblem
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DSRP(DynamicApplProblem):
|
|
9
|
+
"""Dynamic Speed Reducer Problem (DSRP).
|
|
10
|
+
|
|
11
|
+
Kurpati, A., Azarm, S., and Wu, J. (2002).
|
|
12
|
+
Constraint handling improvements for multiobjective genetic algorithms.
|
|
13
|
+
Structural and Multidisciplinary Optimization, 23(3), 204–213.
|
|
14
|
+
https://doi.org/10.1007/s00158-002-0178-2
|
|
15
|
+
g9 = 1.9 - x5 + 1.1x7 <= 0 --- [x]
|
|
16
|
+
g10 = f1 - 1300 <= 0 --------- [x]
|
|
17
|
+
|
|
18
|
+
Zhang, Z., and Qian, S. (2011).
|
|
19
|
+
Artificial immune system in dynamic environments solving time-varying non-linear constrained multi-objective problems.
|
|
20
|
+
Soft Computing, 15(7), 1333–1349.
|
|
21
|
+
https://doi.org/10.1007/s00500-010-0674-z
|
|
22
|
+
g9 = 1.9 - x5 + 1.1x1 <= 0
|
|
23
|
+
g10 = f1 - 4300 <= 0
|
|
24
|
+
|
|
25
|
+
Zhang, Q., He, X., Yang, S., Dong, Y., Song, H., and Jiang, S. (2022).
|
|
26
|
+
Solving dynamic multi-objective problems using polynomial fitting-based prediction algorithm.
|
|
27
|
+
Information Sciences, 610, 868–886.
|
|
28
|
+
https://doi.org/10.1016/j.ins.2022.08.020
|
|
29
|
+
g9 = 1.9 - x5 + 1.1x1 <= 0
|
|
30
|
+
g10 = f1 - 4300 <= 0
|
|
31
|
+
|
|
32
|
+
Zou, J., Hou, Z., Jiang, S., Yang, S., Ruan, G., Xia, Y., and Liu, Y. (2025).
|
|
33
|
+
Knowledge transfer with mixture model in dynamic multi-objective optimization.
|
|
34
|
+
IEEE Transactions on Evolutionary Computation, 29(5), 1517–1530.
|
|
35
|
+
https://doi.org/10.1109/TEVC.2025.3566481
|
|
36
|
+
g9 = 1.9 - x5 + 1.1x1 <= 0
|
|
37
|
+
g10 = f1 - 4300 <= 0
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, n_var=7, n_obj=2, nt=10, taut=10, **kwargs):
|
|
41
|
+
super().__init__(
|
|
42
|
+
nt,
|
|
43
|
+
taut,
|
|
44
|
+
n_var=n_var,
|
|
45
|
+
n_obj=n_obj,
|
|
46
|
+
n_ieq_constr=11,
|
|
47
|
+
xl=[2.6, 0.7, 17, 7.3, 7.3, 2.9, 5.0],
|
|
48
|
+
xu=[3.6, 0.8, 28, 8.3, 8.3, 3.9, 5.5],
|
|
49
|
+
**kwargs,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
53
|
+
t = self.time
|
|
54
|
+
x1, x2, x3, x4, x5, x6, x7 = x.T
|
|
55
|
+
|
|
56
|
+
f1 = (
|
|
57
|
+
a1_func(t) * x1 * x2**2 * (10 / 3 * x3**2 + a2_func(t) * x3 - a3_func(t))
|
|
58
|
+
- a4_func(t) * x1 * (x6**2 + x7**2)
|
|
59
|
+
+ a5_func(t) * (x6**3 + x7**3)
|
|
60
|
+
+ a6_func(t) * (x4 * x6**2 + x5 * x7**2)
|
|
61
|
+
)
|
|
62
|
+
f2 = np.sqrt((745.0 * x4 / (x2 * x3)) ** 2 + 1.69e7) / (a7_func(t) * x6**3)
|
|
63
|
+
|
|
64
|
+
out["F"] = np.column_stack([f1, f2])
|
|
65
|
+
|
|
66
|
+
out["G"] = evaluate_constraints(x, f1)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def a1_func(t):
|
|
70
|
+
a1 = 0.7854
|
|
71
|
+
return a1 + t / 10
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def a2_func(t):
|
|
75
|
+
a2 = 14.933
|
|
76
|
+
return a2 + t / 10
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def a3_func(t):
|
|
80
|
+
a3 = 43.0934
|
|
81
|
+
return a3 + t / 10
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def a4_func(t):
|
|
85
|
+
a4 = 1.508
|
|
86
|
+
return a4 + t / 10
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def a5_func(t):
|
|
90
|
+
a5 = 7.477
|
|
91
|
+
return a5 + t / 10
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def a6_func(t):
|
|
95
|
+
a6 = 0.7854
|
|
96
|
+
return a6 + t / 10
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def a7_func(t):
|
|
100
|
+
a7 = 0.1
|
|
101
|
+
return a7 + (0.25 - 1 / (t + 4))
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def evaluate_constraints(x, f1):
|
|
105
|
+
"""
|
|
106
|
+
Evaluate all constraint functions for the speed reducer design problem.
|
|
107
|
+
|
|
108
|
+
Parameters
|
|
109
|
+
----------
|
|
110
|
+
x : numpy.ndarray of shape (n_samples, 7)
|
|
111
|
+
Decision variable matrix where each row represents a solution vector
|
|
112
|
+
[x1, x2, x3, x4, x5, x6, x7].
|
|
113
|
+
f1 :
|
|
114
|
+
Objective function value
|
|
115
|
+
|
|
116
|
+
Returns
|
|
117
|
+
-------
|
|
118
|
+
g : numpy.ndarray of shape (n_samples, 11)
|
|
119
|
+
Constraint violation matrix. g[:, i] <= 0 indicates the i-th constraint is satisfied.
|
|
120
|
+
Each column corresponds to constraints g1 through g11.
|
|
121
|
+
"""
|
|
122
|
+
n_samples = x.shape[0]
|
|
123
|
+
g = np.zeros((n_samples, 11))
|
|
124
|
+
|
|
125
|
+
# Extract design variables (0-based indexing in Python)
|
|
126
|
+
x1 = x[:, 0] # Gear face width
|
|
127
|
+
x2 = x[:, 1] # Teeth module
|
|
128
|
+
x3 = x[:, 2] # Number of teeth of pinion
|
|
129
|
+
x4 = x[:, 3] # Distance between bearings 1
|
|
130
|
+
x5 = x[:, 4] # Distance between bearings 2
|
|
131
|
+
x6 = x[:, 5] # Diameter of shaft 1
|
|
132
|
+
x7 = x[:, 6] # Diameter of shaft 2
|
|
133
|
+
|
|
134
|
+
# g1: Geometric constraint related to gear dimensions
|
|
135
|
+
g[:, 0] = 1.0 / (x1 * x2**2 * x3) - 1.0 / 27.0
|
|
136
|
+
|
|
137
|
+
# g2: Second geometric constraint for gear design
|
|
138
|
+
g[:, 1] = 1.0 / (x1 * x2**2 * x3**2) - 1.0 / 397.5
|
|
139
|
+
|
|
140
|
+
# g3: Stiffness or stress constraint for shaft 1
|
|
141
|
+
# Note: Original text has x5^5 but likely should be x5^3 for symmetry with g3
|
|
142
|
+
g[:, 2] = x4**3 / (x2 * x3 * x6**4) - 1.0 / 1.93
|
|
143
|
+
|
|
144
|
+
# g4: Stiffness or stress constraint for shaft 2
|
|
145
|
+
g[:, 3] = x5**3 / (x2 * x3 * x7**4) - 1.0 / 1.93
|
|
146
|
+
|
|
147
|
+
# g5: Constraint on gear size (teeth module x number of teeth)
|
|
148
|
+
g[:, 4] = x2 * x3 - 40.0
|
|
149
|
+
|
|
150
|
+
# g6: Upper bound constraint on face width to module ratio
|
|
151
|
+
g[:, 5] = x1 / x2 - 12.0
|
|
152
|
+
|
|
153
|
+
# g7: Lower bound constraint on face width to module ratio (rearranged form)
|
|
154
|
+
g[:, 6] = 5.0 - x1 / x2
|
|
155
|
+
|
|
156
|
+
# g8: Relationship between bearing distance 1 and shaft 1 diameter
|
|
157
|
+
g[:, 7] = 1.9 - x4 + 1.5 * x6
|
|
158
|
+
|
|
159
|
+
# g9: Relationship between bearing distance 2 and gear face width
|
|
160
|
+
g[:, 8] = 1.9 - x5 + 1.1 * x1
|
|
161
|
+
|
|
162
|
+
# g10: Upper bound constraint on weight objective function f1
|
|
163
|
+
g[:, 9] = f1 - 4300.0
|
|
164
|
+
|
|
165
|
+
# g11: Stress constraint for shaft 2
|
|
166
|
+
g[:, 10] = np.sqrt((745.0 * x5 / (x2 * x3)) ** 2 + 1.515e8) / (0.1 * x7**3) - 1100.0
|
|
167
|
+
|
|
168
|
+
return g
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
from pydmoo.problems.dyn import DynamicApplProblem
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class DWBDP(DynamicApplProblem):
|
|
7
|
+
r"""Dynamic Welded Beam Design Problem (DWBDP).
|
|
8
|
+
|
|
9
|
+
A multi-objective optimization problem with time-varying constraints and objectives
|
|
10
|
+
that minimizes both manufacturing cost and beam deflection under dynamic loading conditions.
|
|
11
|
+
|
|
12
|
+
Objectives
|
|
13
|
+
----------
|
|
14
|
+
f1 : float
|
|
15
|
+
Manufacturing cost ($), comprising setup cost, welding labor cost, and material cost
|
|
16
|
+
f2 : float
|
|
17
|
+
Beam deflection (inch) under applied load
|
|
18
|
+
|
|
19
|
+
Variables
|
|
20
|
+
---------
|
|
21
|
+
x : ndarray, shape (4,)
|
|
22
|
+
x[0] : weld thickness h (inch)
|
|
23
|
+
x[1] : weld length l (inch)
|
|
24
|
+
x[2] : beam height t (inch)
|
|
25
|
+
x[3] : beam thickness b (inch)
|
|
26
|
+
|
|
27
|
+
Constraints
|
|
28
|
+
-----------
|
|
29
|
+
g1 : float
|
|
30
|
+
Shear stress constraint ($\tau <= 13,600$)
|
|
31
|
+
g2 : float
|
|
32
|
+
Bending stress constraint ($\sigma ≤ 30,000$)
|
|
33
|
+
g3 : float
|
|
34
|
+
Geometric constraint ($h <= b$)
|
|
35
|
+
g4 : float
|
|
36
|
+
Buckling constraint ($P <= P_critical$)
|
|
37
|
+
|
|
38
|
+
Notes
|
|
39
|
+
-----
|
|
40
|
+
It should be noted that in the formulation [1], the variable used in the expression
|
|
41
|
+
for the resultant shear stress $\tau$ is $x_2$, rather than $x_3$ as may appear in certain
|
|
42
|
+
alternative formulations. Readers are advised to verify the specific variable
|
|
43
|
+
definitions and indexing used in the respective reference to ensure consistency
|
|
44
|
+
in implementation.
|
|
45
|
+
|
|
46
|
+
The problem incorporates temporal variations through time-dependent loading
|
|
47
|
+
conditions P(t), making it suitable for testing dynamic multi-objective
|
|
48
|
+
optimization algorithms.
|
|
49
|
+
|
|
50
|
+
References
|
|
51
|
+
----------
|
|
52
|
+
Oyama, A., Shimoyama, K., and Fujii, K. (2005).
|
|
53
|
+
New constraint-handling method for multi-objective multi-constraint evolutionary optimization and its application to space plane design.
|
|
54
|
+
Evolutionary and Deterministic Methods for Design, Optimization and Control with Applications to Industrial and Societal Problems.
|
|
55
|
+
https://ladse.eng.isas.jaxa.jp/papers/eurogen2005.pdf
|
|
56
|
+
|
|
57
|
+
Zhang, Z., and Qian, S. (2011).
|
|
58
|
+
Artificial immune system in dynamic environments solving time-varying non-linear constrained multi-objective problems.
|
|
59
|
+
Soft Computing, 15(7), 1333–1349.
|
|
60
|
+
https://doi.org/10.1007/s00500-010-0674-z
|
|
61
|
+
|
|
62
|
+
Zhang, Q., He, X., Yang, S., Dong, Y., Song, H., and Jiang, S. (2022).
|
|
63
|
+
Solving dynamic multi-objective problems using polynomial fitting-based prediction algorithm.
|
|
64
|
+
Information Sciences, 610, 868–886.
|
|
65
|
+
https://doi.org/10.1016/j.ins.2022.08.020
|
|
66
|
+
|
|
67
|
+
https://www.mathworks.com/help/gads/multiobjective-optimization-welded-beam.html
|
|
68
|
+
|
|
69
|
+
https://github.com/Amir-M-Vahedi/Welded-Beam-Design-Optimization/blob/main/Welded_Beam_Design_Project_D3.py
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
def __init__(self, n_var=4, n_obj=2, nt=1, taut=10, **kwargs):
|
|
73
|
+
# COMPULSORY
|
|
74
|
+
nt = 1
|
|
75
|
+
|
|
76
|
+
super().__init__(
|
|
77
|
+
nt, taut, n_var=n_var, n_obj=n_obj, n_ieq_constr=4, xl=[55, 75, 1000, 2], xu=[80, 110, 3000, 20], **kwargs
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
# Material properties and constants
|
|
81
|
+
self.E = 3.0e7 # Young's modulus (psi)
|
|
82
|
+
self.G = 1.2e7 # Shear modulus (psi)
|
|
83
|
+
self.L = 14.0 # Beam length (inch)
|
|
84
|
+
|
|
85
|
+
# Load cases: (time, load in lb)
|
|
86
|
+
self.load_cases = {0: 10000, 1: 80000, 2: 6000, 3: 3000}
|
|
87
|
+
|
|
88
|
+
# [55, 80], # x1: weld thickness bounds
|
|
89
|
+
# [75, 110], # x2: weld length bounds
|
|
90
|
+
# [1000, 3000], # x3: beam height bounds
|
|
91
|
+
# [2, 20], # x4: beam thickness bounds
|
|
92
|
+
|
|
93
|
+
#
|
|
94
|
+
# lb = [55, 75, 1000, 2]
|
|
95
|
+
# ub = [80, 110, 3000, 20]
|
|
96
|
+
|
|
97
|
+
#
|
|
98
|
+
# lb = [0.125, 0.1, 0.1, 0.125]
|
|
99
|
+
# ub = [5, 10, 10 ,5]
|
|
100
|
+
|
|
101
|
+
def _evaluate(self, x, out, *args, **kwargs):
|
|
102
|
+
t = self.time
|
|
103
|
+
x1, x2, x3, x4 = x.T
|
|
104
|
+
P = self.load_cases[int(t % 4)]
|
|
105
|
+
|
|
106
|
+
f1 = f1 = 1.10471 * x1**2 * x2 + 0.04811 * x3 * x4 * (14 + x2)
|
|
107
|
+
|
|
108
|
+
f2 = (4 * P * self.L**3) / (self.E * x3**3 * x4)
|
|
109
|
+
|
|
110
|
+
out["F"] = np.column_stack([f1, f2])
|
|
111
|
+
|
|
112
|
+
out["G"] = self.evaluate_constraints(x, P)
|
|
113
|
+
|
|
114
|
+
def calculate_auxiliary_variables(self, x, P) -> tuple:
|
|
115
|
+
"""Calculate intermediate variables needed for constraint evaluation.
|
|
116
|
+
|
|
117
|
+
Parameters
|
|
118
|
+
----------
|
|
119
|
+
x : np.ndarray, shape (4,)
|
|
120
|
+
Design variables [x1, x2, x3, x4]
|
|
121
|
+
P : float
|
|
122
|
+
Applied load (lb)
|
|
123
|
+
|
|
124
|
+
Returns
|
|
125
|
+
-------
|
|
126
|
+
tuple : (tau, pc)
|
|
127
|
+
tau : float - Resultant shear stress (psi)
|
|
128
|
+
pc : float - Critical buckling load (lb)
|
|
129
|
+
"""
|
|
130
|
+
x1, x2, x3, x4 = x.T
|
|
131
|
+
|
|
132
|
+
# Radius to neutral axis
|
|
133
|
+
R = np.sqrt(x2**2 / 4 + ((x1 + x3) / 2) ** 2)
|
|
134
|
+
|
|
135
|
+
# Polar moment of inertia
|
|
136
|
+
J = 2 * np.sqrt(2) * x1 * x2 * (x2**2 / 12 + ((x1 + x3) / 2) ** 2)
|
|
137
|
+
|
|
138
|
+
# Bending moment
|
|
139
|
+
M = P * (self.L + x2 / 2)
|
|
140
|
+
|
|
141
|
+
# Primary and secondary shear stresses
|
|
142
|
+
tau1 = P / (np.sqrt(2) * x1 * x2)
|
|
143
|
+
tau2 = (M * R) / J
|
|
144
|
+
|
|
145
|
+
# Resultant shear stress
|
|
146
|
+
tau = np.sqrt(tau1**2 + 2 * tau1 * tau2 * (x2 / (2 * R)) + tau2**2)
|
|
147
|
+
|
|
148
|
+
# Critical buckling load
|
|
149
|
+
pc_numerator = 4.013 * self.E * x3 * x4**3
|
|
150
|
+
pc_denominator = 6 * self.L**2
|
|
151
|
+
pc_adjustment = 1 - (x3 / (2 * self.L)) * np.sqrt(self.E / (4 * self.G))
|
|
152
|
+
pc = (pc_numerator / pc_denominator) * pc_adjustment
|
|
153
|
+
|
|
154
|
+
return tau, pc
|
|
155
|
+
|
|
156
|
+
def evaluate_constraints(self, x, P):
|
|
157
|
+
"""Evaluate all constraint functions.
|
|
158
|
+
|
|
159
|
+
Parameters
|
|
160
|
+
----------
|
|
161
|
+
x : np.ndarray, shape (4,)
|
|
162
|
+
Design variables [x1, x2, x3, x4]
|
|
163
|
+
|
|
164
|
+
Returns
|
|
165
|
+
-------
|
|
166
|
+
np.ndarray
|
|
167
|
+
Constraint values (should be <= 0 for feasibility)
|
|
168
|
+
"""
|
|
169
|
+
n_samples = x.shape[0]
|
|
170
|
+
g = np.zeros((n_samples, 4))
|
|
171
|
+
|
|
172
|
+
x1, _, x3, x4 = x.T
|
|
173
|
+
|
|
174
|
+
# Evaluate constraints for specific load case
|
|
175
|
+
tau, pc = self.calculate_auxiliary_variables(x, P)
|
|
176
|
+
|
|
177
|
+
# g1: Shear stress constraint (tau <= 13,600 psi)
|
|
178
|
+
g[:, 0] = tau - 13600
|
|
179
|
+
|
|
180
|
+
# g2: Bending stress constraint (sigma <= 30,000 psi)
|
|
181
|
+
g[:, 1] = (6 * P * self.L) / (x4 * x3**2) - 30000
|
|
182
|
+
|
|
183
|
+
# g3: Geometric constraint (x1 <= x4)
|
|
184
|
+
g[:, 2] = x1 - x4
|
|
185
|
+
|
|
186
|
+
# g4: Buckling constraint (P <= pc)
|
|
187
|
+
g[:, 3] = P - pc
|
|
188
|
+
|
|
189
|
+
return g
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydmoo
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 0.1.0
|
|
4
4
|
Summary: Dynamic Multi-Objective Optimization in Python (pydmoo).
|
|
5
5
|
Project-URL: Homepage, https://github.com/dynoptimization/pydmoo
|
|
6
6
|
Project-URL: Repository, https://github.com/dynoptimization/pydmoo
|
|
@@ -23,17 +23,19 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
23
23
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
24
24
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
25
25
|
Requires-Python: >=3.12
|
|
26
|
-
Requires-Dist: matplotlib>=3.10.
|
|
26
|
+
Requires-Dist: matplotlib>=3.10.8
|
|
27
27
|
Requires-Dist: mpmath>=1.3.0
|
|
28
|
-
Requires-Dist: numpy>=2.
|
|
28
|
+
Requires-Dist: numpy>=2.4.0
|
|
29
29
|
Requires-Dist: pandas>=2.3.3
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
30
|
+
Requires-Dist: psutil>=7.2.0
|
|
31
|
+
Requires-Dist: pymoo==0.6.1.6
|
|
32
|
+
Requires-Dist: scikit-learn>=1.8.0
|
|
32
33
|
Requires-Dist: scikit-posthocs>=0.11.4
|
|
33
|
-
Requires-Dist: scipy>=1.16.
|
|
34
|
+
Requires-Dist: scipy>=1.16.3
|
|
34
35
|
Requires-Dist: seaborn>=0.13.2
|
|
35
|
-
Requires-Dist: statsmodels>=0.14.
|
|
36
|
+
Requires-Dist: statsmodels>=0.14.6
|
|
36
37
|
Requires-Dist: tabulate>=0.9.0
|
|
38
|
+
Requires-Dist: torch>=2.9.1
|
|
37
39
|
Description-Content-Type: text/markdown
|
|
38
40
|
|
|
39
41
|
# Dynamic Multi-Objective Optimization in Python
|
|
@@ -41,7 +43,6 @@ Description-Content-Type: text/markdown
|
|
|
41
43
|
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
|
42
44
|

|
|
43
45
|
[](https://pypi.org/project/pydmoo/)
|
|
46
|
+

|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## Dynamic Multi-Objective Optimization Algorithms (DMOAs)
|
|
48
|
+
Please refer to the [documentation](https://dynoptimization.github.io/pydmoo/) for more details.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
pydmoo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
pydmoo/algorithms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
pydmoo/algorithms/base/__init__.py,sha256=R0KeuLJKZpQ4oZa4iWzpuwx6mdtvHBUUgCGAwDl78Tw,427
|
|
4
|
+
pydmoo/algorithms/base/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
pydmoo/algorithms/base/core/algorithm.py,sha256=nFeyj1PECWk4q2W5_7utwqSjxVIx-DA3_8o-wzHxc50,12967
|
|
6
|
+
pydmoo/algorithms/base/core/genetic.py,sha256=8tbgrUv98e_GCABm-O7GrYVwMlTm8rr7uqlybyvMsHM,4894
|
|
7
|
+
pydmoo/algorithms/base/dmoo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
pydmoo/algorithms/base/dmoo/dmoead.py,sha256=GKKWTSFLpHgNw6DGldn8emhkxXSeqNC9BgOTTEY5AyM,4154
|
|
9
|
+
pydmoo/algorithms/base/dmoo/dmoeadde.py,sha256=RgR7sFjoH3Sh8Y1ESdPYpwyIShEgZwCoSvEWt2qFnOk,4170
|
|
10
|
+
pydmoo/algorithms/base/dmoo/dmopso.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
pydmoo/algorithms/base/dmoo/dnsga2.py,sha256=sqAn48PKFRwzclEZu7qgE87n7F1eEHAxSO_l1TNAkzQ,4330
|
|
12
|
+
pydmoo/algorithms/base/moo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
pydmoo/algorithms/base/moo/moead.py,sha256=9rkLJE-9KZ2PWfIasQTfy3F8Ayfi40GMGZQWSBaiRZA,8032
|
|
14
|
+
pydmoo/algorithms/base/moo/moeadde.py,sha256=WKgCZF3odsZMs40OSefqPvxlMmvkdvqQskV_q4yfOec,5073
|
|
15
|
+
pydmoo/algorithms/base/moo/mopso.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
pydmoo/algorithms/base/moo/nsga2.py,sha256=iwvP5Av-psbmDF89Kre3bLwJKQ8BPKR5rmG0EDxU-XE,4519
|
|
17
|
+
pydmoo/algorithms/modern/__init__.py,sha256=RJDZoZaa1mp7hFQC4TkSpOxfBpqDnbXpLmMu2GFbv2o,3004
|
|
18
|
+
pydmoo/algorithms/modern/moead_imkt.py,sha256=H-Qy_McOY4j3CMu-8Wwu2RdxCEGb_OQ090cHdBzRN9I,4560
|
|
19
|
+
pydmoo/algorithms/modern/moead_imkt_igp.py,sha256=b9NVo9Y7Aem4jCMcObqex9AZmmMwokcziny2Ue51Lgs,1865
|
|
20
|
+
pydmoo/algorithms/modern/moead_imkt_lstm.py,sha256=ugSUsBYOXBtyNavue7zacXgYQPD6i2gcUjj2R93J3Uo,3853
|
|
21
|
+
pydmoo/algorithms/modern/moead_imkt_n.py,sha256=HDzU0lD8oBwKg4KexKTlXs6QmWZZgFC8eZdKhP21zfw,4183
|
|
22
|
+
pydmoo/algorithms/modern/moead_imkt_n_igp.py,sha256=38Sz6b2R4fY6as652gRGLmAST7fGb_LtupYH_Bb_2ZY,1876
|
|
23
|
+
pydmoo/algorithms/modern/moead_imkt_n_lstm.py,sha256=QJuidnGx8OCvyci379msIEwF2ExLGzqm168Hx2KiBcw,4069
|
|
24
|
+
pydmoo/algorithms/modern/moead_ktmm.py,sha256=-IkGw1O1Gy0v-Dy5GyHHEPxr5Z-GK9YQ8rzanG52Iew,4261
|
|
25
|
+
pydmoo/algorithms/modern/moeadde_imkt.py,sha256=_Go6vo13O01jD3TwMpJyhABHB5aOjDz1L00Krk4YMq4,4612
|
|
26
|
+
pydmoo/algorithms/modern/moeadde_imkt_clstm.py,sha256=vtMWSfjQonlkJAl0iIzZNkLkzmDT1M6VeDlhQ646gPk,7430
|
|
27
|
+
pydmoo/algorithms/modern/moeadde_imkt_igp.py,sha256=KYQyI2v2V6aHmnzonZasL2_mMruC9RHFyE5ZaR5EoSg,1877
|
|
28
|
+
pydmoo/algorithms/modern/moeadde_imkt_lstm.py,sha256=a_aiyQD9qwdYXc3dSN7B3u8MqZbxOWV_ZEZIvY5xx04,6850
|
|
29
|
+
pydmoo/algorithms/modern/moeadde_imkt_n.py,sha256=Mhbzn5lZthdSh-nFzruoto2MOqLulWwxvqYVp9TfHBE,4195
|
|
30
|
+
pydmoo/algorithms/modern/moeadde_imkt_n_clstm.py,sha256=neIVNDK_X8fO937-YZCjGX0kBqxxpgWdBW72vPO1k7U,5403
|
|
31
|
+
pydmoo/algorithms/modern/moeadde_imkt_n_igp.py,sha256=JX_e2v6jXciGYyxYOJGy0DifCoyqI5qlSsCbsesEokQ,1888
|
|
32
|
+
pydmoo/algorithms/modern/moeadde_imkt_n_lstm.py,sha256=ZWvBkz2nGePvjajii7TCuVk-IyeOZuaU1PHVASu0bko,4256
|
|
33
|
+
pydmoo/algorithms/modern/moeadde_ktmm.py,sha256=nWJI2H4iuh_eeuf95BiVkrQwtsKgFqg_l4dj1dNIl1c,4269
|
|
34
|
+
pydmoo/algorithms/modern/nsga2_imkt.py,sha256=KzM6zt7QQbHwAUzO1Lt5-SywYN_99jC7okaJTUK_W4M,4616
|
|
35
|
+
pydmoo/algorithms/modern/nsga2_imkt_clstm.py,sha256=EMmqqASHK3iBuAs_fksB3pBCpE-ByiEvO6_NkocmLu0,7430
|
|
36
|
+
pydmoo/algorithms/modern/nsga2_imkt_igp.py,sha256=ZHSllv-9tjxqTCD0N5Bfxq9vXPPwd6RDeUnO6GqGh84,1865
|
|
37
|
+
pydmoo/algorithms/modern/nsga2_imkt_lstm.py,sha256=nGzEV5qUndAi01zbF7YBrMEYVjGUfpxTQ7Bf8dB-gWg,8118
|
|
38
|
+
pydmoo/algorithms/modern/nsga2_imkt_n.py,sha256=QGjpo0w9V1tJhlIHGslQxuivXVwJy_Z8HrUXwEGocvs,4183
|
|
39
|
+
pydmoo/algorithms/modern/nsga2_imkt_n_clstm.py,sha256=DCGZBthr6u4ayawR3_1Re7Dz0eb-YQastyEDT93yD5Q,5391
|
|
40
|
+
pydmoo/algorithms/modern/nsga2_imkt_n_igp.py,sha256=9hX3EfQ2GUmVEiezWvsuGV-QKL6MG1pdNoFTQwlYuw8,1893
|
|
41
|
+
pydmoo/algorithms/modern/nsga2_imkt_n_lstm.py,sha256=QqHGid4sF-i7p_IcIF1d9FPingcc0h5_fEKDc4lgSs4,5840
|
|
42
|
+
pydmoo/algorithms/modern/nsga2_ktmm.py,sha256=djRVG0aoN9nC83qSBVjLN0kt7SBME_GTzEhiVcagy7w,4261
|
|
43
|
+
pydmoo/algorithms/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
|
+
pydmoo/algorithms/utils/utils.py,sha256=uXHVujV4qPuSyDUhM7gQRtXy7Cr1uJI4HMLXjTfu85o,6155
|
|
45
|
+
pydmoo/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
+
pydmoo/core/ar_model.py,sha256=MzYLju6qTF1csg2RAuSXqGwUY49wR6bz6BPrZn1biOA,2672
|
|
47
|
+
pydmoo/core/bounds.py,sha256=2m7W1FeW8f_2XeDGMHGCE4R8vrjbiny9YZP06SjoITY,3520
|
|
48
|
+
pydmoo/core/distance.py,sha256=1j_1wWuZFu9-aQ4Zgc0GTONjsI6LB22DOBbuGhdiA2Q,1551
|
|
49
|
+
pydmoo/core/inverse.py,sha256=oVkawZjLPcFDSLfv4HhGMDwASibGAaWHea7RwWgEBhg,1524
|
|
50
|
+
pydmoo/core/manifold.py,sha256=whScPPD5s7wcClIiUGB0TIQ4I6QOipEk_h-ibpRptZI,2929
|
|
51
|
+
pydmoo/core/predictions.py,sha256=PVJhNjcv7leO5HBQ5ZpzayOMpmihVaNLUn4B537uLQo,1539
|
|
52
|
+
pydmoo/core/sample_gaussian.py,sha256=PGxUQEBoziRNGncKIW5hmSstl8O-6CyrYfblPdMgPvw,1688
|
|
53
|
+
pydmoo/core/sample_uniform.py,sha256=QOoUDjIRsMcq_lnQK8vOnq-devOPkPtx3YlQibC5BNA,2398
|
|
54
|
+
pydmoo/core/transfer.py,sha256=4JP95mfbr5x9qpMbn_zDd2T-eQ9OLok9AMGpXgmg2fA,5404
|
|
55
|
+
pydmoo/core/lstm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
|
+
pydmoo/core/lstm/base.py,sha256=h6dR-_qnNu9tjE-JmicUnGUs0Iey4I11ZD4kScRtXxk,11171
|
|
57
|
+
pydmoo/core/lstm/lstm.py,sha256=S84YWwSn52g-NUfmZnG2i-4RmUjpXVb0kfABELut0bE,17591
|
|
58
|
+
pydmoo/problems/__init__.py,sha256=Kp7HfoxJFcQBLqcD7sMclwAJVXILlkESHVA6DwCTKUY,1909
|
|
59
|
+
pydmoo/problems/dyn.py,sha256=hM10rs2M5vE5PsA8ac1T322uatCukq7iR7q46B0Cyv0,5387
|
|
60
|
+
pydmoo/problems/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
|
+
pydmoo/problems/dynamic/cec2015.py,sha256=lDObPTzHzYf6BDA5zP6zInf0aYPYCI2IE_hePc81bP8,4453
|
|
62
|
+
pydmoo/problems/dynamic/df.py,sha256=GM3qDDtCuWC_cJU4rF7_7L-ri5tyxAV3gsBnqxncTGU,15491
|
|
63
|
+
pydmoo/problems/dynamic/gts.py,sha256=3-x9LG945yJJ06As7T7CeR0-viy05B9MgJGT6EsBeBw,27670
|
|
64
|
+
pydmoo/problems/real_world/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
|
+
pydmoo/problems/real_world/dsrp.py,sha256=XuF5fy1HbD6qDyBq8fOQP5ZAaNJgT4InkH2RqxH9TIk,5085
|
|
66
|
+
pydmoo/problems/real_world/dwbdp.py,sha256=MUjSjH66_V3C8o4NEOSiz2uKmE-YrS9_vAEAdUHnZDs,6249
|
|
67
|
+
pydmoo-0.1.0.dist-info/METADATA,sha256=RyXrOOifUFJ7KqZIRRzOgdMjrXI_GnTqbKMpOmAK1cM,2163
|
|
68
|
+
pydmoo-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
69
|
+
pydmoo-0.1.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
70
|
+
pydmoo-0.1.0.dist-info/RECORD,,
|
pydmoo-0.0.18.dist-info/RECORD
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
pydmoo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
pydmoo/problems/__init__.py,sha256=Z4NAc7VWsUT0H-S5qJ2OF5ZKY4gI_YbWiIzJLxCC-T0,1771
|
|
3
|
-
pydmoo/problems/dyn.py,sha256=u_THECdGi2pY3IJF3ps06k_yv8Z5wgEr5yH8-w37e_c,2573
|
|
4
|
-
pydmoo/problems/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
pydmoo/problems/dynamic/cec2015.py,sha256=Zp_uZF8K4xtK3mrMfhvXwtnp1ohf-uote47QY1kcjIw,4368
|
|
6
|
-
pydmoo/problems/dynamic/df.py,sha256=Oe5zJfgDtQQOAccytOvYD4Yju8B6ojekAp8zmrJABfw,15462
|
|
7
|
-
pydmoo/problems/dynamic/gts.py,sha256=Oc_KRjuwfsy3VjcI_DG_RRHtolxNOm4GveW5k-KK3pI,26251
|
|
8
|
-
pydmoo/response/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
pydmoo/response/ar_model.py,sha256=EmT46fEAcHJe7GrmKN9OVBv-x_nF-fZpJcPTX09FSGw,2676
|
|
10
|
-
pydmoo/response/bounds.py,sha256=XvYYXeEbMWGbG_APd-GtjtL1R47wWgBhqB-eWOIyirQ,2396
|
|
11
|
-
pydmoo/response/tca_model.py,sha256=hfGdJUs01lYzkCvleJ0ScAsVVIoc-EmftBu_ej_ksBg,5405
|
|
12
|
-
pydmoo-0.0.18.dist-info/METADATA,sha256=YZiJPsGI1XD7kQdl3cOjs5bS0JAIgW5g5KzxDTwBivs,2045
|
|
13
|
-
pydmoo-0.0.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
-
pydmoo-0.0.18.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
15
|
-
pydmoo-0.0.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|