# DiffEqs: Hybrid (continuous+discrete) system / periodic callback

**URL:** <https://discourse.julialang.org/t/diffeqs-hybrid-continuous-discrete-system-periodic-callback/23791>\
**Category:** Modelling & Simulations\
**Tags:** diffeq\
**Created:** [May 2, 2019, 7:35pm UTC](https://discourse.julialang.org/t/diffeqs-hybrid-continuous-discrete-system-periodic-callback/23791 "2019-05-02T19:35:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [May 2, 2019, 7:40pm UTC](https://discourse.julialang.org/t/diffeqs-hybrid-continuous-discrete-system-periodic-callback/23791/2 "2019-05-02T19:40:54Z")

</div>

> [@asprionj](#):
>
> What would be a good way to implement this? Basically, it would have to be something like `tstops` every second, but then pause the solver and let the discrete function (the controller algorithm) execute and change parameters and/or some state variables with zero autonomous dynamics. Is a `DiscreteCallback` the way to go?

Yup, `tstops` + `DiscreteCallback` is a good way to do it. Or just use the `integrator` interface.

---

_[View the full topic](https://discourse.julialang.org/t/diffeqs-hybrid-continuous-discrete-system-periodic-callback/23791)._
