0
Under review

multiple precision for fmincon

Iuliia 3 years ago updated by Pavel Holoborodko 3 years ago 3

Hello,


I would like to ask if you consider including fmincon in the Toolbox in near future. I have a part of Matlab code with optimization of nonlinear constrained function, and it would be very useful for me.


Best regards,

Iuliia

Under review

Dear Iuliia,


Thank you for the question. 

Yes, indeed, fmincon is in our todo list and actually we have beta version of fmincon (not included in toolbox yet). 

What optimization algorithm do you use in fmincon? So far our code supports "trust-region-reflective" and "active-set".


I will send you the code by email in a minute.

Are you actually modifying FMINCON source code, or are you independently creating code to emulate the FMINCON functionality (at least for those FMINCON algorithm options which you support?


If the former, have you encountered algorithm assumptions predicated on all computations being done in DP, such that if they were not identified and addressed, would prevent the MP version of FMINCON from achieving arbitrarily high accuracy, presuming that user-settable algorithm tolerances (e.g., for feasibility and optimality) are set appropriately?  This seems like it might be a non-trivial effort to implement.


Edit: I now see https://mct.userecho.com/forums/1-general/topics/125-mp-linprog-support/ . So, apparently you have to create your own implementation of FMINCON funtionality.  Nonlinear optimization solvers are very complicated, and there are many subtleties and refinements which are usually not documented in papers and books, but can be very significant to performance and robustness. A highly non-trivial undertaking to do well!!

You are absolutely right - this is non-trivial task to do.


However, please let me know what parts of toolbox you find trivial to implement :)?

Full re-implementation of MATLAB's core for matrix computations in arbitrary precision? Or n-dim arrays, sparse matrices, special functions or FFT?  With all optimizations and parallelism in native language....


The main issue is not the implementation difficulty itself, but restrictions and overhead imposed by MATLAB for third-party plugins. For example, MATLAB simply crashes when we call M-function (with nested calls to other M-language functions) from within MEX. This basically prevents direct and efficient implementation of optimization methods in native language (we use C++). Special workarounds are needed - like in ARPACK, or similar.