Skip to content

Commit 4024790

Browse files
committed
Prepare the package
1 parent 94e088a commit 4024790

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+443
-459
lines changed

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
.exe
1+
.exe
2+
.idea/
3+
dist/
4+
*.toml
5+
*.cfg
6+
.mypy_cache/
7+
.__mypycache__/
8+
.pytest_cache/
9+
*.coverage
10+
src/*.egg-info/
11+
.tox/
12+
venv/
13+
*.python-version

README.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,30 @@ MADS-poll step
1717

1818
© Ahmed H. Bayoumy
1919
---
20-
## How to use
20+
## How to
21+
### Use OMADS package
2122

22-
After installing the libraries listed in the `requirements.txt`, `OMADS.py` can be called directly from a
23+
After installing the `OMADS` package from [PYPI](https://pypi.org/) website, the functions and classes of `OMADS` basic module can be imported
24+
directly to the python script as follows:
25+
26+
```pycon
27+
from OMADS import *
28+
```
29+
30+
### Run OMADS from terminal
31+
After installing the libraries listed in the `requirements.txt`, `OMADS/BASIC.py` can be called directly from a
2332
terminal window under the src directory. The path of the JSON template, which contains the problem input parameters,
24-
should be entered as an input argument to the `OMADS.py` call.
33+
should be entered as an input argument to the `BASIC.py` call.
2534

2635
```commandline
27-
python OMADS.py ../examples/rosenbrock.json
36+
python ./OMADS/BASIC.py ../../tests/unconstrained/rosenbrock.json
2837
```
2938

30-
Input parameters are provided in the `JASON` template using predefined attributes (keywords) under three dictionaries;
31-
evaluator, param, and options. Here is a brief description of each dictionary and its attributes.
39+
## Input parameters
40+
Input parameters are serialized in a `JSON` template using predefined attributes (keywords) under three dictionaries;
41+
`evaluator`, `param`, and `options`. Here is a brief description of each dictionary and its key attributes.
3242

33-
* `evaluator`: in this dictionary we define the blackbox location and the name of input and output files (if exist)
43+
* `evaluator`: in this dictionary, we define the blackbox location and the name of input and output files (if exist)
3444
* `blackbox`: blackbox executable file name, or the function name if this is an internal function defined within the BM_suite
3545
* `internal`: the name of the testing category that holds your internal/external test function or blackbox evaluator
3646
* `con`: internal constrained single-objective function
@@ -45,11 +55,11 @@ evaluator, param, and options. Here is a brief description of each dictionary an
4555
* `ub`: uber bounds vector
4656
* `var_names`: list of design variables name
4757
* `scaling`: scaling factor
48-
* `post_dir`: the location of the post directory where results file shall be saved if requested
58+
* `post_dir`: the location of the post directory where the results file shall be saved if requested
4959
---
5060
* `options`: algorithmic options
5161
* `seed`: the random generator seed that ensures results reproducibility. This should be an integer value
52-
* `budget`: the evaluation budget; maximum number of evaluations for the blackbox defined
62+
* `budget`: the evaluation budget; the maximum number of evaluations for the blackbox defined
5363
* `tol`: the minimum poll size tolerance; the algorithm terminates once the poll size falls below this value
5464
* `psize_init`: initial poll size
5565
* `display`: a boolean for displaying verbose outputs per iteration in the terminal window
@@ -70,14 +80,13 @@ evaluator, param, and options. Here is a brief description of each dictionary an
7080

7181
## Benchmarking
7282

73-
Two benchmarking (BM) suits are provided in the `BM_suite.py` code. The BM suits have different constrained and
74-
unconstrained optimization problems with various characteristics. You can run the BM by calling the following commands
75-
in the terminal window. The number entered at the end of the command line represents the number of the BM tests
76-
repetition.
77-
```commandline
78-
python OMADS.py bm uncon 16
79-
python OMADS.py bm con 16
83+
To benchmark `OMADS`, per se, you need to install the non-linear optimization benchmarking package `NOBM` from `pypi.com`.
84+
Two benchmarking suits are provided under the `BMDFO` benchmarking module; `BMDFO` stands for benchmarking derivative-free optimization algorithms.
85+
The benchmarking suits have different constrained and unconstrained optimization problems with various characteristics.
86+
The benchmarking package modules can be imported directly to the python script as shown below:
87+
```pycon
88+
from BMDFO import toy
8089
```
81-
82-
After the BM is finished, a `BM_report.csv` file will be generated in the post directory under
83-
the `examples` folder.
90+
For more details about the `NOBM` package and its use, check this [link](https://github.com/Ahmed-Bayoumy/NOBM).
91+
After running the benchmarking suite using various seed values, which are used to initialize the random number generator,
92+
a `BM_report.csv` file will be created in the post directory under the `examples` folder.

examples/Rosen/input.inp

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/Rosen/output.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/Rosen/post/graph/000.png

-10.6 KB
Binary file not shown.

examples/Rosen/post/graph/001.png

-13.8 KB
Binary file not shown.

examples/Rosen/post/graph/002.png

-15.8 KB
Binary file not shown.

examples/Rosen/post/graph/003.png

-12.9 KB
Binary file not shown.

examples/Rosen/post/graph/004.png

-10.3 KB
Binary file not shown.

examples/Rosen/post/graph/005.png

-9.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)