Closed Kolaru closed 4 years ago
Ouch. Not sure what's going on there.
Isn't it the fact that the solutions are not isolated? That is, there are infinitely many solutions (xx[1] = - xx[2]).
To me it looks like the problem is that the Jacobian is always singular (it is the constant [1, 1; 1, 1]
), so the operation J \ f(m)
in the Newton contractor always return an empty interval box. It should return the entire
interval box however since we always have f(m) = [x, x]
for some x
, and thus the equation J*x = f(m)
has infinitely many solutions.
Also I noticed the (possibly related) fact that the \
function of StaticArrays
is considered more specific that the one defined in lin_eq.jl
, so the latter is actually never used. This is probably due to the fact the StaticArrays
method is parametrized over the matrix dimension.
The Krawczyk method avoid the problem by using the inv
method to get the inverse of the Jacobian on a point (and not an interval) which gives [Inf -Inf; -Inf Inf]
but no error (note that the inv
function used is the one from StaticArrays
here too, which makes sense since there is no interval involved in the Jacobian here).
This seems to be fixed now.
Or rather, Newton now "works" and returns a huge list of intervals around the diagonal. But Krawczyk now hangs.
Now fixed.
While exploring #100, I found that Newton fails in the dummy example presented there:
There are obvious solution in that interval box though, (0, 0) for example.