BOBYQA algorithm

M.J.D. Powell's BOBYQA algorithm using a mexfunction created with dlib's C++ implementation
692 Downloads
Aktualisiert 18 Jan 2019

Lizenz anzeigen

This is a gateway function to use M.J.D. Powell's BOBYQA algorithm (Bound Optimization BY Quadratic Approximation) in MATLAB.
The C++ implementation of dlib (http://dlib.net) is compiled into a mex function to evaluate a MATLAB objective function.

The algorithm consits of four parts:

* The "bobyqa.m" MATLAB file contains the documentation, sets default values and calls the mex function (in .zip file).
* The "bobyqasub.m" MATLAB file is called by the mex function to evaluate the objective function which is MATLAB code (in .zip file).
* The "bobyqa_alg.cpp" file contains the C++ source code to create the mex function (in .zip file).
* The dlib source code containing the BOBYQA algorithm (download latest release at http://sourceforge.net/projects/dclib/files/latest/download).

The folder "/dlib-XX.YY" (XX.YY is your dlib version, e.g. dlib-19.16 for version 19.16) and the three files have to be copied into the same directory.

Run

bobyqa()

to display individual information on how to compile the mex function.
Further information as well as an example can be found inside the "bobyqa.m" file.

I have recieved several complaints that the first version of this was not working for some people (see comments). I cannot reproduce the described problems on my computer. If you encounter problems, please check your compiler settings (I used the MinGW-Add-On). If the problems persist, contact me and I will try to assist you in resolving your issues (might take a bit of time).

Comment: An analogous gateway function can probably be set up for the other C++ implementations if you find a good library.

Zitieren als

Ulrich Römer (2024). BOBYQA algorithm (https://www.mathworks.com/matlabcentral/fileexchange/48689-bobyqa-algorithm), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2014a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Call C++ from MATLAB finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
2.0.0.0

Modified the source code structure and added comments to make it easier to understand.
Tested on two different (Windows 10) PCs with dlib-19.16, Matlab R2017b/R2018b and the default MinGW64 Compiler (C++).

1.0.0.0