pydmoo 0.1.3__tar.gz → 0.1.4__tar.gz
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-0.1.3 → pydmoo-0.1.4}/PKG-INFO +2 -1
- {pydmoo-0.1.3 → pydmoo-0.1.4}/README.md +1 -0
- pydmoo-0.1.4/docs/user-guide/algorithms/algorithms.knowledge.nsga2_ktmm.md +9 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.learning.nsga2_tr.md +1 -1
- pydmoo-0.1.4/docs/user-guide/algorithms.md +24 -0
- pydmoo-0.1.4/pydmoo/algorithms/modern/moead_ktmm.py +113 -0
- pydmoo-0.1.4/pydmoo/algorithms/modern/moeadde_ktmm.py +113 -0
- pydmoo-0.1.4/pydmoo/algorithms/modern/nsga2_ktmm.py +113 -0
- {pydmoo-0.1.3/pydmoo/core → pydmoo-0.1.4/pydmoo/algorithms/utils}/__init__.py +0 -0
- {pydmoo-0.1.3/pydmoo/core/lstm → pydmoo-0.1.4/pydmoo/core}/__init__.py +0 -0
- pydmoo-0.1.4/pydmoo/problems/real_world/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pyproject.toml +1 -1
- {pydmoo-0.1.3 → pydmoo-0.1.4}/uv.lock +1 -1
- pydmoo-0.1.3/docs/user-guide/algorithms.md +0 -23
- {pydmoo-0.1.3 → pydmoo-0.1.4}/.gitattributes +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/.github/workflows/docs.yml +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/.github/workflows/publish.yml +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/.github/workflows/release.yml +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/.gitignore +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/.python-version +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/CODE_OF_CONDUCT.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/LICENSE +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/dev-guide/bug-report.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/dev-guide/index.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/dev-guide/pull-request.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS1.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS10.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS11.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS2.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS3.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS4.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS5.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS6.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS7.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS8.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PF/GTS9.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS1.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS10.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS11.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS2.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS3.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS4.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS5.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS6.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS7.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS8.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/figs/PS/GTS9.png +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/getting-started.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/index.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/algorithms/diversity-based.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/algorithms/index.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/algorithms/knowledge-based.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/algorithms/memory-based.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/algorithms/multi-population-based.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/algorithms/prediction-based.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/applications/index.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/index.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/metrics/index.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/problems/benchmarks.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/reference/problems/index.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/requirements.txt +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.base.dmoo.dmoead.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.base.dmoo.dmoeadde.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.base.dmoo.dnsga2.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.classic.moeadde_svr.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.classic.nsga2_ae.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.classic.nsga2_pps.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.modern.nsga2_imkt.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.modern.nsga2_imkt_clstm.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.modern.nsga2_imkt_lstm.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/index.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/problems/problems.dyn.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/problems/problems.dynamic.gts.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/problems.md +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/mkdocs.yml +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/core/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/core/algorithm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/core/genetic.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/dmoo/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/dmoo/dmoead.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/dmoo/dmoeadde.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/dmoo/dmopso.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/dmoo/dnsga2.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/moo/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/moo/moead.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/moo/moeadde.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/moo/mopso.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/base/moo/nsga2.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/classic/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/classic/moead_ae.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/classic/moead_pps.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/classic/moead_svr.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/classic/moeadde_ae.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/classic/moeadde_pps.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/classic/moeadde_svr.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/classic/nsga2_ae.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/classic/nsga2_pps.py +0 -0
- {pydmoo-0.1.3/pydmoo/algorithms/modern → pydmoo-0.1.4/pydmoo/algorithms/knowledge}/moead_ktmm.py +0 -0
- {pydmoo-0.1.3/pydmoo/algorithms/modern → pydmoo-0.1.4/pydmoo/algorithms/knowledge}/moeadde_ktmm.py +0 -0
- {pydmoo-0.1.3/pydmoo/algorithms/modern → pydmoo-0.1.4/pydmoo/algorithms/knowledge}/nsga2_ktmm.py +0 -0
- {pydmoo-0.1.3/pydmoo/algorithms/utils → pydmoo-0.1.4/pydmoo/algorithms/learning}/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/learning/moead_tr.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/learning/moeadde_tr.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/learning/nsga2_tr.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moead_imkt.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moead_imkt_igp.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moead_imkt_lstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moead_imkt_n.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moead_imkt_n_igp.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moead_imkt_n_lstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moeadde_imkt.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moeadde_imkt_clstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moeadde_imkt_igp.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moeadde_imkt_lstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moeadde_imkt_n.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moeadde_imkt_n_clstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moeadde_imkt_n_igp.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/moeadde_imkt_n_lstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/nsga2_imkt.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/nsga2_imkt_clstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/nsga2_imkt_igp.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/nsga2_imkt_lstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/nsga2_imkt_n.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/nsga2_imkt_n_clstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/nsga2_imkt_n_igp.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/modern/nsga2_imkt_n_lstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/algorithms/utils/utils.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/ar_model.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/bounds.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/distance.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/inverse.py +0 -0
- {pydmoo-0.1.3/pydmoo/problems/dynamic → pydmoo-0.1.4/pydmoo/core/lstm}/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/lstm/base.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/lstm/lstm.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/manifold.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/predictions.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/sample_gaussian.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/sample_uniform.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/core/transfer.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/problems/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/problems/dyn.py +0 -0
- {pydmoo-0.1.3/pydmoo/problems/real_world → pydmoo-0.1.4/pydmoo/problems/dynamic}/__init__.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/problems/dynamic/cec2015.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/problems/dynamic/df.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/problems/dynamic/gts.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/problems/real_world/dsrp.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo/problems/real_world/dwbdp.py +0 -0
- {pydmoo-0.1.3 → pydmoo-0.1.4}/pydmoo.sublime-project +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydmoo
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
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
|
|
@@ -44,5 +44,6 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|

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

