Skip to main content

PDFO: Powell's Derivative-Free Optimization solvers

Introduction | Python | MATLAB | Citing PDFO | Acknowledgments

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

GitHub Workflow Status GitHub GitHub release (latest SemVer) PyPI - Downloads View PDFO: Powell's Derivative-Free Optimization solvers on File Exchange

Introduction

PDFO (Powell's Derivative-Free Optimization solvers) is a cross-platform package providing interfaces for using the late Professor M. J. D. Powell's derivative-free optimization solvers, including UOBYQA, NEWUOA, BOBYQA, LINCOA, and COBYLA. See the PDFO homepage and the PDFO paper for more information.

This package makes use of a modified version of Powell's Fortran code. See the folder original under fsrc for Powell's original code.

Python version of PDFO

Installation

To use the Python version of PDFO on Linux, Mac, or Windows, you need Python (version 3.8 or above).

It is highly recommended to install PDFO via PyPI.

Install pip in your system if you Python version does not include it. Then execute

pip install pdfo

in a command shell (e.g., the terminal for Linux and macOS, or the Command Shell for Windows). If your pip launcher is not pip, adapt the command accordingly (it may be pip3 for example). If this command runs successfully, PDFO is installed. You may verify the installation by

python -m unittest pdfo.testpdfo

Once again, if your Python launcher is not python, adapt the command accordingly (it may be python3 for example). If you are an Anaconda user, PDFO is also available through the conda installer ( https://anaconda.org/conda-forge/pdfo ). However, it is not managed by us.

Alternative installation (using source distribution)

Alternatively, although deeply discouraged, PDFO can be installed from the source code. It requires you to install additional Python headers, a Fortran compiler (e.g., gfortran), and F2PY (provided by NumPy). Download and decompress the source code package, or clone it from GitHub or Gitee. You will obtain a folder containing pyproject.toml; in a command shell, change your directory to this folder; then install PDFO by executing

pip install .

Usage

PDFO provides a Python function pdfo, which can solve general constrained or unconstrained optimization problems without using derivatives.

The 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. The user can also specify the solver by setting the method field of the options passed to pdfo.

The pdfo function is designed to be compatible with the scipy.optimize.minimize function of SciPy. You can call pdfo in exactly the same way as calling scipy.optimize.minimize except that pdfo does not accept derivative arguments.

For the detailed syntax of pdfo, use the standard help command of Python:

from pdfo import pdfo
help(pdfo)

Uninstall

PDFO can be uninstalled by executing the following command in a command shell:

python3 -m pip uninstall pdfo

MATLAB version of PDFO

Prerequisites

PDFO supports MATLAB R2014a and later releases. To use PDFO, you need first set up the MEX of your MATLAB so that it can compile Fortran. The setup of MEX is a pure MATLAB usage problem and it has nothing to do with PDFO.

To see whether your MEX is ready, run the following code in MATLAB:

mex('-setup', '-v', 'fortran'); mex('-v', fullfile(matlabroot, 'extern', 'examples', 'refbook', 'timestwo.F'));

If this completes successfully, then your MEX is ready. Otherwise, it is not, and you may try the setup_mex package at

https://github.com/equipez/setup_mex

It will help you to set MEX up on Windows or macOS (the setup of MEX is trivial on Linux). In case setup_mex does not work, you need to consult a local MATLAB expert or the technical support of MathWorks about "how to set up MEX", which is not part of PDFO.

Installation

Download and decompress the source code package, or clone it from GitHub or Gitee. You will obtain a folder containing setup.m. Place this folder at the location where you want PDFO to be installed. In MATLAB, change the directory to this folder, and execute the following command:

setup

If this command runs successfully, PDFO is installed. You may execute the following command in MATLAB to verify the installation:

testpdfo

Usage

PDFO provides a MATLAB function pdfo, which can solve general constrained or unconstrained optimization problems without using derivatives.

The 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. The user can also specify the solver by setting the solver field of the options passed to pdfo.

The pdfo function is designed to be compatible with the fmincon function available in the Optimization Toolbox of MATLAB. You 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.

For detailed syntax of pdfo, use the standard help command of MATLAB:

help pdfo

Uninstall

PDFO can be uninstalled using the setup.m script by executing the following command in MATLAB:

setup uninstall

Citing PDFO

If 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.

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

@misc{Ragonneau_Zhang_2023,
    title        = {{PDFO}: a cross-platform package for {Powell}'s derivative-free optimization solvers},
    author       = {Ragonneau, T. M. and Zhang, Z.},
    howpublished = {arXiv:2302.13246},
    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 S. Gomez and J. P. Hennart, editors, Advances in Optimization and Numerical Analysis, pages 51–67, Dordrecht, NL, 1994. Springer.

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

[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.

[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.

Remark: 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.

Acknowledgments

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

We are grateful to Professor Ya-xiang Yuan for his everlasting encouragement and support.

The development of PDFO is a long-term project, which would not be sustainable without the continued funds from the Hong Kong Research Grants Council (ref. PolyU 253012/17P, PolyU 153054/20P, and PolyU 153066/21P), the Hong Kong Ph.D. Fellowship Scheme (ref. PF18-24698), and the Hong Kong Polytechnic University (PolyU), in particular the Department of Applied Mathematics (AMA).

Metadata

Release files for pdfo 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdfo 2.0.1
File Size Uploaded
pdfo-2.0.1.tar.gz 484.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pdfo 2.0.1
File
pdfo-2.0.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pdfo-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
pdfo-2.0.1-cp312-cp312-macosx_10_9_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.9+ x86-64 Details
pdfo-2.0.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pdfo-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
pdfo-2.0.1-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
pdfo-2.0.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pdfo-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
pdfo-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
pdfo-2.0.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
pdfo-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
pdfo-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details
pdfo-2.0.1-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
pdfo-2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
pdfo-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details

Total release size: 29.2 MB

Release files / pdfo-2.0.1.tar.gz

Download URL pdfo-2.0.1.tar.gz
Size 484.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d5191ce22bfc7033295d6b7d229d3efd1ca6f74dc8fe3c8ff400b08943bd499f
BLAKE2b-256 checksum
How to use checksums
160f7f4111592fb05d769e027e17e465883302f0dae45a5e8bb6cb7b3aaf39c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp312-cp312-win_amd64.whl

Download URL pdfo-2.0.1-cp312-cp312-win_amd64.whl
Size 2.4 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
e3976b0f51477cecdd96e39d3d3a4f45ec957bca3ca569a1fcb8f55071270508
BLAKE2b-256 checksum
How to use checksums
047d55c8b0b6b4997c87b5656f320a1163b38f8f6b5fcc0be4f888fbf7e19b51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f83f959900a58476bee5f46fa107ad20cba55ee4600f7ae790b8eda879d0c2ba
BLAKE2b-256 checksum
How to use checksums
8a5a3baaae8987e8b8a8901842903175857ac3a0db12288e740b44f4de75089d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.1-cp312-cp312-macosx_10_9_x86_64.whl
Size 1.9 MB
Tags CPython 3.12 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
452588a701e0a82ae1f6a60c3707e6a42e189648f69e5fdd753ba72cffa2abbe
BLAKE2b-256 checksum
How to use checksums
0850049b9ec7e49e36c88b56b834484fb789b68f69d3fabd4cd856c3c411bfe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp311-cp311-win_amd64.whl

Download URL pdfo-2.0.1-cp311-cp311-win_amd64.whl
Size 2.4 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b9f200bc01981a9209e6a58bb7bf39597561297e90f5eb91bef3275c1511fcdc
BLAKE2b-256 checksum
How to use checksums
fba4ccea44fd1b6af4729a36ae4432e31139646d0063eafbcb3a85cb2094ee76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e19e16b3fadfc04e5cdd168334539c6404bdbd08754f454d08153bc20a00be04
BLAKE2b-256 checksum
How to use checksums
7721e6ebc80bed9ce207be8775c230429f271953b0b90df49c952028c850bd79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.1-cp311-cp311-macosx_10_9_x86_64.whl
Size 1.8 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
771ba5c0777c54a103c8c942940cad99b01d00c970c11ea2b70cd89e2f874dd0
BLAKE2b-256 checksum
How to use checksums
6bbc38be725473d1bfe22cfad24b92ed6068c07c522eda61e3c3b43991d03c2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp310-cp310-win_amd64.whl

Download URL pdfo-2.0.1-cp310-cp310-win_amd64.whl
Size 2.4 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
80ddf1d4354c1de4aea812b67721d7a5ac7bafe53c18a61d1942725c0b13ff86
BLAKE2b-256 checksum
How to use checksums
45e1d9cbf2e5445650bfd6fa02d20bcb640df8aa44956cf29fecc9bfdc75d742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6cd688b8edaabc4640438e04e25f3eff71a30b11d14c35d09cf99bc65660f561
BLAKE2b-256 checksum
How to use checksums
0ca85454910b8293e7dc42d42e6e91a03fbc3022c1b388f8a6f9d3d0c4ed5d6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl
Size 1.8 MB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
4539df1443ccfae12308732daf72eb37edaa62b7f66c05100f99349912446906
BLAKE2b-256 checksum
How to use checksums
7f8dd6b65f687c27e31769723eb7ec2bea5484ecc4994e8fb21d177c8cc6c3c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp39-cp39-win_amd64.whl

Download URL pdfo-2.0.1-cp39-cp39-win_amd64.whl
Size 2.4 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
9c5fe25f763f684601fa583fca88b4bb5b9351e1f8e480c814326c10212b47d7
BLAKE2b-256 checksum
How to use checksums
57bac3da676040922cb2bf737f01100f23f706f8dc150617cc72b3d9e4837feb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7da75656246573c350004deabd959e2ab4a24a7c70c17702b573ef35fa90bcaf
BLAKE2b-256 checksum
How to use checksums
9110ce98879c05319f1822f8a2d17d91088de853bdfd2a37f3cab27b718c79f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Size 1.8 MB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
e2b36ddaf9793a986ac7c46e378a261d27c54eb13f5e9e8851f4a2cd0da10383
BLAKE2b-256 checksum
How to use checksums
38b87c1b07910cfc010522ddd5269589292a242bd9a8970f67e9d889d341bb22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp38-cp38-win_amd64.whl

Download URL pdfo-2.0.1-cp38-cp38-win_amd64.whl
Size 2.4 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
7250843844adf8de94b7d5e799d5ee2f7e9f8b32c8a6299b0968fbbdd1de9c6f
BLAKE2b-256 checksum
How to use checksums
c69e6a67258da8907a7658056e9095dc82a1ea17eb949f55ea8170f921328d6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
023cb17ff4f652910b2e3a29011acdf207a1bcf36baf2ecd714d873923ec0a5e
BLAKE2b-256 checksum
How to use checksums
ae59efdfb8a86c4ff612c61526d103488ea2c853cbdcdd46d117d7e5b8ab2b4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / pdfo-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl
Size 1.8 MB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
16baff0ea950b943d0c65427326b826a8a399cf9858e11c921c98aacb421cd0b
BLAKE2b-256 checksum
How to use checksums
21eb182f1d1357a034048beb2134b5403e6977729cbcb0e520b33db97eff808b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

2.0.1 This release

16 release files

2.0.0

16 release files

1.3.1

17 release files

1.3

17 release files

1.2

41 release files

1.1

61 release files

1.0

47 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page