2
$\begingroup$

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!

$\endgroup$
1
$\begingroup$

It seems that this is a bug in Mathematica 10.3.xx. I hope it will be fixed in future versions.

$\endgroup$
  • 1
    $\begingroup$ Did you report it to WR? Did you get any confirmation? $\endgroup$ – Karsten 7. Jan 8 '16 at 20:57
  • 1
    $\begingroup$ Yes I did. I was advised to downgrade and run version 10.2. $\endgroup$ – user11311 Jan 9 '16 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.