|
|
47
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
47
48
|
|
|
48
49
|
Please refer to the [documentation](https://dynoptimization.github.io/pydmoo/) for more details.
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|

|
|
5
5
|
[](https://pypi.org/project/pydmoo/)
|
|
6
6
|

|
|
7
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
7
8
|
|
|
8
9
|
Please refer to the [documentation](https://dynoptimization.github.io/pydmoo/) for more details.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Algorithms
|
|
2
|
+
|
|
3
|
+
## Base Response Mechanisms
|
|
4
|
+
|
|
5
|
+
- [dnsga2](algorithms/algorithms.base.dmoo.dnsga2.md)
|
|
6
|
+
- [dmoead](algorithms/algorithms.base.dmoo.dmoead.md)
|
|
7
|
+
- [dmoeadde](algorithms/algorithms.base.dmoo.dmoeadde.md)
|
|
8
|
+
|
|
9
|
+
## Classic Response Mechanisms
|
|
10
|
+
|
|
11
|
+
- [nsga2_ae](algorithms/algorithms.classic.nsga2_ae.md)
|
|
12
|
+
- [nsga2_pps](algorithms/algorithms.classic.nsga2_pps.md)
|
|
13
|
+
- [moeadde_svr](algorithms/algorithms.classic.moeadde_svr.md)
|
|
14
|
+
|
|
15
|
+
## Knowledge-Based Response Mechanisms
|
|
16
|
+
|
|
17
|
+
- [nsga2_ktmm](algorithms/algorithms.knowledge.nsga2_ktmm.md)
|
|
18
|
+
- [nsga2_imkt](algorithms/algorithms.modern.nsga2_imkt.md)
|
|
19
|
+
|
|
20
|
+
## Learning-Based Response Mechanisms
|
|
21
|
+
|
|
22
|
+
- [nsga2_tr](algorithms/algorithms.learning.nsga2_tr.md)
|
|
23
|
+
- [nsga2_imkt_lstm](algorithms/algorithms.modern.nsga2_imkt_lstm.md)
|
|
24
|
+
- [nsga2_imkt_clstm](algorithms/algorithms.modern.nsga2_imkt_clstm.md)
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from pymoo.core.population import Population
|
|
3
|
+
from pymoo.operators.survival.rank_and_crowding import RankAndCrowding
|
|
4
|
+
|
|
5
|
+
from pydmoo.algorithms.base.dmoo.dmoead import DMOEAD
|
|
6
|
+
from pydmoo.core.sample_gaussian import univariate_gaussian_sample
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class MOEADKTMM(DMOEAD):
|
|
10
|
+
"""Knowledge Transfer with Mixture Model.
|
|
11
|
+
|
|
12
|
+
Zou, J., Hou, Z., Jiang, S., Yang, S., Ruan, G., Xia, Y., and Liu, Y. (2025).
|
|
13
|
+
Knowledge transfer with mixture model in dynamic multi-objective optimization.
|
|
14
|
+
IEEE Transactions on Evolutionary Computation, in press.
|
|
15
|
+
https://doi.org/10.1109/TEVC.2025.3566481
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def __init__(self, **kwargs):
|
|
19
|
+
|
|
20
|
+
super().__init__(**kwargs)
|
|
21
|
+
|
|
22
|
+
self.size_pool = 14 # the size of knowledge pool
|
|
23
|
+
self.denominator = 0.5
|
|
24
|
+
|
|
25
|
+
def _response_mechanism(self):
|
|
26
|
+
"""Response mechanism."""
|
|
27
|
+
pop = self.pop
|
|
28
|
+
X = pop.get("X")
|
|
29
|
+
|
|
30
|
+
# recreate the current population without being evaluated
|
|
31
|
+
pop = Population.new(X=X)
|
|
32
|
+
|
|
33
|
+
# sample self.pop_size solutions in decision space
|
|
34
|
+
samples_old = self.sampling_new_pop()
|
|
35
|
+
|
|
36
|
+
# select self.pop_size/2 individuals with better convergence and diversity
|
|
37
|
+
samples = samples_old[:int(len(samples_old)/2)]
|
|
38
|
+
|
|
39
|
+
# knowledge in decision space
|
|
40
|
+
means_stds_ps, mean, std = self._in_decision_or_objective_space_1d(samples, "decision_space")
|
|
41
|
+
mean_new, std_new = self._select_means_stds(means_stds_ps, mean, std)
|
|
42
|
+
|
|
43
|
+
# sample self.pop_size solutions in decision space
|
|
44
|
+
X = univariate_gaussian_sample(mean_new, std_new, self.pop_size, random_state=self.random_state)
|
|
45
|
+
|
|
46
|
+
# bounds
|
|
47
|
+
if self.problem.has_bounds():
|
|
48
|
+
xl, xu = self.problem.bounds()
|
|
49
|
+
X = np.clip(X, xl, xu) # not provided in the original reference literature
|
|
50
|
+
|
|
51
|
+
# merge
|
|
52
|
+
pop = Population.merge(samples_old, Population.new(X=X))
|
|
53
|
+
|
|
54
|
+
return pop
|
|
55
|
+
|
|
56
|
+
def _in_decision_or_objective_space_1d(self, samples, decision_or_objective="decision_space"):
|
|
57
|
+
# decision space or objective space
|
|
58
|
+
flag = "X" if decision_or_objective == "decision_space" else "F"
|
|
59
|
+
|
|
60
|
+
means_stds = self.data.get("means_stds", [])
|
|
61
|
+
|
|
62
|
+
flag_value = self.opt.get(flag)
|
|
63
|
+
if len(flag_value) <= 1:
|
|
64
|
+
flag_value = self.pop.get(flag)
|
|
65
|
+
flag_value = flag_value[:2]
|
|
66
|
+
|
|
67
|
+
means_stds.append((np.mean(flag_value, axis=0), np.std(flag_value, axis=0), self.n_iter - 1)) # 1-based
|
|
68
|
+
self.data["means_stds"] = means_stds
|
|
69
|
+
|
|
70
|
+
flag_value = samples.get(flag)
|
|
71
|
+
mean, std = np.mean(flag_value, axis=0), np.std(flag_value, axis=0)
|
|
72
|
+
return means_stds, mean, std
|
|
73
|
+
|
|
74
|
+
def sampling_new_pop(self):
|
|
75
|
+
samples = self.initialization.sampling(self.problem, self.pop_size)
|
|
76
|
+
samples = self.evaluator.eval(self.problem, samples)
|
|
77
|
+
|
|
78
|
+
# do a survival to recreate rank and crowding of all individuals
|
|
79
|
+
samples = RankAndCrowding().do(self.problem, samples, n_survive=len(samples))
|
|
80
|
+
return samples
|
|
81
|
+
|
|
82
|
+
def _select_means_stds(self, means_stds, mean_new, std_new):
|
|
83
|
+
# Unpack means and stds
|
|
84
|
+
means = np.array([m[0] for m in means_stds])
|
|
85
|
+
stds = np.array([m[1] for m in means_stds])
|
|
86
|
+
|
|
87
|
+
# Calculate distances
|
|
88
|
+
mean_diffs = means - mean_new
|
|
89
|
+
std_diffs = stds - std_new
|
|
90
|
+
|
|
91
|
+
distances = np.sqrt(np.sum(mean_diffs**2, axis=1) + np.sum(std_diffs**2, axis=1))
|
|
92
|
+
|
|
93
|
+
# Get top K closest
|
|
94
|
+
top_k_idx = np.argsort(distances)[:self.size_pool]
|
|
95
|
+
top_k_dist = distances[top_k_idx]
|
|
96
|
+
top_k_means = means[top_k_idx]
|
|
97
|
+
top_k_stds = stds[top_k_idx]
|
|
98
|
+
|
|
99
|
+
# Update pool
|
|
100
|
+
self._update_means_stds_pool(means_stds, top_k_idx)
|
|
101
|
+
|
|
102
|
+
# Calculate weights
|
|
103
|
+
weights = 1 / (top_k_dist + 1e-8) # Add small epsilon to avoid division by zero
|
|
104
|
+
weights = weights / (np.sum(weights) + self.denominator)
|
|
105
|
+
|
|
106
|
+
# Weighted combination
|
|
107
|
+
mean_new = (1 - np.sum(weights)) * mean_new + np.sum(weights[:, None] * top_k_means, axis=0)
|
|
108
|
+
std_new = (1 - np.sum(weights)) * std_new + np.sum(weights[:, None] * top_k_stds, axis=0)
|
|
109
|
+
return mean_new, std_new
|
|
110
|
+
|
|
111
|
+
def _update_means_stds_pool(self, means_stds, top_k_idx) -> None:
|
|
112
|
+
self.data["means_stds"] = [means_stds[i] for i in top_k_idx]
|
|
113
|
+
return None
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from pymoo.core.population import Population
|
|
3
|
+
from pymoo.operators.survival.rank_and_crowding import RankAndCrowding
|
|
4
|
+
|
|
5
|
+
from pydmoo.algorithms.base.dmoo.dmoeadde import DMOEADDE
|
|
6
|
+
from pydmoo.core.sample_gaussian import univariate_gaussian_sample
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class MOEADDEKTMM(DMOEADDE):
|
|
10
|
+
"""Knowledge Transfer with Mixture Model.
|
|
11
|
+
|
|
12
|
+
Zou, J., Hou, Z., Jiang, S., Yang, S., Ruan, G., Xia, Y., and Liu, Y. (2025).
|
|
13
|
+
Knowledge transfer with mixture model in dynamic multi-objective optimization.
|
|
14
|
+
IEEE Transactions on Evolutionary Computation, in press.
|
|
15
|
+
https://doi.org/10.1109/TEVC.2025.3566481
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def __init__(self, **kwargs):
|
|
19
|
+
|
|
20
|
+
super().__init__(**kwargs)
|
|
21
|
+
|
|
22
|
+
self.size_pool = 14 # the size of knowledge pool
|
|
23
|
+
self.denominator = 0.5
|
|
24
|
+
|
|
25
|
+
def _response_mechanism(self):
|
|
26
|
+
"""Response mechanism."""
|
|
27
|
+
pop = self.pop
|
|
28
|
+
X = pop.get("X")
|
|
29
|
+
|
|
30
|
+
# recreate the current population without being evaluated
|
|
31
|
+
pop = Population.new(X=X)
|
|
32
|
+
|
|
33
|
+
# sample self.pop_size solutions in decision space
|
|
34
|
+
samples_old = self.sampling_new_pop()
|
|
35
|
+
|
|
36
|
+
# select self.pop_size/2 individuals with better convergence and diversity
|
|
37
|
+
samples = samples_old[:int(len(samples_old)/2)]
|
|
38
|
+
|
|
39
|
+
# knowledge in decision space
|
|
40
|
+
means_stds_ps, mean, std = self._in_decision_or_objective_space_1d(samples, "decision_space")
|
|
41
|
+
mean_new, std_new = self._select_means_stds(means_stds_ps, mean, std)
|
|
42
|
+
|
|
43
|
+
# sample self.pop_size solutions in decision space
|
|
44
|
+
X = univariate_gaussian_sample(mean_new, std_new, self.pop_size, random_state=self.random_state)
|
|
45
|
+
|
|
46
|
+
# bounds
|
|
47
|
+
if self.problem.has_bounds():
|
|
48
|
+
xl, xu = self.problem.bounds()
|
|
49
|
+
X = np.clip(X, xl, xu) # not provided in the original reference literature
|
|
50
|
+
|
|
51
|
+
# merge
|
|
52
|
+
pop = Population.merge(samples_old, Population.new(X=X))
|
|
53
|
+
|
|
54
|
+
return pop
|
|
55
|
+
|
|
56
|
+
def _in_decision_or_objective_space_1d(self, samples, decision_or_objective="decision_space"):
|
|
57
|
+
# decision space or objective space
|
|
58
|
+
flag = "X" if decision_or_objective == "decision_space" else "F"
|
|
59
|
+
|
|
60
|
+
means_stds = self.data.get("means_stds", [])
|
|
61
|
+
|
|
62
|
+
flag_value = self.opt.get(flag)
|
|
63
|
+
if len(flag_value) <= 1:
|
|
64
|
+
flag_value = self.pop.get(flag)
|
|
65
|
+
flag_value = flag_value[:2]
|
|
66
|
+
|
|
67
|
+
means_stds.append((np.mean(flag_value, axis=0), np.std(flag_value, axis=0), self.n_iter - 1)) # 1-based
|
|
68
|
+
self.data["means_stds"] = means_stds
|
|
69
|
+
|
|
70
|
+
flag_value = samples.get(flag)
|
|
71
|
+
mean, std = np.mean(flag_value, axis=0), np.std(flag_value, axis=0)
|
|
72
|
+
return means_stds, mean, std
|
|
73
|
+
|
|
74
|
+
def sampling_new_pop(self):
|
|
75
|
+
samples = self.initialization.sampling(self.problem, self.pop_size)
|
|
76
|
+
samples = self.evaluator.eval(self.problem, samples)
|
|
77
|
+
|
|
78
|
+
# do a survival to recreate rank and crowding of all individuals
|
|
79
|
+
samples = RankAndCrowding().do(self.problem, samples, n_survive=len(samples))
|
|
80
|
+
return samples
|
|
81
|
+
|
|
82
|
+
def _select_means_stds(self, means_stds, mean_new, std_new):
|
|
83
|
+
# Unpack means and stds
|
|
84
|
+
means = np.array([m[0] for m in means_stds])
|
|
85
|
+
stds = np.array([m[1] for m in means_stds])
|
|
86
|
+
|
|
87
|
+
# Calculate distances
|
|
88
|
+
mean_diffs = means - mean_new
|
|
89
|
+
std_diffs = stds - std_new
|
|
90
|
+
|
|
91
|
+
distances = np.sqrt(np.sum(mean_diffs**2, axis=1) + np.sum(std_diffs**2, axis=1))
|
|
92
|
+
|
|
93
|
+
# Get top K closest
|
|
94
|
+
top_k_idx = np.argsort(distances)[:self.size_pool]
|
|
95
|
+
top_k_dist = distances[top_k_idx]
|
|
96
|
+
top_k_means = means[top_k_idx]
|
|
97
|
+
top_k_stds = stds[top_k_idx]
|
|
98
|
+
|
|
99
|
+
# Update pool
|
|
100
|
+
self._update_means_stds_pool(means_stds, top_k_idx)
|
|
101
|
+
|
|
102
|
+
# Calculate weights
|
|
103
|
+
weights = 1 / (top_k_dist + 1e-8) # Add small epsilon to avoid division by zero
|
|
104
|
+
weights = weights / (np.sum(weights) + self.denominator)
|
|
105
|
+
|
|
106
|
+
# Weighted combination
|
|
107
|
+
mean_new = (1 - np.sum(weights)) * mean_new + np.sum(weights[:, None] * top_k_means, axis=0)
|
|
108
|
+
std_new = (1 - np.sum(weights)) * std_new + np.sum(weights[:, None] * top_k_stds, axis=0)
|
|
109
|
+
return mean_new, std_new
|
|
110
|
+
|
|
111
|
+
def _update_means_stds_pool(self, means_stds, top_k_idx) -> None:
|
|
112
|
+
self.data["means_stds"] = [means_stds[i] for i in top_k_idx]
|
|
113
|
+
return None
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from pymoo.core.population import Population
|
|
3
|
+
from pymoo.operators.survival.rank_and_crowding import RankAndCrowding
|
|
4
|
+
|
|
5
|
+
from pydmoo.algorithms.base.dmoo.dnsga2 import DNSGA2
|
|
6
|
+
from pydmoo.core.sample_gaussian import univariate_gaussian_sample
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class NSGA2KTMM(DNSGA2):
|
|
10
|
+
"""Knowledge Transfer with Mixture Model.
|
|
11
|
+
|
|
12
|
+
Zou, J., Hou, Z., Jiang, S., Yang, S., Ruan, G., Xia, Y., and Liu, Y. (2025).
|
|
13
|
+
Knowledge transfer with mixture model in dynamic multi-objective optimization.
|
|
14
|
+
IEEE Transactions on Evolutionary Computation, in press.
|
|
15
|
+
https://doi.org/10.1109/TEVC.2025.3566481
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def __init__(self, **kwargs):
|
|
19
|
+
|
|
20
|
+
super().__init__(**kwargs)
|
|
21
|
+
|
|
22
|
+
self.size_pool = 14 # the size of knowledge pool
|
|
23
|
+
self.denominator = 0.5
|
|
24
|
+
|
|
25
|
+
def _response_mechanism(self):
|
|
26
|
+
"""Response mechanism."""
|
|
27
|
+
pop = self.pop
|
|
28
|
+
X = pop.get("X")
|
|
29
|
+
|
|
30
|
+
# recreate the current population without being evaluated
|
|
31
|
+
pop = Population.new(X=X)
|
|
32
|
+
|
|
33
|
+
# sample self.pop_size solutions in decision space
|
|
34
|
+
samples_old = self.sampling_new_pop()
|
|
35
|
+
|
|
36
|
+
# select self.pop_size/2 individuals with better convergence and diversity
|
|
37
|
+
samples = samples_old[:int(len(samples_old)/2)]
|
|
38
|
+
|
|
39
|
+
# knowledge in decision space
|
|
40
|
+
means_stds_ps, mean, std = self._in_decision_or_objective_space_1d(samples, "decision_space")
|
|
41
|
+
mean_new, std_new = self._select_means_stds(means_stds_ps, mean, std)
|
|
42
|
+
|
|
43
|
+
# sample self.pop_size solutions in decision space
|
|
44
|
+
X = univariate_gaussian_sample(mean_new, std_new, self.pop_size, random_state=self.random_state)
|
|
45
|
+
|
|
46
|
+
# bounds
|
|
47
|
+
if self.problem.has_bounds():
|
|
48
|
+
xl, xu = self.problem.bounds()
|
|
49
|
+
X = np.clip(X, xl, xu) # not provided in the original reference literature
|
|
50
|
+
|
|
51
|
+
# merge
|
|
52
|
+
pop = Population.merge(samples_old, Population.new(X=X))
|
|
53
|
+
|
|
54
|
+
return pop
|
|
55
|
+
|
|
56
|
+
def _in_decision_or_objective_space_1d(self, samples, decision_or_objective="decision_space"):
|
|
57
|
+
# decision space or objective space
|
|
58
|
+
flag = "X" if decision_or_objective == "decision_space" else "F"
|
|
59
|
+
|
|
60
|
+
means_stds = self.data.get("means_stds", [])
|
|
61
|
+
|
|
62
|
+
flag_value = self.opt.get(flag)
|
|
63
|
+
if len(flag_value) <= 1:
|
|
64
|
+
flag_value = self.pop.get(flag)
|
|
65
|
+
flag_value = flag_value[:2]
|
|
66
|
+
|
|
67
|
+
means_stds.append((np.mean(flag_value, axis=0), np.std(flag_value, axis=0), self.n_iter - 1)) # 1-based
|
|
68
|
+
self.data["means_stds"] = means_stds
|
|
69
|
+
|
|
70
|
+
flag_value = samples.get(flag)
|
|
71
|
+
mean, std = np.mean(flag_value, axis=0), np.std(flag_value, axis=0)
|
|
72
|
+
return means_stds, mean, std
|
|
73
|
+
|
|
74
|
+
def sampling_new_pop(self):
|
|
75
|
+
samples = self.initialization.sampling(self.problem, self.pop_size)
|
|
76
|
+
samples = self.evaluator.eval(self.problem, samples)
|
|
77
|
+
|
|
78
|
+
# do a survival to recreate rank and crowding of all individuals
|
|
79
|
+
samples = RankAndCrowding().do(self.problem, samples, n_survive=len(samples))
|
|
80
|
+
return samples
|
|
81
|
+
|
|
82
|
+
def _select_means_stds(self, means_stds, mean_new, std_new):
|
|
83
|
+
# Unpack means and stds
|
|
84
|
+
means = np.array([m[0] for m in means_stds])
|
|
85
|
+
stds = np.array([m[1] for m in means_stds])
|
|
86
|
+
|
|
87
|
+
# Calculate distances
|
|
88
|
+
mean_diffs = means - mean_new
|
|
89
|
+
std_diffs = stds - std_new
|
|
90
|
+
|
|
91
|
+
distances = np.sqrt(np.sum(mean_diffs**2, axis=1) + np.sum(std_diffs**2, axis=1))
|
|
92
|
+
|
|
93
|
+
# Get top K closest
|
|
94
|
+
top_k_idx = np.argsort(distances)[:self.size_pool]
|
|
95
|
+
top_k_dist = distances[top_k_idx]
|
|
96
|
+
top_k_means = means[top_k_idx]
|
|
97
|
+
top_k_stds = stds[top_k_idx]
|
|
98
|
+
|
|
99
|
+
# Update pool
|
|
100
|
+
self._update_means_stds_pool(means_stds, top_k_idx)
|
|
101
|
+
|
|
102
|
+
# Calculate weights
|
|
103
|
+
weights = 1 / (top_k_dist + 1e-8) # Add small epsilon to avoid division by zero
|
|
104
|
+
weights = weights / (np.sum(weights) + self.denominator)
|
|
105
|
+
|
|
106
|
+
# Weighted combination
|
|
107
|
+
mean_new = (1 - np.sum(weights)) * mean_new + np.sum(weights[:, None] * top_k_means, axis=0)
|
|
108
|
+
std_new = (1 - np.sum(weights)) * std_new + np.sum(weights[:, None] * top_k_stds, axis=0)
|
|
109
|
+
return mean_new, std_new
|
|
110
|
+
|
|
111
|
+
def _update_means_stds_pool(self, means_stds, top_k_idx) -> None:
|
|
112
|
+
self.data["means_stds"] = [means_stds[i] for i in top_k_idx]
|
|
113
|
+
return None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Algorithms
|
|
2
|
-
|
|
3
|
-
## Base Response Mechanisms
|
|
4
|
-
|
|
5
|
-
- [algorithms.base.dmoo.dnsga2](algorithms/algorithms.base.dmoo.dnsga2.md)
|
|
6
|
-
- [algorithms.base.dmoo.dmoead](algorithms/algorithms.base.dmoo.dmoead.md)
|
|
7
|
-
- [algorithms.base.dmoo.dmoeadde](algorithms/algorithms.base.dmoo.dmoeadde.md)
|
|
8
|
-
|
|
9
|
-
## Classic Response Mechanisms
|
|
10
|
-
|
|
11
|
-
- [algorithms.classic.nsga2_ae](algorithms/algorithms.classic.nsga2_ae.md)
|
|
12
|
-
- [algorithms.classic.nsga2_pps](algorithms/algorithms.classic.nsga2_pps.md)
|
|
13
|
-
- [algorithms.classic.moeadde_svr](algorithms/algorithms.classic.moeadde_svr.md)
|
|
14
|
-
|
|
15
|
-
## Knowledge-Based Response Mechanisms
|
|
16
|
-
|
|
17
|
-
- [algorithms.modern.nsga2_imkt](algorithms/algorithms.modern.nsga2_imkt.md)
|
|
18
|
-
|
|
19
|
-
## Learning-Based Response Mechanisms
|
|
20
|
-
|
|
21
|
-
- [algorithms.learning.nsga2_tr](algorithms/algorithms.learning.nsga2_tr.md)
|
|
22
|
-
- [algorithms.modern.nsga2_imkt_lstm](algorithms/algorithms.modern.nsga2_imkt_lstm.md)
|
|
23
|
-
- [algorithms.modern.nsga2_imkt_clstm](algorithms/algorithms.modern.nsga2_imkt_clstm.md)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.modern.nsga2_imkt_clstm.md
RENAMED
|
File without changes
|
{pydmoo-0.1.3 → pydmoo-0.1.4}/docs/user-guide/algorithms/algorithms.modern.nsga2_imkt_lstm.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydmoo-0.1.3/pydmoo/algorithms/modern → pydmoo-0.1.4/pydmoo/algorithms/knowledge}/moead_ktmm.py
RENAMED
|
File without changes
|
{pydmoo-0.1.3/pydmoo/algorithms/modern → pydmoo-0.1.4/pydmoo/algorithms/knowledge}/moeadde_ktmm.py
RENAMED
|
File without changes
|
{pydmoo-0.1.3/pydmoo/algorithms/modern → pydmoo-0.1.4/pydmoo/algorithms/knowledge}/nsga2_ktmm.py
RENAMED
|
File without changes
|
{pydmoo-0.1.3/pydmoo/algorithms/utils → pydmoo-0.1.4/pydmoo/algorithms/learning}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydmoo-0.1.3/pydmoo/problems/real_world → pydmoo-0.1.4/pydmoo/problems/dynamic}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|