Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate nondeterministic behavior #486

Closed
schillic opened this issue Aug 6, 2018 · 5 comments
Closed

Investigate nondeterministic behavior #486

schillic opened this issue Aug 6, 2018 · 5 comments
Assignees
Labels
external 📤 Related to external packages

Comments

@schillic
Copy link
Member

schillic commented Aug 6, 2018

julia> em = ExponentialMap(SparseMatrixExp(SparseMatrixCSC([2.0 0.0; 0.0 1.0])),
                           BallInf([1., 1.], 1.));
julia> LazySets.Approximations.box_approximation(em)

This nondeterministically results in either

LazySets.Hyperrectangle{Float64}([7.38906, 2.71828], [7.38906, 2.71828])

or

ERROR: AssertionError: radius must not be negative
@schillic
Copy link
Member Author

schillic commented Aug 6, 2018

Narrowing it down:

julia> em = ExponentialMap(SparseMatrixExp(SparseMatrixCSC([2.0 0.0; 0.0 1.0])),
                           BallInf([1., 1.], 1.));
julia> d = [1., 0.];

julia> σ(d, em)
2-element Array{Float64,1}:
 14.7781 
  5.43656

julia> σ(d, em)
2-element Array{Float64,1}:
 NaN      
   5.43656

@schillic
Copy link
Member Author

schillic commented Aug 6, 2018

The problem is in Expokit.jl.

julia> using Expokit

julia> t = 1.; A = SparseMatrixCSC([2.0 0.0; 0.0 1.0]); vec = [2., 2.];

julia> for i in 1:10
           println(expmv(t, A, vec))
       end
[14.7781, 5.43656]
[14.7781, 5.43656]
[14.7781, 5.43656]
[14.7781, 5.43656]
[14.7781, 5.43656]
[14.7781, 5.43656]
[14.7781, 5.43656]
[NaN, 5.43656]
[14.7781, 5.43656]
[14.7781, 5.43656]

@mforets
Copy link
Member

mforets commented Aug 6, 2018

julia> using Expokit

julia> t = 1.; A = SparseMatrixCSC([2.0 0.0; 0.0 1.0]); v = [2., 2.];

julia> P = [expmv(t, A, v) for i in 1:10^4];

julia> any([isnan(Pi[1]) for Pi in P])
false

@schillic
Copy link
Member Author

schillic commented Aug 6, 2018

In the master branch of Expokit.jl I also cannot reproduce. If you want to try, go back to 6f5b0b6 (git checkout 6f5b0b6).
Should we ask for a new release?

@mforets
Copy link
Member

mforets commented Aug 6, 2018

good! i can ask.

@schillic schillic added the wontfix 🔕 This will not be worked on label Aug 6, 2018
@schillic schillic closed this as completed Aug 6, 2018
@schillic schillic added external 📤 Related to external packages and removed wontfix 🔕 This will not be worked on labels Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external 📤 Related to external packages
Projects
None yet
Development

No branches or pull requests

2 participants