Prima has got a Python interface

https://github.com/libprima/prima

PRIMA: Reference Implementation for Powell's Methods with Modernization and Amelioration

Dedicated to the late Professor M. J. D. Powell FRS (1936--2015)

What

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's renowned derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. The "P" in the name stands for Powell, and "RIMA" is an acronym for "Reference Implementation with Modernization and Amelioration".

PRIMA is part of a research project funded by the Hong Kong Research Grants Council and the Department of Applied Mathematics (AMA) at the Hong Kong Polytechnic University (PolyU). The current version is ready to be used in Fortran, in C, in Python, in MATLAB, and in Julia.

PRIMA was initiated by Zaikun Zhang in July 2020, based on the PDFO package by Tom M. Ragonneau and Zaikun Zhang.

See Zaikun Zhang's talk on PRIMA at The 10th International Congress on Industrial and Applied Mathematics for more information.

Why

Professor Powell carefully implemented his derivative-free optimization methods into publicly available solvers, which are genuine masterpieces. They are widely used by engineers and scientists. For instance, see Section 1 of a recent paper on Powell's solvers as well as the Google searches of COBYLA and BOBYQA.

However, Professor Powell's implementation was done in Fortran 77. The code is nontrivial to understand or maintain, let alone extend. For many practitioners, this has become an obstacle to exploiting these solvers in their applications. Even worse, it has hindered researchers from exploring the wealth left by Professor Powell. By all means, it is necessary to make the solvers available in languages other than Fortran promptly, first wrapping Powell's code, which is the objective of PDFO, and then providing native and modernized implementations, which is the mission of PRIMA.

Before he passed, Professor Powell had asked me and Professor Nick Gould to maintain his solvers. This is an honorable mission. To make the solvers more accessible, I started PRIMA. It is a project similar to the translation, interpretation, and annotation of Euclid’s Elements. It will make Powell's solvers easily understandable to everyone, not only the experts. Few people remember who translated Elements, but it is a job that must be done.

PRIMA aims to provide the reference implementation of Powell's methods in modern languages, including modern Fortran (F2008 or newer), C/C++, Python, MATLAB, Julia, and R. It will be a faithful implementation, in the sense that the code will be mathematically equivalent to Powell’s, except for the bug fixes and improvements made intentionally.

The focus is to implement these methods in a structured and modularized way so that they are understandable, maintainable, extendable, fault-tolerant, and future-proof. The code will have no GOTO (of course) and will use matrix-vector procedures instead of loops whenever possible. In doing so, PRIMA codes the algorithms in a way that we would present them on a blackboard. Such an implementation will enable us to get a deeper understanding of Powell's methods and pave the way for new developments based on them.

There do exist "translations" of Powell's Fortran 77 code in other languages. For example, NLopt contains a C version of COBYLA, NEWUOA, and BOBYQA, but the C code in NLopt is translated from the Fortran 77 code straightforwardly, if not automatically by f2c, and hence inherits the style, structure, and probably bugs of the original Fortran 77 implementation. Note, however, that Py-BOBYQA is a true translation of BOBYQA to Python, with significant improvements.

How

The mission of PRIMA is nontrivial due to the delicacy of Powell's algorithms and the unique style of his code. To ensure the faithfulness of PRIMA, the modern Fortran version was started by refactoring Powell's code into the free form via a small MATLAB tool. However, such refactored code is far from what is desired, because it inherits completely the structure and style of Powell's code except for the layout. Significant modifications are needed to reorganize (indeed, to rewrite) the code. To maintain the faithfulness and quality of the reference implementation, extensive tests are conducted after each and every tiny modification, using the CUTEst problems via MatCUTEst. The tests do not only verify the faithfulness of the implementation but also check that the solvers behave properly even if they are invoked with improper inputs or encounter failures of function evaluations. Stress tests are also conducted periodically to verify that the solvers work correctly without running into errors when applied to excessively large problems.

The tests are automated by GitHub Actions. As of August 2023, more than 45,000 "workflows" have been successfully run by GitHub Actions. Normally, each workflow consists of ~ 5 (sometimes more than 200) randomized tests, each test taking from tens of minutes to several hours (the maximum is 6 hours, after which the test will be canceled automatically). In other words, PRIMA has been verified by more than 200,000 hours (or more than 20 years) of randomized tests. Code must be battle-tested before becoming software.

Since each GitHub Team account can only run at most 60 GitHub Actions workflows concurrently, I have to distribute this large amount of tests to multiple Team accounts as follows.

Current status

Modern Fortran

After almost three years of intensive coding, the modern Fortran version of PRIMA was finished by December 2022. It can be compiled using CMake as follows.

git clone --depth 1 https://github.com/libprima/prima.git
cd prima
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install
cmake --build build --target install

This should create the primaf library for Fortran usage, located in the install/lib/ directory to be used with the module files in install/include/prima/mod/. In case CMake fails to find your Fortran compiler, you can indicate it by specifying -DCMAKE_Fortran_COMPILER=/path/to/your/Fortran/compiler. Similarly, set -DCMAKE_C_COMPILER=/path/to/your/C/compiler for your C compiler if needed.

Examples on how to use the library from an external code are available in fortran/examples/. Below is an illustration with COBYLA.

cd fortran/examples/cobyla
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install -DPRIMA_DIR=$PWD/../../../install/lib/cmake/prima/
cmake --build build --target install
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/../../../install/lib ./install/bin/cobyla_example_1

C

A C binding to the Fortran library is available in the c/ folder. In the same way as the Fortran library, it can be compiled using CMake, which should also create the primac library for C compilation, located in install/lib/ to be used with the prima.h header in install/include/prima/.

Examples on how to use the library from an external code are available in c/examples/. Below is an illustration with COBYLA.

cd c/examples/cobyla
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install -DPRIMA_DIR=$PWD/../../../install/lib/cmake/prima/
cmake --build build --target install
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/../../../install/lib ./install/bin/cobyla_example

Python

MATLAB

Julia

