Dear All,
I have implemented a MPC with a MILP and want to use an open source solver like CBC or GLPK.
I know that both solvers, in the opti-toolbox, have a .mex file which I can call in the Matlab console.
Additionally I can export my Yalmip model and call the mex function of CBC or GLPK to solve my optimization problem.
Now I want to load my exported Yalmip model into Simulink and call the solver as an S-function in Simulink.
Is there a simple way to convert the mex-file of the solver to an S-function?
Does anyone of you have made experiences with this approach?
In the end, I want to generate code from the simulink model, to use it on an embedded system.
Thank you for any help!