Bug introduced in 10.3 or earlier and persisting through 10.3.1 or later
Given:
E1 = x''[t] + x[t];
E2 = y'[t] + y[t];
E3 = (1 - DownYP[t]) Fpx[t] + DownYP[t] (Fpx[t] - .1 Sign[x'[t]]);
E4 = (1 - DownYF[t]) Ffy[t] + DownYF[t] (Ffy[t] - 20);
Events are detected:
ssol1 = NDSolve[{E1 == 0, E3 == 0,
x[0] == .1, x'[0] == 1,
DownYP[0] == 1,
WhenEvent[x[t] == .4, Print[t]]},{x, Fpx}, {t, 0, 2}, DiscreteVariables -> {DownYP[t]}];
ssol2 = NDSolve[{E2 == 0, E4 == 0,
y[0] == .1,
DownYF[0] == 0,
WhenEvent[y[t] == .04, Print[t]]},{y, Ffy}, {t, 0, 2}, DiscreteVariables -> {DownYF[t]}];
Events are not detected:
ssol3 = NDSolve[{E1 == 0, E2 == 0, E3 == 0, E4 == 0,
x[0] == .1, x'[0] == 1,
y[0] == .1,
DownYP[0] == 1,
DownYF[0] == 0,
WhenEvent[y[t] == .04, Print[t]],
WhenEvent[x[t] == .4, Print[t]]},{x, y, Fpx, Ffy}, {t, 0, 2.2}, DiscreteVariables -> {DownYP[t], DownYF[t]}];
Used to work in previous versions, but fails in 10.3 and 10.3.1. Any ideas, fixes? Thanks!