Introduction | Python | MATLAB | Citing PDFO | Acknowledgments
Dedicated to the late Professor M. J. D. Powell FRS (1936–2015).
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.
To use the Python version of PDFO on Linux, Mac, or Windows, you need Python (version 3.7 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
python3 -m pip install pdfo
in a command shell (e.g., the terminal for Linux and macOS, or the Command
Shell for Windows). If your Python 3 launcher is not python3
, adapt the
command accordingly (it may be python
on Windows for example). If this
command runs successfully, PDFO is installed. You may verify the
installation by
python3 -m unittest pdfo.testpdfo
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.
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
python3 -m pip install .
PDFO provides the following Python functions:
pdfo
, uobyqa
, newuoa
, bobyqa
, lincoa
, cobyla
.
The pdfo
function can automatically identify the type of your problem
and call one of Powell's solvers. The
other five functions call the solver indicated by their names. It is highly
recommended using pdfo
instead of uobyqa
, newuoa
, etc.
The pdfo
function is designed to be compatible with the
minimize
function available in scipy.optimize
.
You can call pdfo
in exactly the same way as calling minimize
, without the
derivative arguments (PDFO does not use derivatives).
For the detailed syntax of these functions, use the standard help
command
of Python. For example,
from pdfo import pdfo
help(pdfo)
will tell you how to use pdfo
.
PDFO can be uninstalled by executing the following command in a command shell:
python3 -m pip uninstall pdfo
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.
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
PDFO provides the following MATLAB functions:
pdfo
, uobyqa
, newuoa
, bobyqa
, lincoa
, cobyla
.
The pdfo
function can automatically identify the type of your problem
and then call one of Powell's solvers.
The other five functions call the solver indicated by their names. It is highly
recommended using 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 exactly 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 these functions, use the standard help
command
of MATLAB. For example,
help pdfo
will tell you how to use pdfo
.
PDFO can be uninstalled using the setup.m script by executing the following command in MATLAB:
setup uninstall
@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.
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.
M. J. D. Powell. UOBYQA: unconstrained optimization by quadratic approximation. Math. Program., 92:555–582, 2002.
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.
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.
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).
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.