File Exchange

image thumbnail

PDFO (Powell's Derivative-Free Optimization solvers)

version 1.0 (624 KB) by Zaikun Zhang
Interfaces by Tom. M. Ragonneau and Zaikun Zhang for using late Professor M. J. D. Powell's derivative-free optimization solvers.


Updated 10 Jun 2020

GitHub view license on GitHub

(More information is available at the homepage of PDFO: ; in case of questions or requests, send an email to tom.ragonneau[at] and zaikun.zhang[at]

PDFO (Powell's Derivative-Free Optimization solvers) is a cross-platform package providing interfaces for using late Professor M. J. D. Powell's derivative-free optimization solvers, including UOBYQA, NEWUOA, BOBYQA, LINCOA, and COBYLA, which were originally implemented in Fortran 77.

PDFO provides the following MATLAB functions: pdfo, uobyqa, newuoa, bobyqa, lincoa, and cobyla. The pdfo function can automatically identify the type of your problem and then call one of Powell's Fortran solvers. The other five functions call the solver indicated by their names. It is highly recommended to use pdfo instead of uobyqa, newuoa, etc.

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:

x = pdfo(fun, x0)
x = pdfo(fun, x0, A, b)
x = pdfo(fun, x0, A, b, Aeq, beq)
x = pdfo(fun, x0, A, b, Aeq, beq, lb, ub)
x = pdfo(fun, x0, A, b, Aeq, beq, lb, ub, nonlcon)
x = pdfo(fun, x0, A, b, Aeq, beq, lb, ub, nonlcon, options)
x = pdfo(problem) % PROBLEM is a structure defining the optimization problem
[x, fval] = pdfo(___)
[x, fval, exitflag, output] = pdfo(___)

In addition, pdfo can be called in some flexible ways that are not supported by fmincon. If your problem can be solved by fmincon without specifying the derivatives, then it can probably be better solved by pdfo; if your problem cannot be solved by fmincon, then try pdfo.

Professor Powell ( devised these derivative-free optimization solvers to tackle general nonlinear optimization problems of continuous variables with or without constraints using only function values but not derivatives of the objective function or nonlinear constraint functions. In practice, such functions are often black boxes defined by simulations. Consequently, the corresponding optimization problems are often categorized as black-box optimization or simulation-based optimization. Problem specified by explicit formulas can probably be handled by other methods more efficiently. UOBYQA and NEWUOA can solve unconstrained problems, NEWUOA being preferable except for rather small problems; BOBYQA can solve unconstrained and bound-constrained problems; LINCOA can solve unconstrained, bound-constrained, and linearly constrained problems; COBYLA, which is not recommended unless nonlinear constraints are present, can solve general nonlinear optimization problems. See the Decision Tree for Optimization Software for more information.

The current version of PDFO supports MATLAB and Python. It relies on MEX for MATLAB and F2PY for Python to compile the Fortran solvers and wrap them into user-friendly functions.

Based on Professor Powell's Fortran code, PDFO is developed by Tom M. Ragonneau and Zaikun Zhang at the Department of Applied Mathematics, the Hong Kong Polytechnic University.

For more information, see the homepage of PDFO: .

PDFO is dedicated to late Professor M. J. D. Powell FRS (1936--2015).

Cite As

T. M. Ragonneau and Z. Zhang, PDFO: Cross-Platform Interfaces for Powell's Derivative-Free Optimization Solvers (Version 1.0), available at, doi:10.5281/zenodo.3887569, 2020

Comments and Ratings (4)

Zaikun Zhang

Hello @Yu Liu and everyone, if you have difficulty in configuring MEX on Windows, here are two possible solutions.

1. We can provide compiled MEX files for 64-bit Windows at request. Send an email to tom.ragonneau[at] and zaikun.zhang[at] However, they may or may not work on other computers (we have had both successful and unsuccessful experiences), since MEX files are machine-dependent and system-dependent --- we will be much grateful if anyone can teach us how to make them independent.

2. The Intel Fortran compiler (ifort), which is required by MathWorks to compile Fortran, offers a 30-day free trial. This is enough for compiling PDFO. If you are a student or professor, you can also apply for a free education license.

Hope this helps. Thank you!

Yu Liu

No free fortran compiler , could you upload a compiled one for windows 64bit, thank you

Zaikun Zhang

Late Professor Powell passed away five years ago on April 19, 2015. During his final days, he asked Professor Nick Gould ( and me to maintain his solvers. PDFO is dedicated to Professor Powell with gratitude for his inspiration and the treasures he left to us.



See release notes for this release on GitHub:

MATLAB Release Compatibility
Created with R2020a
Compatible with R2014a to any release
Platform Compatibility
Windows macOS Linux