pydmoo 0.0.9__tar.gz → 0.0.11__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.
Files changed (39) hide show
  1. {pydmoo-0.0.9 → pydmoo-0.0.11}/.github/workflows/docs.yml +2 -0
  2. {pydmoo-0.0.9 → pydmoo-0.0.11}/PKG-INFO +6 -4
  3. pydmoo-0.0.11/README.md +9 -0
  4. pydmoo-0.0.11/docs/api-manual/index.md +1 -0
  5. pydmoo-0.0.11/docs/reference/algorithms/knowledge-based.md +1 -0
  6. pydmoo-0.0.11/docs/reference/algorithms/memory-based.md +1 -0
  7. pydmoo-0.0.11/docs/reference/algorithms/multi-population-based.md +1 -0
  8. pydmoo-0.0.11/docs/reference/algorithms/prediction-based.md +1 -0
  9. {pydmoo-0.0.9 → pydmoo-0.0.11}/mkdocs.yml +11 -3
  10. pydmoo-0.0.11/pydmoo/response/bounds.py +98 -0
  11. {pydmoo-0.0.9 → pydmoo-0.0.11}/pyproject.toml +1 -1
  12. pydmoo-0.0.9/README.md +0 -7
  13. pydmoo-0.0.9/docs/api-auto/pydmoo.md +0 -12
  14. pydmoo-0.0.9/docs/api-auto/response.ar_model.md +0 -9
  15. pydmoo-0.0.9/docs/api-auto/response.tca_model.md +0 -9
  16. pydmoo-0.0.9/docs/api-auto.md +0 -10
  17. {pydmoo-0.0.9 → pydmoo-0.0.11}/.github/workflows/publish.yml +0 -0
  18. {pydmoo-0.0.9 → pydmoo-0.0.11}/.gitignore +0 -0
  19. {pydmoo-0.0.9 → pydmoo-0.0.11}/.python-version +0 -0
  20. {pydmoo-0.0.9 → pydmoo-0.0.11}/CODE_OF_CONDUCT.md +0 -0
  21. {pydmoo-0.0.9 → pydmoo-0.0.11}/LICENSE +0 -0
  22. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/index.md +0 -0
  23. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/reference/algorithms/diversity-based.md +0 -0
  24. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/reference/algorithms/index.md +0 -0
  25. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/reference/applications/index.md +0 -0
  26. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/reference/index.md +0 -0
  27. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/reference/metrics/index.md +0 -0
  28. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/reference/problems/benchmarks.md +0 -0
  29. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/reference/problems/index.md +0 -0
  30. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/users-guide/bug-report.md +0 -0
  31. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/users-guide/installation.md +0 -0
  32. {pydmoo-0.0.9 → pydmoo-0.0.11}/docs/users-guide/pull-request.md +0 -0
  33. {pydmoo-0.0.9 → pydmoo-0.0.11}/generate_docs.py +0 -0
  34. {pydmoo-0.0.9 → pydmoo-0.0.11}/pydmoo/__init__.py +0 -0
  35. {pydmoo-0.0.9 → pydmoo-0.0.11}/pydmoo/response/__init__.py +0 -0
  36. {pydmoo-0.0.9 → pydmoo-0.0.11}/pydmoo/response/ar_model.py +0 -0
  37. {pydmoo-0.0.9 → pydmoo-0.0.11}/pydmoo/response/tca_model.py +0 -0
  38. {pydmoo-0.0.9 → pydmoo-0.0.11}/pydmoo.sublime-project +0 -0
  39. {pydmoo-0.0.9 → pydmoo-0.0.11}/uv.lock +0 -0
@@ -41,6 +41,8 @@ jobs:
41
41
  needs: test
42
42
  steps:
43
43
  - uses: actions/checkout@v5
44
+ with:
45
+ token: ${{ secrets.GITHUB_TOKEN }}
44
46
 
45
47
  - name: Set up Python
46
48
  uses: actions/setup-python@v6
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydmoo
3
- Version: 0.0.9
3
+ Version: 0.0.11
4
4
  Summary: pydmoo
5
5
  Project-URL: Homepage, https://github.com/dynoptimization/pydmoo
6
6
  Project-URL: Repository, https://github.com/dynoptimization/pydmoo
