Skip to content

Commit 9fdf64f

Browse files
committed
250404.113453.CST update documentation about the difference between PRIMA and Powell's solvers
1 parent b53e4c7 commit 9fdf64f

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ Thanks to the improvements introduced into the new implementation, PRIMA
269269
generally produces better solutions with less function evaluations compared with Powell's Fortran 77 implementation.
270270
This makes PRIMA preferable **if function evaluations are expensive**,
271271
which is typically the case for [derivative-free optimization problems](https://github.com/orgs/libprima/discussions/145).
272-
However, if function evaluations are not the dominant cost in your application,
273-
The Fortran 77
272+
However, if function evaluations are not the dominant cost in your application (e.g., a function
273+
evaluation takes only milliseconds), the Fortran 77
274274
solvers are likely to be faster, as they are more efficient in terms of memory usage and flops
275-
thanks to the careful and unique (but unmaintained) implementation by Powell.
275+
thanks to the careful and ingenious (but unmaintained and unmaintainable) implementation by Powell.
276276

277277
Below are the [performance profiles](https://arxiv.org/pdf/cs/0102001.pdf)
278278
of the PRIMA solvers compared with Powell's implementation in terms of the **number of function evaluations**,

pyprima/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ behaves differently from the original Fortran 77 implementation by [M. J. D. Pow
1212
even though the algorithms are essentially the same. Therefore, it is important to point out that you are using
1313
PRIMA rather than the original solvers if you want your results to be reproducible.
1414

15-
Compared to Powell's Fortran 77 implementation, the modern-Fortran implementation and hence this Python
16-
translation generally [produce better solutions with less function evaluations](https://github.com/libprima/prima#improvements),
15+
Compared to Powell's Fortran 77 implementation, the modern-Fortran implementation and hence any faithful
16+
translation like this one generally [produce better solutions with less function evaluations](https://github.com/libprima/prima#improvements),
1717
making them preferable for [applications with expensive function evaluations](https://github.com/orgs/libprima/discussions/145).
1818
However, if function evaluations are not the dominant cost in your application, the Fortran 77
1919
solvers are likely to be faster, as they are more efficient in terms of memory usage and flops
20-
thanks to the careful and unique (but unmaintained) implementation by Powell.
20+
thanks to the careful and ingenious (but unmaintained and unmaintainable) implementation by Powell.
2121

2222
As of April 2025, only the COBYLA solver is available in this Python translation
2323
(many thanks to [Nickolai Belakovski](http://www.nickolai.me/)), and SciPy 1.16.0

pyprima/src/pyprima/cobyla/cobyla.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
Dedicated to late Professor M. J. D. Powell FRS (1936--2015).
77
88
Python implementation by Nickolai Belakovski
9+
10+
N.B.:
11+
12+
1. The modern-Fortran reference implementation in PRIMA contains bug fixes and improvements over the
13+
original Fortran 77 implementation by Powell. Consequently, the PRIMA implementation behaves differently
14+
from the original Fortran 77 implementation by Powell. Therefore, it is important to point out that
15+
you are using PRIMA rather than the original solvers if you want your results to be reproducible.
16+
17+
2. Compared to Powell's Fortran 77 implementation, the modern-Fortran implementation and hence any
18+
faithful translation like this one generally produce better solutions with less function evaluations,
19+
making them preferable for applications with expensive function evaluations. However, if function
20+
evaluations are not the dominant cost in your application, the Fortran 77 solvers are likely to be
21+
faster, as they are more efficient in terms of memory usage and flops thanks to the careful and
22+
ingenious (but unmaintained and unmaintainable) implementation by Powell.
23+
24+
See the PRIMA documentation (www.libprima.net) for more information.
925
'''
1026

1127
from ..common.evaluate import evaluate, moderatex, moderatef, moderatec

0 commit comments

Comments
 (0)