pydmoo 0.0.12__py3-none-any.whl → 0.0.13__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/__init__.py +5 -0
- pydmoo/_version.py +1 -0
- pydmoo/problems/dyn.py +5 -5
- pydmoo/problems/dynamic/gts.py +83 -9
- {pydmoo-0.0.12.dist-info → pydmoo-0.0.13.dist-info}/METADATA +2 -1
- {pydmoo-0.0.12.dist-info → pydmoo-0.0.13.dist-info}/RECORD +8 -7
- {pydmoo-0.0.12.dist-info → pydmoo-0.0.13.dist-info}/WHEEL +0 -0
- {pydmoo-0.0.12.dist-info → pydmoo-0.0.13.dist-info}/licenses/LICENSE +0 -0
pydmoo/__init__.py
CHANGED
pydmoo/_version.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.13"
|
pydmoo/problems/dyn.py
CHANGED
|
@@ -22,10 +22,10 @@ class DynamicTestProblem(DynamicProblem, ABC):
|
|
|
22
22
|
self.tau = tau
|
|
23
23
|
self.nt = nt
|
|
24
24
|
self.taut = taut
|
|
25
|
-
self.t0 = t0 # added
|
|
25
|
+
self.t0 = t0 # added by DynOpt
|
|
26
26
|
self._time = time
|
|
27
27
|
|
|
28
|
-
self.add_time_perturbation = add_time_perturbation # added
|
|
28
|
+
self.add_time_perturbation = add_time_perturbation # added by DynOpt
|
|
29
29
|
|
|
30
30
|
def tic(self, elapsed=1):
|
|
31
31
|
|
|
@@ -42,7 +42,7 @@ class DynamicTestProblem(DynamicProblem, ABC):
|
|
|
42
42
|
else:
|
|
43
43
|
# return 1 / self.nt * (self.tau // self.taut)
|
|
44
44
|
|
|
45
|
-
# added
|
|
45
|
+
# added by DynOpt
|
|
46
46
|
delta_time = 1 / self.nt
|
|
47
47
|
count = max((self.tau + self.taut - (self.t0 + 1)), 0) // self.taut
|
|
48
48
|
|
|
@@ -60,7 +60,7 @@ class DynamicTestProblem(DynamicProblem, ABC):
|
|
|
60
60
|
def time(self, value):
|
|
61
61
|
self._time = value
|
|
62
62
|
|
|
63
|
-
# added
|
|
63
|
+
# added by DynOpt
|
|
64
64
|
def update_to_next_time(self):
|
|
65
65
|
|
|
66
66
|
# update to next time
|
|
@@ -78,7 +78,7 @@ class TimeSimulation(Callback):
|
|
|
78
78
|
def update(self, algorithm):
|
|
79
79
|
problem = algorithm.problem
|
|
80
80
|
|
|
81
|
-
# added
|
|
81
|
+
# added by DynOpt
|
|
82
82
|
# Designed to handle time-linkage properties within the GTS test suites.
|
|
83
83
|
if hasattr(problem, "time_linkage") and hasattr(problem, "cal"):
|
|
84
84
|
problem.cal(algorithm.opt.get("F"))
|
pydmoo/problems/dynamic/gts.py
CHANGED
|
@@ -16,47 +16,47 @@ def knee_point(F):
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def G_t(t):
|
|
19
|
-
"""G(t) = sin(0.5
|
|
19
|
+
"""\\( G(t) = \\sin(0.5\\pi t) \\)"""
|
|
20
20
|
return np.sin(0.5 * np.pi * t)
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
def H_t(t):
|
|
24
|
-
"""H(t) = 1.5 + G(t)"""
|
|
24
|
+
"""\\( H(t) = 1.5 + G(t) \\)"""
|
|
25
25
|
return 1.5 + G_t(t)
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def alpha_t(t):
|
|
29
|
-
"""
|
|
29
|
+
"""\\( \\alpha_t = 5\\cos(0.5\\pi t) \\)"""
|
|
30
30
|
return 5 * np.cos(0.5 * np.pi * t)
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def beta_t(t):
|
|
34
|
-
"""
|
|
34
|
+
"""\\( \\beta_t = 0.2 + 2.8|G(t)| \\)"""
|
|
35
35
|
return 0.2 + 2.8 * np.abs(G_t(t))
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def omega_t(t):
|
|
39
|
-
"""
|
|
39
|
+
"""\\( \\omega_t = \\lfloor 10G(t) \\rfloor \\)"""
|
|
40
40
|
return np.floor(10 * G_t(t))
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
def a_t(t):
|
|
44
|
-
"""a = sin(0.5
|
|
44
|
+
"""\\( a(t) = \\sin(0.5\\pi t) \\)"""
|
|
45
45
|
return np.sin(0.5 * np.pi * t)
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
def b_t(t):
|
|
49
|
-
"""b = 1 +
|
|
49
|
+
"""\\( b(t) = 1 + |\\cos(0.5\\pi t)| \\)"""
|
|
50
50
|
return 1 + np.abs(np.cos(0.5 * np.pi * t))
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
def y_t(x1, t):
|
|
54
|
-
"""
|
|
54
|
+
"""\\( y_t(x_1) = 0.5 + G(t)(x_1 - 0.5) \\)"""
|
|
55
55
|
return 0.5 + G_t(t) * (x1 - 0.5)
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
def p_t(t):
|
|
59
|
-
"""
|
|
59
|
+
"""\\( p_t = \\lfloor 6G(t) \\rfloor \\)"""
|
|
60
60
|
return np.floor(6 * G_t(t))
|
|
61
61
|
|
|
62
62
|
|
|
@@ -131,6 +131,43 @@ class GTS(DynamicTestProblem):
|
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
class GTS1(GTS):
|
|
134
|
+
r"""
|
|
135
|
+
\begin{equation}
|
|
136
|
+
\text{min}
|
|
137
|
+
\begin{cases}
|
|
138
|
+
f_1(\mathbf{x},t) = x_1 \\
|
|
139
|
+
f_2(\mathbf{x},t) = g(\mathbf{x},t)(1 - (\frac{x_1}{g(\mathbf{x},t)})^{H(t)})
|
|
140
|
+
\end{cases}
|
|
141
|
+
\end{equation}
|
|
142
|
+
|
|
143
|
+
with
|
|
144
|
+
|
|
145
|
+
\begin{equation*}
|
|
146
|
+
\begin{split}
|
|
147
|
+
g(\mathbf{x},t) = 1
|
|
148
|
+
&+ \Bigl(\bigl(\mathbf{x}_{II,1} - h_1(\mathbf{x}_I)\bigr)^T \mathbf{R}_{II,1}(t) \bigl(\mathbf{x}_{II,1} - h_1(\mathbf{x}_I)\bigr)\Bigr)^{\frac{1}{p}} \\
|
|
149
|
+
&+ \Bigl(\bigl(\mathbf{x}_{II,2} - h_2(\mathbf{x}_I)\bigr)^T \mathbf{R}_{II,2}(t) \bigl(\mathbf{x}_{II,2} - h_2(\mathbf{x}_I)\bigr)\Bigr)^{\frac{1}{p}}
|
|
150
|
+
\end{split}
|
|
151
|
+
\end{equation*}
|
|
152
|
+
|
|
153
|
+
where $p \geq 1$, $\mathbf{x}_I = (x_1)$, $\mathbf{x}_{II,1} = (x_2, \cdots, x_{\lfloor\frac{D}{2}\rfloor})$ and $\mathbf{x}_{II,2} = (x_{\lfloor\frac{D}{2}\rfloor + 1}, \cdots, x_D)$,
|
|
154
|
+
$h_1(\mathbf{x}_I, t) = \cos(0.5\pi t)$ and $h_2(\mathbf{x}_I, t) = G(t) + x_1^{H(t)}$,
|
|
155
|
+
$\mathbf{R}_{II,1}(t)$ and $\mathbf{R}_{II,2}(t)$ are symmetric positive semidefinite matrices in the $t$-th environment,
|
|
156
|
+
the search space is $[0,1] \times [-1,1]^{\lfloor\frac{D}{2}\rfloor -1} \times [-1, 2]^{\lceil\frac{D}{2}\rceil}$.
|
|
157
|
+
|
|
158
|
+
The PF and PS at time t can be described as:
|
|
159
|
+
|
|
160
|
+
\begin{equation*}
|
|
161
|
+
\begin{aligned}
|
|
162
|
+
& \text{PS(t): }0 \leq x_1 \leq 1, x_i = h_1(\mathbf{x}_I, t), x_i \in \mathbf{x}_{II,1}, x_j = h_2(\mathbf{x}_I, t), \in \mathbf{x}_{II,2} \\
|
|
163
|
+
& \text{PF(t): a part of }f_2 = 1 - f_1^{H(t)}, 0 \leq f_1 \leq 1
|
|
164
|
+
\end{aligned}
|
|
165
|
+
\end{equation*}
|
|
166
|
+
|
|
167
|
+

|
|
168
|
+
|
|
169
|
+

|
|
170
|
+
"""
|
|
134
171
|
def __init__(self, **kwargs):
|
|
135
172
|
super().__init__(part_idx=1, bounds=((0, 1), (-1, 1), (-1, 2)), **kwargs)
|
|
136
173
|
|
|
@@ -165,6 +202,43 @@ class GTS1(GTS):
|
|
|
165
202
|
|
|
166
203
|
|
|
167
204
|
class GTS2(GTS):
|
|
205
|
+
r"""
|
|
206
|
+
\begin{equation}
|
|
207
|
+
\text{min}
|
|
208
|
+
\begin{cases}
|
|
209
|
+
f_1(\mathbf{x},t) = 0.5x_1+x_2 \\
|
|
210
|
+
f_2(\mathbf{x},t) = g(\mathbf{x},t)(2.8 - (\frac{0.5x_1+x_2}{g(\mathbf{x},t)})^{H(t)})
|
|
211
|
+
\end{cases}
|
|
212
|
+
\end{equation}
|
|
213
|
+
|
|
214
|
+
with
|
|
215
|
+
|
|
216
|
+
\begin{equation*}
|
|
217
|
+
\begin{split}
|
|
218
|
+
g(\mathbf{x},t) = 1
|
|
219
|
+
&+ \Bigl(\bigl(\mathbf{x}_{II,1} - h_1(\mathbf{x}_I)\bigr)^T \mathbf{R}_{II,1}(t) \bigl(\mathbf{x}_{II,1} - h_1(\mathbf{x}_I)\bigr)\Bigr)^{\frac{1}{p}} \\
|
|
220
|
+
&+ \Bigl(\bigl(\mathbf{x}_{II,2} - h_2(\mathbf{x}_I)\bigr)^T \mathbf{R}_{II,2}(t) \bigl(\mathbf{x}_{II,2} - h_2(\mathbf{x}_I)\bigr)\Bigr)^{\frac{1}{p}}
|
|
221
|
+
\end{split}
|
|
222
|
+
\end{equation*}
|
|
223
|
+
|
|
224
|
+
where $p \geq 1$, $\mathbf{x}_I = (x_1, x_2)$, $\mathbf{x}_{II,1} = (x_3, \cdots, x_{\lfloor\frac{D}{2}\rfloor + 1})$ and $\mathbf{x}_{II,2} = (x_{\lfloor\frac{D}{2}\rfloor + 2}, \cdots, x_D)$, $c = \cot(3\pi t^2), \text{when } t^2 \neq \frac{n}{3}, n \in \mathbb{Z}, c = 1e-32, \text{otherwise}$,
|
|
225
|
+
$h_1(\mathbf{x}_I, t) = \frac{1}{\pi}\left\vert{\arctan(c)}\right\vert$ and $h_2(\mathbf{x}_I, t) = G(t) + x_1^{H(t)}$,
|
|
226
|
+
$\mathbf{R}_{II,1}(t)$ and $\mathbf{R}_{II,2}(t)$ are symmetric positive semidefinite matrices in the $t$-th environment,
|
|
227
|
+
the search space is $[0,1]^2 \times [0,1]^{\lfloor\frac{D}{2}\rfloor -1} \times [-1, 2]^{\lceil\frac{D}{2}\rceil-1}$.
|
|
228
|
+
|
|
229
|
+
The PF and PS at time t can be described as:
|
|
230
|
+
|
|
231
|
+
\begin{equation*}
|
|
232
|
+
\begin{aligned}
|
|
233
|
+
& \text{PS(t): }0 \leq x_{1,2} \leq 1, x_i = h_1(\mathbf{x}_I, t), x_i \in \mathbf{x}_{II,1}, x_j = h_2(\mathbf{x}_I, t), \in \mathbf{x}_{II,2} \\
|
|
234
|
+
& \text{PF(t): }f_2 = 2.8 - f_1^{H(t)}, 0 \leq f_1 \leq 1.5
|
|
235
|
+
\end{aligned}
|
|
236
|
+
\end{equation*}
|
|
237
|
+
|
|
238
|
+

|
|
239
|
+
|
|
240
|
+

|
|
241
|
+
"""
|
|
168
242
|
def __init__(self, **kwargs):
|
|
169
243
|
super().__init__(part_idx=2, bounds=((0, 1), (0, 1), (-1, 2)), **kwargs)
|
|
170
244
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydmoo
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.13
|
|
4
4
|
Summary: pydmoo
|
|
5
5
|
Project-URL: Homepage, https://github.com/dynoptimization/pydmoo
|
|
6
6
|
Project-URL: Repository, https://github.com/dynoptimization/pydmoo
|
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
22
|
Classifier: Topic :: Scientific/Engineering
|
|
22
23
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
24
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
pydmoo/__init__.py,sha256=
|
|
1
|
+
pydmoo/__init__.py,sha256=W7YfAWQLpIXU5FGEfCx7akwmyhQMu7DYGXp7QYyPhh0,67
|
|
2
|
+
pydmoo/_version.py,sha256=SxvRes_80c-42zwvn5BXPvpGVs_EZ69FUEtUBF1k9Ts,23
|
|
2
3
|
pydmoo/problems/__init__.py,sha256=Z4NAc7VWsUT0H-S5qJ2OF5ZKY4gI_YbWiIzJLxCC-T0,1771
|
|
3
|
-
pydmoo/problems/dyn.py,sha256=
|
|
4
|
+
pydmoo/problems/dyn.py,sha256=p_TQqkPD-q6U1AUo_WCeeezC7QmPVxmFlFh3Pb549YQ,2520
|
|
4
5
|
pydmoo/problems/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
6
|
pydmoo/problems/dynamic/cec2015.py,sha256=y6FLXMpef4SZc5-z64GUv2IgntJN052_TqQS_gKzHH8,4311
|
|
6
7
|
pydmoo/problems/dynamic/df.py,sha256=B6lXetwejZURvLTLRRZGFdbaBI72lJ-PD7KYZoB4yic,15410
|
|
7
|
-
pydmoo/problems/dynamic/gts.py,sha256=
|
|
8
|
+
pydmoo/problems/dynamic/gts.py,sha256=7egJkVJzgks3JsyomDmcHrzXgcJkGmMSj4YwLMcT_yY,29051
|
|
8
9
|
pydmoo/response/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
10
|
pydmoo/response/ar_model.py,sha256=EmT46fEAcHJe7GrmKN9OVBv-x_nF-fZpJcPTX09FSGw,2676
|
|
10
11
|
pydmoo/response/bounds.py,sha256=XvYYXeEbMWGbG_APd-GtjtL1R47wWgBhqB-eWOIyirQ,2396
|
|
11
12
|
pydmoo/response/tca_model.py,sha256=hfGdJUs01lYzkCvleJ0ScAsVVIoc-EmftBu_ej_ksBg,5405
|
|
12
|
-
pydmoo-0.0.
|
|
13
|
-
pydmoo-0.0.
|
|
14
|
-
pydmoo-0.0.
|
|
15
|
-
pydmoo-0.0.
|
|
13
|
+
pydmoo-0.0.13.dist-info/METADATA,sha256=YBEIlb3fZW0EOMmS0VwphUhJ2AD-J6OT6H-Ml9aQRrc,1984
|
|
14
|
+
pydmoo-0.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
15
|
+
pydmoo-0.0.13.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
16
|
+
pydmoo-0.0.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|