Additional inputs(model_paramters) for S-function solver

Hi,

I would to add additional inputs to S-function like dynamical model parameters. During the runtime itself, I would like to change the dynamic model parameters. for example, for the current time step, I would like to keep my model_parameter constant for the whole time horizon and during the next time step(after moving to next state) I would like to change the model-paramters before the evaluation.

Any help is appreciated.

Hi,
you might want to check this example. Note that the OCP and solver creation is still based on the old interface, the simulink part hasn’t changed though.

Hope this is helpful!
Katrin

Hi,

Before generating a S-function. Using the Matlab code, I want to change the parameters of the plant model after every iteration. Can acados help me do that in the loop?

Hi,

you can change the parameters of the plant as shown in this example by putting the ocp.solver.set(...) command inside the simulation loop.

Kind regards,
Josip