Other languages

  • Interfaces for using the modern Fortran implementation in other languages will be available later.
  • Given the modern Fortran version, native implementations in other languages become much easier, because we now have a structured and modularized implementation as a reference. My team will implement the methods in other languages in this way. This is the main motivation for developing the modern Fortran version first — to provide a modernized reference implementation for the development in other languages.

Bug fixes

PRIMA has fixed some serious issues in the original Fortran 77 implementation of Powell's methods. Note that all of them are problems in the Fortran 77 code rather than flaws in the algorithms.

The examples given below are bugs or requests sent to SciPy, NLopt, nloptr, OpenTURNS, etc., which are reputable packages that wrap/interface the original Fortran 77 implementation of Powell's solver. Inevitably, they suffer from the bugs in the Fortran 77 code.

Improvements

Thanks to the improvements introduced into the new implementation, PRIMA outperforms Powell's original code in terms of the number of function evaluations, which is the standard performance indicator in derivative-free optimization. Below are the performance profiles of the PRIMA solvers compared with Powell's implementation, the convergence tolerance being $\tau = 10^{-6}$. Roughly speaking, performance profiles plot the percentage of test problems solved against the budget, which is measured relative to the cost of the most efficient solver in the comparison. A higher curve indicates a better solver. See Benchmarking Derivative-Free Optimization Algorithms (J. J. Moré and S. M. Wild) for more information.

  • NEWUOA on unconstrained CUTEst problems of at most 200 variables

  • BOBYQA on bound-constrained CUTEst problems of at most 200 variables

  • LINCOA on linearly constrained CUTEst problems of at most 200 variables and 20000 constraints

  • COBYLA on nonlinearly constrained CUTEst problems of at most 100 variables and 10000 constraints

  • UOBYQA on unconstrained CUTEst problems of at most 100 variables

Who was Powell?

Michael James David Powell FRS was "a British numerical analyst who was among the pioneers of computational mathematics". He was the inventor/early contributor of quasi-Newton method, trust region method, augmented Lagrangian method, and SQP method. Each of them is a pillar of modern numerical optimization. He also made significant contributions to approximation theory and methods.

Among numerous honors, Powell was one of the two recipients of the first Dantzig Prize from the Mathematical Programming Society (MOS) and Society for Industrial and Applied Mathematics (SIAM). This is considered the highest award in optimization.

A "fun" fact

In the past years, while working on PRIMA, I have spotted a dozen of bugs in reputable Fortran compilers and three bugs in MATLAB. Each of them represents days of bitter debugging, which finally led to the conclusion that it was not a problem in my code but a flaw in the Fortran compilers or in MATLAB. From a very unusual angle, this reflects how intensive the coding has been.

The bitterness behind this "fun" fact is exactly why I work on PRIMA: I hope that all the frustrations that I have experienced will not happen to any user of Powell's methods anymore. I hope I am the last one in the world to decode a maze of 244 GOTOs in 7939 lines of Fortran 77 code — I did this for three years and I do not want anyone else to do it again.

Acknowledgment

PRIMA is dedicated to the memory of the late Professor Powell with gratitude for his inspiration and for the wealth he left to us.

I am grateful to Professor Ya-xiang Yuan for his everlasting encouragement and support.

The development of PRIMA would have been a mission impossible without the groundwork laid by the PDFO package of Tom M. Ragonneau and Zaikun Zhang. PDFO is Chapter 3 of Ragonneau's thesis co-supervised by Zaikun Zhang and Professor Xiaojun Chen, with financial support from the Hong Kong Ph.D. Fellowship Scheme (ref. PF18-24698).

PRIMA is a long-term project, which would not have been sustainable without the continued funds from the Hong Kong Research Grants Council (ref. PolyU 253012/17P, PolyU 153054/20P, PolyU 153066/21P, and PolyU 153086/23P) and The Hong Kong Polytechnic University (PolyU), in particular the Department of Applied Mathematics (AMA).

Citing PRIMA

PRIMA has taken me significant energy and time. I will be delighted if it is useful to you. All I need is a citation / acknowledgment. Note that PRIMA contains bug fixes and improvements that do not exist in Powell's original implementation of the solvers. Results produced by PRIMA may not be reproducible using the original solvers.

If you use PRIMA, please cite it as follows. The citation will be pointed to my paper on PRIMA when I finish it.

[1] Z. Zhang, PRIMA: Reference Implementation for Powell's Methods with Modernization and Amelioration, available at http://www.libprima.net, DOI: 10.5281/zenodo.8052654, 2023

