How can I determine which callback is happening?

Add i,j to the parameters, create a global whichout, and then in the affect! do whichout[integrator.p[#], integrator.p[#]] = idx where the # corresponds to the (i,j).

1 Like