{"id":21300376,"url":"https://github.com/pdfo/pdfo","last_synced_at":"2025-05-16T08:06:03.313Z","repository":{"id":37075413,"uuid":"256954263","full_name":"pdfo/pdfo","owner":"pdfo","description":"Powell's Derivative-Free Optimization solvers.","archived":false,"fork":false,"pushed_at":"2025-05-02T07:30:39.000Z","size":4249,"stargazers_count":102,"open_issues_count":7,"forks_count":26,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-13T09:09:18.200Z","etag":null,"topics":["blackbox-optimization","bobyqa","cobyla","constrained-optimization","derivative-free-optimization","fortran","lincoa","matlab","newuoa","nonlinear-optimization","numerical-optimization","optimization","optimization-algorithms","powell","python","simulation","simulation-based-optimization","unconstrained-optimization","uobyqa","zeroth-order-optimization"],"latest_commit_sha":null,"homepage":"https://www.pdfo.net","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdfo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-19T08:51:55.000Z","updated_at":"2025-03-17T13:12:58.000Z","dependencies_parsed_at":"2023-12-19T04:55:32.441Z","dependency_job_id":"62e04aeb-0bfa-45b9-b27c-09a11cdabb89","html_url":"https://github.com/pdfo/pdfo","commit_stats":{"total_commits":207,"total_committers":7,"mean_commits":"29.571428571428573","dds":0.4589371980676329,"last_synced_commit":"baf404dfa50b42baa4b2f1a53c323d6f43ad804a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdfo%2Fpdfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdfo%2Fpdfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdfo%2Fpdfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdfo%2Fpdfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdfo","download_url":"https://codeload.github.com/pdfo/pdfo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blackbox-optimization","bobyqa","cobyla","constrained-optimization","derivative-free-optimization","fortran","lincoa","matlab","newuoa","nonlinear-optimization","numerical-optimization","optimization","optimization-algorithms","powell","python","simulation","simulation-based-optimization","unconstrained-optimization","uobyqa","zeroth-order-optimization"],"created_at":"2024-11-21T15:22:15.901Z","updated_at":"2025-05-16T08:05:58.297Z","avatar_url":"https://github.com/pdfo.png","language":"Fortran","readme":"\u003ch1 align=\"center\"\u003ePDFO: Powell's Derivative-Free Optimization solvers\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003cb\u003e\u003ca href=\"#introduction\"\u003eIntroduction\u003c/a\u003e | \u003ca href=\"#python-version-of-pdfo\"\u003ePython\u003c/a\u003e | \u003ca href=\"#matlab-version-of-pdfo\"\u003eMATLAB\u003c/a\u003e | \u003ca href=\"#citing-pdfo\"\u003eCiting PDFO\u003c/a\u003e | \u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/b\u003e\u003c/p\u003e\n\nDedicated to the late Professor [M. J. D. Powell](https://www.zhangzk.net/powell.html) FRS (1936\u0026ndash;2015).\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/pdfo/pdfo/build.yml?logo=github\u0026style=for-the-badge)](https://github.com/pdfo/pdfo/actions/workflows/build.yml)\n[![GitHub](https://img.shields.io/github/license/pdfo/pdfo?logo=github\u0026style=for-the-badge)](https://opensource.org/licenses/BSD-3-Clause/)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/pdfo/pdfo?logo=github\u0026style=for-the-badge)](https://github.com/pdfo/pdfo/releases/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pdfo?logo=pypi\u0026style=for-the-badge)](https://pypi.org/project/pdfo/)\n[![View PDFO: Powell's Derivative-Free Optimization solvers on File Exchange](https://img.shields.io/badge/MATLAB-File_Exchange-orange?style=for-the-badge)](https://www.mathworks.com/matlabcentral/fileexchange/75195-pdfo-powell-s-derivative-free-optimization-solvers/)\n[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.3887568-blue?style=for-the-badge)](https://doi.org/10.5281/zenodo.3887568)\n\n## Introduction\n\nPDFO (Powell's Derivative-Free Optimization solvers) is a cross-platform package\nproviding interfaces for using the late Professor [M. J. D. Powell's](https://www.zhangzk.net/powell.html)\nderivative-free optimization solvers, including UOBYQA, NEWUOA, BOBYQA, LINCOA,\nand COBYLA. See the [PDFO homepage](https://www.pdfo.net) and the [PDFO paper](https://arxiv.org/pdf/2302.13246.pdf) for more information.\n\nThis package makes use of a modified version of [Powell's](https://www.zhangzk.net/powell.html)\nFortran code. See the folder [`original`](https://github.com/pdfo/pdfo/tree/main/fsrc/original)\nunder `fsrc` for [Powell's](https://www.zhangzk.net/powell.html) original code.\n\n## Python version of PDFO\n\n### Installation\n\n#### Recommended installation\n\nTo use the Python version of PDFO on Linux, Mac, or Windows, you need\n[Python](https://www.python.org/) (version 3.8 or above).\n\nIt is highly recommended to install PDFO via [PyPI](https://pypi.org).\n\nInstall [pip](https://pip.pypa.io/en/stable/installing/) in your system if\nyou Python version does not include it. Then execute\n\n```bash\npip install pdfo\n```\n\nin a command shell (e.g., the terminal for Linux and macOS, or the Command\nShell for Windows). If your pip launcher is not `pip`, adapt the\ncommand accordingly (it may be `pip3` for example). If this\ncommand runs successfully, PDFO is installed. You may verify the\ninstallation by\n\n```bash\npython -m unittest pdfo.testpdfo\n```\n\nOnce again, if your Python launcher is not `python`, adapt the command accordingly (it may be `python3` for example).\nIf you are an Anaconda user, PDFO is also available through the conda installer\n( https://anaconda.org/conda-forge/pdfo ). However, it is not managed by us.\n\n#### Alternative installation (using source distribution)\n\nAlternatively, although deeply discouraged, PDFO can be installed from the\nsource code. It requires you to install additional Python headers, a Fortran\ncompiler (e.g., [gfortran](https://gcc.gnu.org/fortran/)), and\n[F2PY](https://numpy.org/doc/stable/f2py/) (provided by\n[NumPy](https://numpy.org/)).\nDownload and decompress the [source code package](https://www.pdfo.net/docs.html#download),\nor clone it from [GitHub](https://github.com/pdfo/pdfo) or [Gitee](https://gitee.com/pdfo/pdfo).\nYou will obtain a folder containing `pyproject.toml`; in a command shell,\nchange your directory to this folder; then install PDFO by executing\n\n```bash\npip install .\n```\n\n### Usage\n\nPDFO provides a Python function `pdfo`, which can solve general constrained or unconstrained optimization problems without using derivatives.\n\nThe `pdfo` function can automatically identify the type of your problem and then call one of Powell’s solvers, namely COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA.\nThe user can also specify the solver by setting the `method` field of the options passed to `pdfo`.\n\nThe `pdfo` function is designed to be compatible with the [scipy.optimize.minimize](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize) function of [SciPy](https://scipy.org/). You can call pdfo in exactly the same way as calling [scipy.optimize.minimize](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize) except that `pdfo` does not accept derivative arguments.\n\nFor the detailed syntax of `pdfo`, use the standard `help` command\nof Python:\n\n```python\nfrom pdfo import pdfo\nhelp(pdfo)\n```\n\n### Uninstall\n\nPDFO can be uninstalled by executing the following command in a command shell:\n\n```bash\npython3 -m pip uninstall pdfo\n```\n\n## MATLAB version of PDFO\n\n### Prerequisites\n\nPDFO supports MATLAB R2014a and later releases. To use PDFO, you need first\nset up the [MEX](https://www.mathworks.com/help/matlab/ref/mex.html) of your\nMATLAB so that it can compile Fortran.\n**The setup of MEX is a pure MATLAB usage problem and it has nothing to do with PDFO.**\n\nTo see whether your MEX is ready, run the following code in MATLAB:\n\n```matlab\nmex('-setup', '-v', 'fortran'); mex('-v', fullfile(matlabroot, 'extern', 'examples', 'refbook', 'timestwo.F'));\n```\n\nIf this completes successfully, then your MEX is ready. Otherwise, it is not, and\nyou may try the [`setup_mex` package](https://github.com/equipez/setup_mex) at\n```\nhttps://github.com/equipez/setup_mex\n```\nIt will help you to set MEX up on Windows or macOS (the setup of MEX is trivial on Linux).\nIn case `setup_mex` does not work, you need to consult a local MATLAB expert or the technical support of\nMathWorks about \"[how to set up MEX](https://www.mathworks.com/help/matlab/ref/mex.html)\", which is\n**not** part of PDFO.\n\n### Installation\n\nDownload and decompress the [source code package](https://www.pdfo.net/docs.html#download),\nor clone it from [GitHub](https://github.com/pdfo/pdfo) or [Gitee](https://gitee.com/pdfo/pdfo).\nYou will obtain a folder containing `setup.m`. Place this folder at the location\nwhere you  want PDFO to be installed. In MATLAB, change the directory to this\nfolder, and execute the following command:\n\n```matlab\nsetup\n```\n\nIf this command runs successfully, PDFO is installed. You may execute the\nfollowing command in MATLAB to verify the installation:\n\n```matlab\ntestpdfo\n```\n\n### Usage\n\nPDFO provides a MATLAB function `pdfo`, which can solve general constrained or unconstrained optimization problems without using derivatives.\n\nThe `pdfo` function can automatically identify the type of your problem and then call one of Powell’s solvers, namely COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA.\nThe user can also specify the solver by setting the `solver` field of the options passed to `pdfo`.\n\nThe `pdfo` function is designed to be compatible with the `fmincon` function available in the [Optimization Toolbox](https://www.mathworks.com/products/optimization.html) of MATLAB.\nYou can call `pdfo` in the same way as calling `fmincon`. In addition, `pdfo` can be called in some flexible ways that are not supported by `fmincon`.\n\nFor detailed syntax of `pdfo`, use the standard `help` command\nof MATLAB:\n\n```matlab\nhelp pdfo\n```\n\n\n### Uninstall\n\nPDFO can be uninstalled using the setup.m script by executing the following\ncommand in MATLAB:\n\n```matlab\nsetup uninstall\n```\n\n## Citing PDFO\n\nIf you use PDFO, please cite the following paper. Note that PDFO contains improvements and bug fixes that do not exist in Powell's original code. See Subsections 4.3--4.5 of the paper for details. \n\n[1] T. M. Ragonneau and Z. Zhang, [PDFO: a cross-platform package for Powell's derivative-free optimization solvers](https://arxiv.org/pdf/2302.13246.pdf), arXiv:2302.13246, 2023.\n```bibtex\n@misc{Ragonneau_Zhang_2023,\n    title        = {{PDFO}: a cross-platform package for {Powell}'s derivative-free optimization solvers},\n    author       = {Ragonneau, T. M. and Zhang, Z.},\n    howpublished = {arXiv:2302.13246},\n    year         = 2023\n}\n```\n\nIn addition, Powell’s methods can be cited as follows.\n\n[2] M. J. D. Powell. A direct search optimization method that models the objective and constraint functions by linear interpolation. In S. Gomez and J. P. Hennart, editors, *Advances in Optimization and Numerical Analysis*, pages 51–67, Dordrecht, NL, 1994. Springer.\n\n[3] M. J. D. Powell. UOBYQA: unconstrained optimization by quadratic approximation. *Math. Program.*, 92:555–582, 2002.\n\n[4] M. J. D. Powell. The NEWUOA software for unconstrained optimization without derivatives. In G. Di Pillo and M. Roma, editors, *Large-Scale Nonlinear Optimization*, volume 83 of *Nonconvex Optimization and Its Applications*, pages 255–297, Boston, MA, USA, 2006. Springer.\n\n[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, University of Cambridge, Cambridge, UK, 2009.\n\n**Remark:** 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.\n\n## Acknowledgments\n\nPDFO is dedicated to the memory of the late Professor [Powell](https://www.zhangzk.net/powell.html)\nwith gratitude for his inspiration and for the treasures he left to us.\n\nWe are grateful to Professor [Ya-xiang Yuan](http://lsec.cc.ac.cn/~yyx/) for his\neverlasting encouragement and support.\n\nThe development of PDFO is a long-term project, which would not be sustainable without the continued\nfunds from the [Hong Kong Research Grants Council](https://www.ugc.edu.hk/eng/rgc)\n(ref. PolyU 253012/17P, PolyU 153054/20P, and PolyU 153066/21P),\nthe [Hong Kong Ph.D. Fellowship Scheme](https://cerg1.ugc.edu.hk/hkpfs) (ref. PF18-24698),\nand the [Hong Kong Polytechnic University](https://www.polyu.edu.hk) (PolyU),\nin particular the [Department of Applied Mathematics](https://www.polyu.edu.hk/ama) (AMA).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdfo%2Fpdfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdfo%2Fpdfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdfo%2Fpdfo/lists"}