@misc{Zhang_2023,
    title        = {{PRIMA: Reference Implementation for Powell's Methods with Modernization and Amelioration}},
    author       = {Zhang, Z.},
    howpublished = {available at http://www.libprima.net, DOI: 10.5281/zenodo.8052654},
    year         = {2023}
}

In addition, Powell’s methods can be cited as follows.

[2] M. J. D. Powell, A direct search optimization method that models the objective and constraint functions by linear interpolation, In Advances in Optimization and Numerical Analysis, eds. S. Gomez and J. P. Hennart, pages 51--67, Springer Verlag, Dordrecht, Netherlands, 1994

[3] M. J. D. Powell, UOBYQA: unconstrained optimization by quadratic approximation, Math. Program., 92(B):555--582, 2002

[4] M. J. D. Powell, The NEWUOA software for unconstrained optimization without derivatives, In Large-Scale Nonlinear Optimization, eds. G. Di Pillo and M. Roma, pages 255--297, Springer, New York, US, 2006

[5] M. J. D. Powell, The BOBYQA algorithm for bound constrained optimization without derivatives, Technical Report DAMTP 2009/NA06, Department of Applied Mathematics and Theoretical Physics, Cambridge University, Cambridge, UK, 2009

[6] T. M. Ragonneau and Z. Zhang, PDFO: a cross-platform package for Powell's derivative-free optimization solvers, arXiv:2302.13246, 2023

Remarks

  • LINCOA seeks the least value of a nonlinear function subject to linear inequality constraints without using derivatives of the objective function. Powell did not publish a paper to introduce the algorithm.

  • The paper [6] introduces the PDFO package rather than PRIMA. Nevertheless, it provides a good introduction to Powell's methods.

Charityware

PRIMA is charityware, distributed for free under its license. If you appreciate it, you may consider making a donation to a charity that you trust (in addition to citing & acknowledging PRIMA). This is only a suggestion, not an obligation.

The inspiration comes from Vim, with which Zaikun Zhang typed all his PRIMA code.

Contact

In case of problems, open a GitHub issue or contact Zaikun Zhang.

Mirrors

Star history

stardev ranking: 28 among 30,975 Fortran repos as of Jan. 2024.

Thank you for your support.

{
"by": "zaikunzhang",
"descendants": 8,
"id": 40247633,
"kids": [
40265443,
40247671
],
"score": 4,
"time": 1714744110,
"title": "Prima has got a Python interface",
"type": "story",
"url": "https://github.com/libprima/prima"
}
{
"author": "libprima",
"date": null,
"description": "PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e…",
"image": "https://opengraph.githubassets.com/6053d299f680754a80460f3915540be7085fec1ca95c31222728cec1a40a1372/libprima/prima",
"logo": "https://logo.clearbit.com/github.com",
"publisher": "GitHub",
"title": "GitHub - libprima/prima: PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell’s derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell’s methods with Modernization and Amelioration, P for Powell.",
"url": "https://github.com/libprima/prima"
}
{
"url": "https://github.com/libprima/prima",
"title": "GitHub - libprima/prima: PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.",
"description": "PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e...",
"links": [
"https://github.com/libprima/prima"
],
"image": "https://opengraph.githubassets.com/6053d299f680754a80460f3915540be7085fec1ca95c31222728cec1a40a1372/libprima/prima",
"content": "<div><article><p></p><h2>PRIMA: Reference Implementation for Powell's Methods with Modernization and Amelioration</h2><a target=\"_blank\" href=\"https://github.com/libprima/prima#prima-reference-implementation-for-powells-methods-with-modernization-and-amelioration\"></a><p></p>\n<p>Dedicated to the late Professor <b><a target=\"_blank\" href=\"https://www.zhangzk.net/powell.html\">M. J. D. Powell</a></b> FRS (1936--2015)</p>\n<ul>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#what\">What</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#why\">Why</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#how\">How</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#current-status\">Current status</a>\n<ul>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#modern-fortran\">Modern Fortran</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#c\">C</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#python\">Python</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#matlab\">MATLAB</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#julia\">Julia</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#other-languages\">Other languages</a></li>\n</ul>\n</li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#bug-fixes\">Bug fixes</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#improvements\">Improvements</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#who-was-powell\">Who was Powell?</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#a-fun-fact\">A \"fun\" fact</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#acknowledgment\">Acknowledgment</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#citing-prima\">Citing PRIMA</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#charityware\">Charityware</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#contact\">Contact</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#mirrors\">Mirrors</a>\n<ul>\n<li><a target=\"_blank\" href=\"https://gitee.com/libprima/prima\">Gitee</a></li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima\">GitHub</a></li>\n<li><a target=\"_blank\" href=\"https://gitlab.com/libprima/prima\">GitLab</a></li>\n</ul>\n</li>\n<li><a target=\"_blank\" href=\"https://github.com/libprima/prima#star-history\">Star history</a></li>\n</ul>\n<p></p><h3>What</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#what\"></a><p></p>\n<p>PRIMA is a package for <strong>solving general nonlinear optimization problems without using derivatives</strong>.\nIt provides the reference implementation for Powell's renowned derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA.\nThe \"P\" in the name stands for <a target=\"_blank\" href=\"https://www.zhangzk.net/powell.html\"><strong>P</strong>owell</a>,\nand \"RIMA\" is an acronym for \"<strong>R</strong>eference <strong>I</strong>mplementation with <strong>M</strong>odernization and <strong>A</strong>melioration\".</p>\n<p>PRIMA is part of a research project funded by the\n<a target=\"_blank\" href=\"https://www.ugc.edu.hk/eng/rgc\">Hong Kong Research Grants Council</a> and\nthe <a target=\"_blank\" href=\"https://www.polyu.edu.hk/ama\">Department of Applied Mathematics</a> (AMA) at the\n<a target=\"_blank\" href=\"https://www.polyu.edu.hk/\">Hong Kong Polytechnic University</a> (PolyU).\nThe current version is ready to be used <a target=\"_blank\" href=\"https://github.com/libprima/prima#modern-fortran\">in Fortran</a>, <a target=\"_blank\" href=\"https://github.com/libprima/prima#c\">in C</a>,\n<a target=\"_blank\" href=\"https://github.com/libprima/prima#python\">in Python</a>,\n<a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/README_mat.md\">in MATLAB</a>,\nand <a target=\"_blank\" href=\"https://juliahub.com/ui/Packages/General/PRIMA\">in Julia</a>.</p>\n<p>PRIMA was initiated by <a target=\"_blank\" href=\"https://www.zhangzk.net/\">Zaikun Zhang</a> in July 2020, based on\nthe <a target=\"_blank\" href=\"https://www.pdfo.net/\">PDFO</a> package by <a target=\"_blank\" href=\"https://tomragonneau.com/\">Tom M. Ragonneau</a> and Zaikun Zhang.</p>\n<p>See <a target=\"_blank\" href=\"https://raw.githubusercontent.com/ztalks/20230825-iciam23/main/20230825-iciam.pdf\">Zaikun Zhang's talk</a>\non PRIMA at <a target=\"_blank\" href=\"https://iciam2023.org/\">The 10th International Congress on Industrial and Applied Mathematics</a> for more information.</p>\n<p></p><h3>Why</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#why\"></a><p></p>\n<p>Professor Powell carefully implemented his derivative-free optimization methods into publicly available solvers,\nwhich are genuine masterpieces. They are widely used by engineers and scientists. For instance,\nsee Section 1 of <a target=\"_blank\" href=\"https://arxiv.org/pdf/2302.13246.pdf\">a recent paper on Powell's solvers</a>\nas well as the Google searches of <a target=\"_blank\" href=\"https://www.google.com/search?q=cobyla\">COBYLA</a>\nand <a target=\"_blank\" href=\"https://www.google.com/search?q=bobyqa\">BOBYQA</a>.</p>\n<p>However, Professor Powell's implementation was done in <a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/fortran/original\">Fortran 77</a>.\nThe code is nontrivial to understand or maintain, let alone extend.\nFor many practitioners, this has become an obstacle to exploiting these solvers in their\napplications. Even worse, it has hindered researchers from exploring the wealth left by Professor\nPowell. By all means, it is\n<a target=\"_blank\" href=\"https://permalink.lanl.gov/object/tr?what=info:lanl-repo/lareport/LA-UR-23-23992\">necessary to make the solvers available in languages other than Fortran</a>\npromptly, first wrapping Powell's code, which is the objective of <a target=\"_blank\" href=\"https://www.pdfo.net/\">PDFO</a>,\nand then providing native and modernized implementations, which is the mission of PRIMA.</p>\n<p>Before he passed, Professor Powell had asked me and\n<a target=\"_blank\" href=\"https://www.numerical.rl.ac.uk/people/nimg\">Professor Nick Gould</a> to maintain his solvers.\nThis is an honorable mission. To make the solvers more accessible, I started PRIMA.\nIt is a project similar to the translation, interpretation, and annotation of Euclid’s\n<em>Elements</em>. It will make Powell's solvers easily understandable to everyone, not only the experts.\nFew people remember <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Euclid%27s_Elements#Translations\">who translated <em>Elements</em></a>,\nbut it is a job that must be done.</p>\n<p>PRIMA aims to provide the reference implementation of Powell's methods in modern languages,\nincluding <a target=\"_blank\" href=\"https://fortran-lang.org/\"><strong>modern</strong> Fortran</a> (F2008 or newer), C/C++, Python, MATLAB,\nJulia, and R. It will be a <strong>faithful</strong> implementation, in the sense that the code will be\nmathematically equivalent to Powell’s, <strong>except for</strong> the\n<a target=\"_blank\" href=\"https://github.com/libprima/prima#bug-fixes\">bug fixes</a> and <a target=\"_blank\" href=\"https://github.com/libprima/prima#improvements\">improvements</a> made intentionally.</p>\n<p>The focus is to implement these methods in a <strong>structured</strong> and <strong>modularized</strong> way so that they\nare <strong>understandable</strong>, <strong>maintainable</strong>, <strong>extendable</strong>, <strong>fault-tolerant</strong>, and <strong>future-proof</strong>.\nThe code will <strong>have no GOTO</strong> (of course)\nand will <strong>use matrix-vector procedures instead of loops</strong> whenever possible.\nIn doing so, PRIMA codes the algorithms <strong>in a way that we would present them on a blackboard</strong>.\nSuch an implementation will enable us to get a deeper understanding of Powell's methods and\npave the way for new developments based on them.</p>\n<p>There do exist \"translations\" of Powell's Fortran 77 code in other languages. For example,\n<a target=\"_blank\" href=\"https://github.com/stevengj/nlopt\">NLopt</a> contains a C version of COBYLA, NEWUOA, and BOBYQA,\nbut the C code in NLopt is translated from the Fortran 77 code straightforwardly, if\nnot automatically by <a target=\"_blank\" href=\"https://netlib.org/f2c/f2c.pdf\">f2c</a>, and hence inherits the style, structure,\nand probably <a target=\"_blank\" href=\"https://github.com/libprima/prima#bug-fixes\">bugs</a> of the original Fortran 77 implementation.\nNote, however, that\n<a target=\"_blank\" href=\"https://numericalalgorithmsgroup.github.io/pybobyqa/\">Py-BOBYQA</a> is a <strong>true translation</strong> of BOBYQA\nto Python, with significant improvements.</p>\n<p></p><h3>How</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#how\"></a><p></p>\n<p>The mission of PRIMA is nontrivial due to the delicacy of Powell's algorithms and the unique style\nof his code. To ensure the faithfulness of PRIMA,\nthe <strong>modern</strong> Fortran version was started by refactoring Powell's code into the free form via a small\n<a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/matlab/setup_tools/freeform.m\">MATLAB tool</a>.\nHowever, such refactored code is far from what is desired, because it inherits completely\nthe structure and style of Powell's code except for the layout. Significant modifications are needed\nto reorganize (indeed, to <strong>rewrite</strong>) the code. To maintain the faithfulness and quality of the\nreference implementation, extensive tests are conducted after each and every tiny modification,\nusing the <a target=\"_blank\" href=\"https://github.com/ralna/CUTEst\">CUTEst</a> problems via <a target=\"_blank\" href=\"https://github.com/matcutest/matcutest\">MatCUTEst</a>.\nThe tests do not only verify the faithfulness of the implementation but also check that <strong>the solvers\nbehave properly even if they are invoked with improper inputs or <a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/matlab/tests/private/tough.m\">encounter failures of function\nevaluations</a></strong>.\n<a target=\"_blank\" href=\"https://github.com/libprima/prima#stress-tests\"><strong>Stress tests</strong></a> are also conducted\nperiodically to verify that the solvers work correctly without running into errors when applied to\n<strong>excessively large problems</strong>.</p>\n<p>The tests are <strong>automated</strong> by\n<a target=\"_blank\" href=\"https://docs.github.com/en/actions\">GitHub Actions</a>. As of August 2023, more than\n45,000 \"workflows\" have been successfully run by GitHub Actions. Normally, each workflow consists of ~ 5\n(<a target=\"_blank\" href=\"https://github.com/primalib/prima/actions/runs/5763631681\">sometimes more than 200</a>)\n<strong>randomized</strong> tests,\neach test taking from tens of minutes to several hours (the maximum\nis 6 hours, after which the test will be canceled automatically). In other words,\nPRIMA has been verified by more than 200,000 hours (or <strong>more than 20 years</strong>) of randomized tests.\n<strong>Code must be battle-tested before becoming software.</strong></p>\n<p>Since each GitHub Team account can only run at most 60 GitHub Actions workflows concurrently, I have\nto distribute this large amount of tests to multiple Team accounts as follows.</p>\n<p></p><h3>Current status</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#current-status\"></a><p></p>\n<p></p><h4>Modern Fortran</h4><a target=\"_blank\" href=\"https://github.com/libprima/prima#modern-fortran\"></a><p></p>\n<p>After almost <strong>three</strong> years of intensive coding, the <a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/fortran\">modern Fortran version</a> of\nPRIMA was finished by December 2022.\nIt can be compiled using CMake as follows.<a></a></p>\n<div><pre>git clone --depth 1 https://github.com/libprima/prima.git\n<span>cd</span> prima\ncmake -S <span>.</span> -B build -DCMAKE_INSTALL_PREFIX=install\ncmake --build build --target install</pre></div>\n<p>This should create the <code>primaf</code> library for Fortran usage, located in the <code>install/lib/</code> directory\nto be used with the module files in <code>install/include/prima/mod/</code>.\nIn case CMake fails to find your Fortran compiler,\nyou can indicate it by specifying <code>-DCMAKE_Fortran_COMPILER=/path/to/your/Fortran/compiler</code>.\nSimilarly, set <code>-DCMAKE_C_COMPILER=/path/to/your/C/compiler</code> for your C compiler if needed.</p>\n<p>Examples on how to use the library from an external code are available in <a target=\"_blank\" href=\"https://github.com/libprima/prima/tree/main/fortran/examples\"><code>fortran/examples/</code></a>.\nBelow is an illustration with COBYLA.</p>\n<div><pre><span>cd</span> fortran/examples/cobyla\ncmake -S <span>.</span> -B build -DCMAKE_INSTALL_PREFIX=install -DPRIMA_DIR=<span>$PWD</span>/../../../install/lib/cmake/prima/\ncmake --build build --target install\nLD_LIBRARY_PATH=<span>$LD_LIBRARY_PATH</span>:<span>$PWD</span>/../../../install/lib ./install/bin/cobyla_example_1</pre></div>\n<p></p><h4>C</h4><a target=\"_blank\" href=\"https://github.com/libprima/prima#c\"></a><p></p>\n<p>A C binding to the Fortran library is available in the <a target=\"_blank\" href=\"https://github.com/libprima/prima/tree/main/c\"><code>c/</code> folder</a>.\nIn the same way as the Fortran library, it can be <a target=\"_blank\" href=\"https://github.com/libprima/prima#cmake\">compiled using CMake</a>,\nwhich should also create the <code>primac</code> library for C compilation, located in <code>install/lib/</code> to be used with the <code>prima.h</code> header in <code>install/include/prima/</code>.</p>\n<p>Examples on how to use the library from an external code are available in <a target=\"_blank\" href=\"https://github.com/libprima/prima/tree/main/c/examples\"><code>c/examples/</code></a>.\nBelow is an illustration with COBYLA.</p>\n<div><pre><span>cd</span> c/examples/cobyla\ncmake -S <span>.</span> -B build -DCMAKE_INSTALL_PREFIX=install -DPRIMA_DIR=<span>$PWD</span>/../../../install/lib/cmake/prima/\ncmake --build build --target install\nLD_LIBRARY_PATH=<span>$LD_LIBRARY_PATH</span>:<span>$PWD</span>/../../../install/lib ./install/bin/cobyla_example</pre></div>\n<p></p><h4>Python</h4><a target=\"_blank\" href=\"https://github.com/libprima/prima#python\"></a><p></p>\n<ul>\n<li>An <a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/python\">interface</a> is provided for <a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/python/examples/rosenbrock.py\">using the <strong>modern</strong> Fortran implementation in Python</a>.</li>\n<li>The inclusion of PRIMA into SciPy is <a target=\"_blank\" href=\"https://github.com/scipy/scipy/issues/18118\">under discussion</a>. It will replace the <a target=\"_blank\" href=\"https://github.com/libprima/prima#bug-fixes\">buggy</a> and unmaintained Fortran 77 version of <a target=\"_blank\" href=\"https://docs.scipy.org/doc/scipy/reference/optimize.minimize-cobyla.html#optimize-minimize-cobyla\">COBYLA underlying <code>scipy.optimize.minimize</code></a>, and make the other four solvers available to all SciPy users.</li>\n<li>A <a target=\"_blank\" href=\"https://github.com/libprima/prima/pull/37\">native Python implementation of PRIMA</a> is under development.</li>\n</ul>\n<p></p><h4>MATLAB</h4><a target=\"_blank\" href=\"https://github.com/libprima/prima#matlab\"></a><p></p>\n<ul>\n<li>An <a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/matlab/interfaces/prima.m\">interface</a> is provided for <a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/README_mat.md\">using the <strong>modern</strong> Fortran implementation in MATLAB</a>.</li>\n<li><a></a>A <a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/matlab/interfaces/+newuoa_mat\">pure MATLAB version of NEWUOA</a> is implemented. It was\ngenerated straightforwardly (indeed, <strong>automatically</strong>) from an earlier version of the\n<strong>modern</strong> Fortran code (with the help of Mr. Galann Pennec). The other four solvers will be\nimplemented in MATLAB similarly.</li>\n</ul>\n<p></p><h4>Julia</h4><a target=\"_blank\" href=\"https://github.com/libprima/prima#julia\"></a><p></p>\n<ul>\n<li>A <a target=\"_blank\" href=\"https://juliahub.com/ui/Packages/General/PRIMA\">Julia interface</a> is provided\nby <a target=\"_blank\" href=\"https://github.com/libprima/prima.jl\"><code>PRIMA.jl</code></a>.\nIt is registered in the General Registry of Julia as\n<a target=\"_blank\" href=\"https://github.com/JuliaRegistries/General/tree/master/P/PRIMA\"><code>PRIMA</code></a>.</li>\n</ul>\n<p></p><h4>Other languages</h4><a target=\"_blank\" href=\"https://github.com/libprima/prima#other-languages\"></a><p></p>\n<ul>\n<li>Interfaces for using the modern Fortran implementation in other languages will be available later.</li>\n<li>Given the <strong>modern</strong> Fortran version, <strong>native implementations</strong> in other languages\nbecome <strong>much easier</strong>, because we now have a structured and modularized implementation as a reference.\nMy team will implement the methods in other languages in this way.\nThis is the main motivation for developing the <strong>modern</strong> Fortran version first —\nto provide a modernized reference implementation for the development in other languages.</li>\n</ul>\n<p></p><h3>Bug fixes</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#bug-fixes\"></a><p></p>\n<p>PRIMA has fixed some <strong>serious</strong> issues in the <strong>original Fortran 77 implementation</strong> of Powell's methods.\nNote that all of them are problems in the Fortran 77 code rather than flaws in the algorithms.</p>\n<p>The examples given below are bugs or requests sent to <a target=\"_blank\" href=\"https://github.com/scipy/scipy\">SciPy</a>,\n<a target=\"_blank\" href=\"https://github.com/stevengj/nlopt\">NLopt</a>,\n<a target=\"_blank\" href=\"https://github.com/astamm/nloptr\">nloptr</a>,\n<a target=\"_blank\" href=\"https://github.com/openturns/openturns\">OpenTURNS</a>,\netc., which are reputable packages that wrap/interface the <strong>original Fortran 77 implementation</strong>\nof Powell's solver. Inevitably, they suffer from the bugs in the Fortran 77 code.</p>\n<ul>\n<li>\n<p>The Fortran 77 solvers may get <strong>stuck</strong> in infinite loops.</p>\n<ul>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/scipy/scipy/issues/8998\">optimize: COBYLA hangs / infinite loop #8998</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/scipy/scipy/issues/15527\">BUG: Scipy.optimize / COBYLA hangs on some CPUs #15527</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/stevengj/nlopt/issues/370\">COBYLA freezes (though maxeval and maxtime are given) #370</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/stevengj/nlopt/issues/118\">COBYLA hangs #118</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/stevengj/nlopt/issues/117\">NEWUOA_BOUND stuck in infinite loop inside MMA #117</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/openturns/openturns/issues/1651\">Cobyla freezes in 0T1.16rc1 #1651</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/astamm/nloptr/issues/25\">Optimization freezes #25</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/cureos/csnumerics/issues/7\">BOBYQA gets stuck in infinite loop. #7</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/cureos/csnumerics/issues/8\">Cobyla turns into infinite loop and never finishes #8</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/xypron/jcobyla/issues/3\">Algorithm turns into infinite loop and never finishes #3</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/libprima/prima/issues/98\">The Fortran 77 version of UOBYQA encounters infinite cyclings very often if PRIMA_REAL_PRECISION is 32</a></p>\n</li>\n</ul>\n</li>\n<li>\n<p>The Fortran 77 solvers may <strong>crash</strong> with <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Segmentation_fault\">segmentation faults</a>\ndue to uninitialized variables that are used as indices.</p>\n<ul>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/stevengj/nlopt/issues/134\">Fix all uninitialized variable warnings #134</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/stevengj/nlopt/issues/133\">BOBYQA uninitialised variables in rare cases #133</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/stevengj/nlopt/issues/36\">Use of uninitialized variable in BOBYQA altmov #36</a></p>\n</li>\n</ul>\n</li>\n<li>\n<p>Fortran 77 COBYLA may <strong>not return the best point</strong> that is evaluated; sometimes, the returned point can have a\nlarge constraint violation even though the starting point is feasible.</p>\n<ul>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/stevengj/nlopt/issues/182\">nlopt COBYLA optimizer gives unexpected output #182</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/stevengj/nlopt/issues/110\">Last Result Returned Not Optimized Result #110</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/stevengj/nlopt/issues/57\">COBYLA returns last evaluated function which might not be minimum #57</a></p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://github.com/cureos/jcobyla/issues/1\">Successful termination when constraints violated #1</a></p>\n</li>\n</ul>\n</li>\n</ul>\n<p></p><h3>Improvements</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#improvements\"></a><p></p>\n<p>Thanks to the improvements introduced into the new implementation, PRIMA outperforms Powell's\noriginal code in terms of the <strong>number of function evaluations</strong>, which is the standard performance\nindicator in derivative-free optimization.\nBelow are the <a target=\"_blank\" href=\"https://arxiv.org/pdf/cs/0102001.pdf\">performance profiles</a>\nof the PRIMA solvers compared with Powell's implementation, the convergence tolerance being $\\tau = 10^{-6}$.\nRoughly speaking, performance profiles plot the percentage of test problems solved against the budget,\nwhich is measured relative to the cost of the most efficient solver in the comparison.\nA <strong>higher</strong> curve indicates a <strong>better</strong> solver.\nSee <a target=\"_blank\" href=\"https://www.mcs.anl.gov/~wild/dfo/benchmarking\">Benchmarking Derivative-Free Optimization Algorithms</a>\n(<a target=\"_blank\" href=\"https://www.anl.gov/profile/jorge-j-more\">J. J. Moré</a> and <a target=\"_blank\" href=\"https://www.anl.gov/profile/stefan-m-wild\">S. M. Wild</a>)\nfor more information.</p>\n<ul>\n<li>NEWUOA on unconstrained CUTEst problems of at most 200 variables</li>\n</ul>\n<p><a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/benchmark/latest/prima_newuoa.png\"><img src=\"https://github.com/libprima/prima/raw/main/benchmark/latest/prima_newuoa.png\" /></a></p>\n<ul>\n<li>BOBYQA on bound-constrained CUTEst problems of at most 200 variables</li>\n</ul>\n<p><a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/benchmark/latest/prima_bobyqa.png\"><img src=\"https://github.com/libprima/prima/raw/main/benchmark/latest/prima_bobyqa.png\" /></a></p>\n<ul>\n<li>LINCOA on linearly constrained CUTEst problems of at most 200 variables and 20000 constraints</li>\n</ul>\n<p><a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/benchmark/latest/prima_lincoa.png\"><img src=\"https://github.com/libprima/prima/raw/main/benchmark/latest/prima_lincoa.png\" /></a></p>\n<ul>\n<li>COBYLA on nonlinearly constrained CUTEst problems of at most 100 variables and 10000 constraints</li>\n</ul>\n<p><a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/benchmark/latest/prima_cobyla.png\"><img src=\"https://github.com/libprima/prima/raw/main/benchmark/latest/prima_cobyla.png\" /></a></p>\n<ul>\n<li>UOBYQA on unconstrained CUTEst problems of at most 100 variables</li>\n</ul>\n<p><a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/benchmark/latest/prima_uobyqa.png\"><img src=\"https://github.com/libprima/prima/raw/main/benchmark/latest/prima_uobyqa.png\" /></a></p>\n<p></p><h3>Who was Powell?</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#who-was-powell\"></a><p></p>\n<p><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Michael_J._D._Powell\">Michael James David Powell FRS</a> was\n<a target=\"_blank\" href=\"https://royalsocietypublishing.org/doi/full/10.1098/rsbm.2017.0023\">\"a British numerical analyst who was among the pioneers of computational mathematics\"</a>.\nHe was the inventor/early contributor of\n<a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Quasi-Newton_method\">quasi-Newton method</a>,\n<a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Trust_region\">trust region method</a>,\n<a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Augmented_Lagrangian_method\">augmented Lagrangian method</a>,\nand <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Sequential_quadratic_programming\">SQP method</a>.\nEach of them is a pillar of modern numerical optimization. He also made significant contributions\nto <a target=\"_blank\" href=\"https://www.cambridge.org/highereducation/books/approximation-theory-and-methods/66FD8CD6F18FE1ED499A8CA9A05F2A5A#overview\">approximation theory and methods</a>.</p>\n<p>Among numerous honors, Powell was one of the two recipients of the first\n<a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Dantzig_Prize\">Dantzig Prize</a>\nfrom the Mathematical Programming Society (MOS) and Society for Industrial and Applied Mathematics (SIAM).\nThis is considered the highest award in optimization.</p>\n<p></p><h3>A \"fun\" fact</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#a-fun-fact\"></a><p></p>\n<p>In the past years, while working on PRIMA, I have spotted a dozen of <a target=\"_blank\" href=\"https://github.com/zequipe/test_compiler\">bugs in reputable Fortran compilers</a>\nand three <a target=\"_blank\" href=\"https://github.com/zequipe/test_matlab\">bugs in MATLAB</a>. Each of them represents days of <strong>bitter</strong> debugging, which finally led to the conclusion\nthat it was not a problem in my code but a flaw in the Fortran compilers or in MATLAB. From a very unusual angle, this reflects how intensive\nthe coding has been.</p>\n<p>The bitterness behind this \"fun\" fact is exactly why I work on PRIMA: I hope that all\nthe frustrations that I have experienced will not happen to any user of Powell's methods anymore.\nI hope I am the last one in the world to decode a maze of 244 GOTOs in 7939 lines of Fortran 77 code —\nI did this for three years and I do not want anyone else to do it again.</p>\n<p></p><h3>Acknowledgment</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#acknowledgment\"></a><p></p>\n<p>PRIMA is dedicated to the memory of the late <a target=\"_blank\" href=\"https://www.zhangzk.net/powell.html\">Professor Powell</a> with gratitude for his inspiration and\nfor the wealth he left to us.</p>\n<p>I am grateful to <a target=\"_blank\" href=\"http://lsec.cc.ac.cn/~yyx\">Professor Ya-xiang Yuan</a> for his everlasting encouragement and support.</p>\n<p>The development of PRIMA would have been a mission impossible without the groundwork laid by the <a target=\"_blank\" href=\"https://www.pdfo.net/\">PDFO</a>\npackage of <a target=\"_blank\" href=\"https://tomragonneau.com/\">Tom M. Ragonneau</a> and Zaikun Zhang. PDFO is Chapter 3 of\nRagonneau's <a target=\"_blank\" href=\"https://tomragonneau.com/documents/thesis.pdf\">thesis</a> co-supervised by Zaikun Zhang and Professor <a target=\"_blank\" href=\"https://www.polyu.edu.hk/ama/staff/xjchen/ChenXJ.htm\">Xiaojun Chen</a>, with financial support from\nthe <a target=\"_blank\" href=\"https://cerg1.ugc.edu.hk/hkpfs/index.html\">Hong Kong Ph.D. Fellowship Scheme</a> (ref. PF18-24698).</p>\n<p>PRIMA is a long-term project, which would not have been sustainable without the continued funds from the\n<a target=\"_blank\" href=\"https://www.ugc.edu.hk/eng/rgc/\">Hong Kong Research Grants Council</a> (ref. PolyU 253012/17P, PolyU 153054/20P,\nPolyU 153066/21P, and PolyU 153086/23P) and <a target=\"_blank\" href=\"https://www.polyu.edu.hk/\">The Hong Kong Polytechnic University</a> (PolyU),\nin particular the <a target=\"_blank\" href=\"https://www.polyu.edu.hk/ama\">Department of Applied Mathematics</a> (AMA).</p>\n<p></p><h3>Citing PRIMA</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#citing-prima\"></a><p></p>\n<p>PRIMA has taken me significant energy and time. I will be delighted if it is useful to you. All I need is a citation / acknowledgment.\nNote that PRIMA contains <a target=\"_blank\" href=\"https://github.com/libprima/prima#bug-fixes\">bug fixes</a> and <a target=\"_blank\" href=\"https://github.com/libprima/prima#improvements\">improvements</a> that do not exist in Powell's original\nimplementation of the solvers. Results produced by PRIMA may not be reproducible using the original solvers.</p>\n<p>If you use PRIMA, please cite it as follows. The citation will be pointed to my paper on PRIMA when I finish it.</p>\n<p>[1] Z. Zhang, PRIMA: Reference Implementation for Powell's Methods with Modernization and Amelioration, available at <a target=\"_blank\" href=\"http://www.libprima.net/\">http://www.libprima.net</a>, <a target=\"_blank\" href=\"https://doi.org/10.5281/zenodo.8052654\">DOI: 10.5281/zenodo.8052654</a>, 2023</p>\n<div><pre><span>@misc</span>{<span>Zhang_2023</span>,\n <span>title</span> = <span><span>{</span>{PRIMA: Reference Implementation for Powell's Methods with Modernization and Amelioration}<span>}</span></span>,\n <span>author</span> = <span><span>{</span>Zhang, Z.<span>}</span></span>,\n <span>howpublished</span> = <span><span>{</span>available at http://www.libprima.net, DOI: 10.5281/zenodo.8052654<span>}</span></span>,\n <span>year</span> = <span><span>{</span>2023<span>}</span></span>\n}</pre></div>\n<p>In addition, Powell’s methods can be cited as follows.</p>\n<p>[2] M. J. D. Powell, A direct search optimization method that models the\nobjective and constraint functions by linear interpolation, In Advances\nin <em>Optimization and Numerical Analysis</em>, <em>eds.</em> S. Gomez and J. P. Hennart,\npages 51--67, Springer Verlag, Dordrecht, Netherlands, 1994</p>\n<p>[3] M. J. D. Powell, UOBYQA: unconstrained optimization by quadratic\napproximation, <em>Math. Program.</em>, 92(B):555--582, 2002</p>\n<p>[4] M. J. D. Powell, The NEWUOA software for unconstrained optimization\nwithout derivatives, In <em>Large-Scale Nonlinear Optimization</em>, <em>eds.</em> G. Di Pillo\nand M. Roma, pages 255--297, Springer, New York, US, 2006</p>\n<p>[5] M. J. D. Powell, The BOBYQA algorithm for bound constrained\noptimization without derivatives, Technical Report DAMTP 2009/NA06,\nDepartment of Applied Mathematics and Theoretical Physics, Cambridge\nUniversity, Cambridge, UK, 2009</p>\n<p>[6] T. M. Ragonneau and Z. Zhang,\n<a target=\"_blank\" href=\"https://arxiv.org/pdf/2302.13246.pdf\">PDFO: a cross-platform package for Powell's derivative-free optimization solvers</a>,\narXiv:2302.13246, 2023</p>\n<p><strong>Remarks</strong></p>\n<ul>\n<li>\n<p>LINCOA seeks the least value of a nonlinear function subject to\nlinear inequality constraints without using derivatives of the objective\nfunction. Powell did not publish a paper to introduce the algorithm.</p>\n</li>\n<li>\n<p><a target=\"_blank\" href=\"https://arxiv.org/pdf/2302.13246.pdf\">The paper [6]</a> introduces <a target=\"_blank\" href=\"https://www.pdfo.net/\">the PDFO package</a>\nrather than PRIMA. Nevertheless, it provides a good introduction to Powell's methods.</p>\n</li>\n</ul>\n<p></p><h3>Charityware</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#charityware\"></a><p></p>\n<p>PRIMA is <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Careware\">charityware</a>, distributed for free under its\n<a target=\"_blank\" href=\"https://github.com/libprima/prima/blob/main/LICENCE.txt\">license</a>.\nIf you appreciate it, you may consider making a donation to a charity that you trust\n(in addition to <a target=\"_blank\" href=\"https://github.com/libprima/prima#citing-prima\">citing &amp; acknowledging PRIMA</a>).\nThis is only a suggestion, not an obligation.</p>\n<p>The inspiration comes from <a target=\"_blank\" href=\"https://www.vim.org/\">Vim</a>, with which Zaikun Zhang typed all his PRIMA code.</p>\n<p></p><h3>Contact</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#contact\"></a><p></p>\n<p>In case of problems, <a target=\"_blank\" href=\"https://github.com/libprima/prima/issues\">open a GitHub issue</a> or <a target=\"_blank\" href=\"https://www.zhangzk.net/\">contact\nZaikun Zhang</a>.</p>\n<p></p><h3>Mirrors</h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#mirrors\"></a><p></p>\n<ul>\n<li>\n<p>Gitee: <a target=\"_blank\" href=\"https://gitee.com/libprima/prima\">https://gitee.com/libprima/prima</a></p>\n</li>\n<li>\n<p>GitHub: <a target=\"_blank\" href=\"https://github.com/libprima/prima\">https://github.com/libprima/prima</a></p>\n</li>\n<li>\n<p>GitLab: <a target=\"_blank\" href=\"https://gitlab.com/libprima/prima\">https://gitlab.com/libprima/prima</a></p>\n</li>\n</ul>\n<p></p><h3><a target=\"_blank\" href=\"https://star-history.com/#libprima/prima&amp;Date\">Star history</a></h3><a target=\"_blank\" href=\"https://github.com/libprima/prima#star-history\"></a><p></p>\n<p><a target=\"_blank\" href=\"https://stardev.io/\">stardev</a> ranking: <a target=\"_blank\" href=\"https://stardev.io/top/repos/fortran?developer=libprima&amp;repo=prima\">28 among 30,975</a> Fortran repos as of Jan. 2024.</p>\n<p><a target=\"_blank\" href=\"https://camo.githubusercontent.com/c803a5f72a8116d8c4dd71de09902364ce64fce8270489c6a2ab1ccb566a8c03/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f7376673f7265706f733d6c69627072696d612f7072696d6126747970653d44617465\"><img src=\"https://camo.githubusercontent.com/c803a5f72a8116d8c4dd71de09902364ce64fce8270489c6a2ab1ccb566a8c03/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f7376673f7265706f733d6c69627072696d612f7072696d6126747970653d44617465\" /></a></p>\n<p><strong>Thank you for your support.</strong></p>\n</article></div>",
"author": "",
"favicon": "https://github.githubassets.com/favicons/favicon.svg",
"source": "github.com",
"published": "",
"ttr": 509,
"type": "object"
}