@@ -35,10 +35,12 @@ Requires-Dist: statsmodels>=0.14.5
35
35
  Requires-Dist: tabulate>=0.9.0
36
36
  Description-Content-Type: text/markdown
37
37
 
38
- # pydmoo
38
+ # Dynamic Multi-Objective Optimization in Python
39
+
40
+ [![License](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
41
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pydmoo)
42
+ [![PyPI](https://img.shields.io/pypi/v/pydmoo)](https://pypi.org/project/pydmoo/)
39
43
 
40
44
  ## Dynamic Multi-Objective Optimization Problems (DMOPs)
41
45
 
42
46
  ## Dynamic Multi-Objective Optimization Algorithms (DMOAs)
43
-
44
- ## Dynamic Multi-Objective Optimization Benchmarks (DMOBs)
@@ -0,0 +1,9 @@
1
+ # Dynamic Multi-Objective Optimization in Python
2
+
3
+ [![License](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
4
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pydmoo)
5
+ [![PyPI](https://img.shields.io/pypi/v/pydmoo)](https://pypi.org/project/pydmoo/)
6
+
7
+ ## Dynamic Multi-Objective Optimization Problems (DMOPs)
8
+
9
+ ## Dynamic Multi-Objective Optimization Algorithms (DMOAs)
@@ -0,0 +1 @@
1
+ # Munual API
@@ -0,0 +1 @@
1
+ # Knowledge-Based Algorithms
@@ -0,0 +1 @@
1
+ # Memory-Based Algorithms
@@ -0,0 +1 @@
1
+ # Multi-Population-Based Algorithms
@@ -0,0 +1 @@
1
+ # Prediction-Based Algorithms
@@ -66,7 +66,7 @@ plugins:
66
66
  default_handler: python
67
67
  handlers:
68
68
  python:
69
- paths: [pydmoo]
69
+ paths: [.]
70
70
  options:
71
71
  docstring_style: numpy
72
72
  show_root_heading: true
@@ -133,14 +133,22 @@ nav:
133
133
  - Getting Started:
134
134
  - Installation: users-guide/installation.md
135
135
 
136
- - API:
136
+ - Auto-API:
137
137
  - pydmoo: api-auto/pydmoo.md
138
138
  - API reference: api-auto.md
139
139
 
140
+ - Manual API:
141
+ - API reference: api-manual/index.md
142
+
140
143
  - Reference:
141
144
  - reference/index.md
142
145
  - Benchmarks: reference/problems/benchmarks.md
143
- - Algorithms: reference/algorithms/diversity-based.md
146
+ - Algorithms:
147
+ - Diversity-Based: reference/algorithms/diversity-based.md
148
+ - Memory-Based: reference/algorithms/memory-based.md
149
+ - Multi-Population-Based: reference/algorithms/multi-population-based.md
150
+ - Knowledge-Based: reference/algorithms/knowledge-based.md
151
+ - Prediction-Based: reference/algorithms/prediction-based.md
144
152
  - Metrics: reference/metrics/index.md
145
153
  - Applications: reference/applications/index.md
146
154
 
@@ -0,0 +1,98 @@
1
+ import numpy as np
2
+
3
+
4
+ def matrix_conditional_update(x_curr, lb, ub, x_prev):
5
+ """
6
+ Vectorized conditional matrix update with bounded interpolation.
7
+
8
+ Parameters
9
+ ----------
10
+ x_curr : ndarray, shape (N, n)
11
+ Observation matrix.
12
+ lb : ndarray, shape (1, n) or (n,)
13
+ Lower bounds for each dimension.
14
+ ub : ndarray, shape (1, n) or (n,)
15
+ Upper bounds for each dimension.
16
+ x_prev : ndarray, shape (N, n)
17
+ Previous state matrix.
18
+
19
+ Returns
20
+ -------
21
+ ndarray, shape (N, n)
22
+ Updated matrix where:
23
+ - Values within bounds remain unchanged
24
+ - Values below bounds become 0.5*(a + x_prev)
25
+ - Values above bounds become 0.5*(b + x_prev)
26
+
27
+ Notes
28
+ -----
29
+ Uses NumPy broadcasting for efficient vectorized operations.
30
+ """
31
+ lb = np.reshape(lb, (1, -1))
32
+ ub = np.reshape(ub, (1, -1))
33
+ x_new = np.zeros_like(x_curr)
34
+
35
+ mask = (x_curr >= lb) & (x_curr <= ub)
36
+ x_new[mask] = x_curr[mask]
37
+
38
+ mask = x_curr < lb
39
+ x_new[mask] = 0.5 * (lb + x_prev)[mask]
40
+
41
+ mask = x_curr > ub
42
+ x_new[mask] = 0.5 * (ub + x_prev)[mask]
43
+
44
+ return x_new
45
+
46
+
47
+ def clip_and_randomize(x, lb, ub):
48
+ """
49
+ Clip values to bounds with random replacement for out-of-bounds values.
50
+
51
+ Parameters
52
+ ----------
53
+ x : ndarray, shape (N, n)
54
+ Input matrix.
55
+ lb : ndarray, shape (1, n) or (n,)
56
+ Lower bounds.
57
+ ub : ndarray, shape (1, n) or (n,)
58
+ Upper bounds.
59
+
60
+ Returns
61
+ -------
62
+ ndarray, shape (N, n)
63
+ Matrix where out-of-bounds values are replaced with uniform random
64
+ values within [lb, ub] for each dimension.
65
+
66
+ See Also
67
+ --------
68
+ numpy.random.uniform : Used for random value generation.
69
+ """
70
+ out_of_bounds = (x < lb) | (x > ub)
71
+ random_samples = np.random.uniform(low=lb, high=ub, size=x.shape)
72
+ return np.where(out_of_bounds, random_samples, x)
73
+
74
+
75
+ def clip_by_numpy(x, lb, ub):
76
+ """
77
+ Clip values to interval [lb, ub].
78
+
79
+ Parameters
80
+ ----------
81
+ x : ndarray
82
+ Array containing elements to clip.
83
+ lb : ndarray or scalar
84
+ Minimum value.
85
+ ub : ndarray or scalar
86
+ Maximum value.
87
+
88
+ Returns
89
+ -------
90
+ ndarray
91
+ Clipped array where:
92
+ x_clipped = max(lb, min(ub, x))
93
+
94
+ Notes
95
+ -----
96
+ This is a wrapper around numpy.clip() with identical behavior.
97
+ """
98
+ return np.clip(x, lb, ub)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pydmoo"
3
- version = "0.0.9"
3
+ version = "0.0.11"
4
4
  description = "pydmoo"
5
5
  license = {text = "GPL-3.0-or-later"}
6
6
  authors = [
pydmoo-0.0.9/README.md DELETED
@@ -1,7 +0,0 @@
1
- # pydmoo
2
-
3
- ## Dynamic Multi-Objective Optimization Problems (DMOPs)
4
-
5
- ## Dynamic Multi-Objective Optimization Algorithms (DMOAs)
6
-
7
- ## Dynamic Multi-Objective Optimization Benchmarks (DMOBs)
@@ -1,12 +0,0 @@
1
- # pydmoo API Reference
2
-
3
- pydmoo is a dynamic multi-objective optimization library providing various optimization algorithms and tools.
4
-
5
- ## Module Overview
6
-
7
- ::: pydmoo
8
- options:
9
- show_root_heading: false
10
- show_submodules: true
11
- heading_level: 3
12
- show_source: false
@@ -1,9 +0,0 @@
1
- # response.ar_model
2
-
3
- ::: pydmoo.response.ar_model
4
- options:
5
- show_root_heading: false
6
- show_submodules: true
7
- heading_level: 2
8
- show_source: true
9
- show_category_heading: true
@@ -1,9 +0,0 @@
1
- # response.tca_model
2
-
3
- ::: pydmoo.response.tca_model
4
- options:
5
- show_root_heading: false
6
- show_submodules: true
7
- heading_level: 2
8
- show_source: true
9
- show_category_heading: true
@@ -1,10 +0,0 @@
1
- # API Reference
2
-
3
- This is the complete API reference documentation for the pydmoo library.
4
-
5
- ## Module List
6
-
7
- ### Root Modules
8
-
9
- - [response.ar_model](api-auto/response.ar_model.md)
10
- - [response.tca_model](api-auto/response.tca_model.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