Change solver parameters


I am using the matlab interface.

In this software, once I have generated the c code of the solver, if I want to change parameters such as the weight matrices or the prediction horizon in order to tune the MPC, do I have to change it from the high-level interface and generate c code again?

I think It would take a long time to tune the controller if every time I change something I have to re-regenerate c code.

Thanks in advance!!!

Hi @Antonio,

in Matlab, you can interact with the template based OCP solver, just like you can with the native one.
I.e. using the .set, .get routines.
A lot can be changed after generating the code and creating the solver. For the setter, see e.g. here:

However, some things (mainly dimensions and the choice of modules) cannot be changed after the creation of the solver, since they are needed in the memory allocation process.