Callbacks on EnsembleProblem rather then on ODEProblem within Ensemble


I have an EnsembleProblem, or at least I want to model a system of equations with that. I want the ensemble member’s parameters to modify based on the solutions of some ensemble members every
N timesteps. It is like a discretized coupling of subsets of the members, based on some conditions of their state (which members are coupled is a priory NOT known).
I hoped to model this with Discrete callbacks of an EnsembleProblem but the callbacks seem to act on each member independently. But the callbacks would have to communicate. I would need the “integrator” in the callback options to be the EnsembleProblem rather than a member of the ensemble. As far as I understand this is not possible because each member is solved independently and there is not necessarily a common timestepping. That might be the same reason why init(EnsembleProblem, … ) is also not defined?

The alternative is of course to write all ensemble members in one system, which might be substantially slower since my system will be large O(7e3), or more.

Maybe someone has advice on how to approach this?