I have a Simulink model with acados integrated as an s-function. Suppose that my acados solver has a sampling time of 1 second, but I only want to trigger the s-function once every 10 seconds (ideally the trigger event is variable and inferred from Simulink) and apply the controls in an open loop fashion until the solver is triggered again. Is there an option for this or to specify some kind of external trigger when creating the solver?
Thank you for the answer. Indeed I’m currently using a triggered subsystem as you suggested. However, I would like to have the sampling time of the subsystem to be faster than the time step of acados, and as far as I am aware, the triggered subsystem does not allow for that.