ModelingToolkit.jl periodic callbacks -- discrete controllers and model transitions from events

How would one use the ModelingToolkit to model a physical system but interface it to a discrete controller? I don’t see this in any of the examples? (But maybe I’m not looking in the right spot.) Is it just a callback on the ODEProblem solver? Is there an example on how to find the right states to tie to inputs and outputs of the controller once it has been mashed together into an ODESystem.

Could you also switch models (equations) based on events like they did for the ODESolvers in the Julia Trebuche example?

This package seems really exciting if it could do those kinds of things.

2 Likes

It just hasn’t been setup yet but it’s going there. You have to grab the varmap to know the ordering.

Thanks Chris. I like the pairing for the parameter and initial condition settings, that’s nice. I didn’t notice that until I worked my own example following that example. I posted another question on manipulating the output of the solver so I didn’t overload this thread.