Can a callback be triggered at the initial time point (at t=0)

I am using the code from advanced_simulations - (the one using CallbackSets) and just modified the time to include t=0.0.

ps_cb_1 = PresetTimeCallback([3.0, 7.0], integ -> integ[:X1] += 5.0)

and added a time zero

ps_cb_1 = PresetTimeCallback([0.0, 3.0, 7.0], integ -> integ[:X1] += 5.0)

but it does not get triggered at t=0, however adding t=1e-14 works fine.

ps_cb_1 = PresetTimeCallback([1e-14, 3.0, 7.0], integ -> integ[:X1] += 5.0)

Is this the expected behavior ?

I guess at the first time step of the integrator t>0 therefore it would miss t=0.

If so is there an elegant way to trigger the callback at t=0. Of course one can modify the defaults but it is not very pretty.

Many thanks for your input.

I think it might work if you set ps_cb_1 = PresetTimeCallback([0.0, 3.0, 7.0], integ -> integ[:X1] += 5.0, filter_tstops=false)

Thanks for the input - made me look for the docs on PresetTimeCallback.

Unfortunately the callback still does not get triggered at t-0.

From the docs the flag controls whether to filter out tstops beyond the end
of the integration timespan and what I need in the very beginning.