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

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.2
File Size Uploaded
pdfo-2.0.2.tar.gz 484.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pdfo 2.0.2
File
pdfo-2.0.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pdfo-2.0.2-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.2-cp312-cp312-macosx_10_9_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.9+ x86-64 Details
pdfo-2.0.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pdfo-2.0.2-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.2-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
pdfo-2.0.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pdfo-2.0.2-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.2-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
pdfo-2.0.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
pdfo-2.0.2-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.2-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details
pdfo-2.0.2-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
pdfo-2.0.2-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.2-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.2.tar.gz

Download URL pdfo-2.0.2.tar.gz
Size 484.4 kB
Tags Source
SHA-256 checksum
How to use checksums
03c52c6e24d2c89eba0cb0308a7c9718598a0d56f8ae3be02119eab9dbe7c01c
BLAKE2b-256 checksum
How to use checksums
465956560cbfa7ae7e02c35565719ebe82e57801b7f19c86829104c16bdab53d
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.2-cp312-cp312-win_amd64.whl

Download URL pdfo-2.0.2-cp312-cp312-win_amd64.whl
Size 2.4 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
be7558f4ecafd2875d5afdcc516e2c598b7da9f146e47b6c0ff27700de62ee60
BLAKE2b-256 checksum
How to use checksums
a9b8935e83b665dd104d1d59ebf5c8ee6aecec5751c6db669b4407f63bcc8b4a
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.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.2-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
6bfee361b60e72ecca0d7001e1cc1bce358c6e18f6dfea5cc3b4be12b554e5d6
BLAKE2b-256 checksum
How to use checksums
0bae3c20f981d70f97f0978216f8ad6f7c890535b4fa543cf2d0f08e30fdae1b
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.2-cp312-cp312-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.2-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
d854a9112942e394c3043a5e6e74b7b42d710e812d02b6d15493177a56dbe485
BLAKE2b-256 checksum
How to use checksums
66291dad72368d4a93f4443ac93716f34bd1c4e0189d419bafd0407618c5538a
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.2-cp311-cp311-win_amd64.whl

Download URL pdfo-2.0.2-cp311-cp311-win_amd64.whl
Size 2.4 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
6f1c50f109183e4d4b8a77c99c3448bdb9f60a9c998f87838e0956c8710e5502
BLAKE2b-256 checksum
How to use checksums
075d2bb3282cb61f6dd7f7e4f4e8d74c8c5267d2abb9588b8613a5489c5b3da8
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.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.2-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
70c02fda91cecc4d95d59c5696d76c72e668390e86191e0d1b2961459610b364
BLAKE2b-256 checksum
How to use checksums
c3fb243838ccfce2e7ef455cf2bb28ee00eca71da37c3d5ec2d68f51361ffad7
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.2-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.2-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
9ded25222d62afe5ee034c4737a866d2df7772afdcfe0c6313775d95c189c753
BLAKE2b-256 checksum
How to use checksums
e91f4e442881d9297812bbc2f83bd99e7c1106141d50ae1e1ba714b06484a2c2
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.2-cp310-cp310-win_amd64.whl

Download URL pdfo-2.0.2-cp310-cp310-win_amd64.whl
Size 2.4 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
2d9ccc668bfc177736103bb91c8f8be93039ea3e755040eacb01fcc42ce2365d
BLAKE2b-256 checksum
How to use checksums
4e54f8f8b9d582e525efb7db5b6c0fb8ed30777dea5feac9b6209327c3ade760
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.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.2-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
054ea4e81f496333947b743f31bfd0d1652add0bece2f8e4cc246c919706b0ee
BLAKE2b-256 checksum
How to use checksums
c67e44453ad568934c3a07e2ad3fb1afb4dc1a6bda02c0d294c8bd36e1002f66
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.2-cp310-cp310-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.2-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
7a4ecd53d9323ee594a0cd19e1372747500e6d84c3b6a3cdf1af204b7e75f44c
BLAKE2b-256 checksum
How to use checksums
cf803f88daa2cfb8c138ac52005a6a5123ead06565335d74a173f02084b77471
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.2-cp39-cp39-win_amd64.whl

Download URL pdfo-2.0.2-cp39-cp39-win_amd64.whl
Size 2.4 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
1b8ed7a89dc4f33b4864dd645e0e6a64172ed2b4e999055fbbdf7a7f883b7db7
BLAKE2b-256 checksum
How to use checksums
14a8b0b1594e22704f7ba0ad19625cee62fe5aec1e9647ae10bea476f3662274
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.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.2-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
8a3cebb7b2187ffd6efb5bd2b854cb2a1f94624770c889c1040c2f03a41cd887
BLAKE2b-256 checksum
How to use checksums
916ac621f727f21853b3d4070dc2a46ea5fbff05f9793e4a98512baa5e3f1bd6
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.2-cp39-cp39-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.2-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
d9acc8919c09fd4382b61bbc7652146f93c85cb439adbe84d1b151468530ab19
BLAKE2b-256 checksum
How to use checksums
25fd2e83b4db8e29277f2368cb4f0a461552a6d02986b0dd275bb3d3b479a25a
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.2-cp38-cp38-win_amd64.whl

Download URL pdfo-2.0.2-cp38-cp38-win_amd64.whl
Size 2.4 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
53454ce7469f2a3eacf6c46ade1e357d59d7164a1609180f22a9014726663df6
BLAKE2b-256 checksum
How to use checksums
01341fc5a0fb058ac1b42c3f71d3533aa21410335ceb5d6c999ac5df37878339
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.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pdfo-2.0.2-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
4e67eabac081ac3ea71139eedc5fe145ce108f380adfbd0bb87a9df5fc6daa66
BLAKE2b-256 checksum
How to use checksums
81e34ae8d2b3d3f3ff13c1c537961c9f0c76c83f124dfa72d82d128464437e83
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.2-cp38-cp38-macosx_10_9_x86_64.whl

Download URL pdfo-2.0.2-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
09dc4a4a78da342e727392c57bdf18211b376e9c2bd29490c174aa7cb436c6a9
BLAKE2b-256 checksum
How to use checksums
d3761fd666d96aa4116bc4bc154abbb6033a8f3e0ae2e263e53e25bb808644d6
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.2 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