MATLAB Answers

Using other solvers for models generated by optimproblem

10 views (last 30 days)
Vahid Mahmoodian
Vahid Mahmoodian on 18 Feb 2019
Commented: Matt J on 19 Feb 2019
I am wondering if there is a way to use other solvers to solve models (problems) built by new optimization toolbox (i.e. optimproblem, optimvar, optimconstr, etc.)? Because if MATLAB uses it's own solvers and needs to struct A, b, and c matrix and vectors, just an output of these parameters will facilitate using all other well-known solvers too.


Sign in to comment.

Accepted Answer

Matt J
Matt J on 19 Feb 2019
Edited: Matt J on 19 Feb 2019
You can use prob2struct to help convert a problem-based description of the linear constraints to the matrices required by other Optimization Toolbox solvers.
However, you cannot use the problem-based framework to solve arbitrary nonlinear optimization problems directly. Also, any problem component requiring a function handle specification, like nonlinear objective functions or constraints in fmincon, must be provided separately by you.


Matt J
Matt J on 19 Feb 2019
This was exactly what I am looking for, and it helps a lot. I knew MATLAB does not let such a useful function go.
Thanks a lot

Sign in to comment.

More Answers (0)