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

#2154 - Compute the overapproximation of the convex hull array of zonotopes with a zonotope recursively #2185

Merged
merged 8 commits into from
Jun 23, 2020

Conversation

SebastianGuadalupe
Copy link
Member

Closes #2154.

Copy link
Member

@mforets mforets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. please add a test or two for this new function.

src/Approximations/overapproximate.jl Outdated Show resolved Hide resolved
src/Approximations/overapproximate.jl Outdated Show resolved Hide resolved
@mforets
Copy link
Member

mforets commented Jun 21, 2020

The build in v1.4 passes. The build in v1.0 fails with

LazySets.Approximations.overapproximation: Error During Test at /home/travis/build/JuliaReach/LazySets.jl/test/unit_overapproximate.jl:267
  Test threw exception
  Expression: Z3  Y
  MethodError: no method matching qr(::SparseMatrixCSC{Float32,Int64}, ::Type{Val{true}}; tol=7.510185f-5)
  Closest candidates are:
    qr(::AbstractArray{T,2}, ::Any) where T at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/qr.jl:363 got unsupported keyword argument "tol"
    qr(::SparseMatrixCSC; tol) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/SuiteSparse/src/spqr.jl:201
    qr(::AbstractArray{T,2}) where T at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/qr.jl:369 got unsupported keyword argument "tol"
  Stacktrace:
   [1] #qr#4(::Float32, ::Function, ::SparseMatrixCSC{Float32,Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/SuiteSparse/src/spqr.jl:201
   [2] qr(::SparseMatrixCSC{Float32,Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/SuiteSparse/src/spqr.jl:201
   [3] rank(::SparseMatrixCSC{Float32,Int64}) at /home/travis/build/JuliaReach/LazySets.jl/src/Arrays/matrix_operations.jl:24
   [4] #constraints_list#56(::Bool, ::Function, ::Zonotope{Float32,Array{Float32,1},SparseMatrixCSC{Float32,Int64}}) at /home/travis/build/JuliaReach/LazySets.jl/src/Interfaces/AbstractZonotope.jl:495
   [5] constraints_list at /home/travis/build/JuliaReach/LazySets.jl/src/Interfaces/AbstractZonotope.jl:490 [inlined]
   [6] _issubset_constraints_list(::Zonotope{Float32,Array{Float32,1},Array{Float32,2}}, ::Zonotope{Float32,Array{Float32,1},SparseMatrixCSC{Float32,Int64}}, ::Bool) at /home/travis/build/JuliaReach/LazySets.jl/src/ConcreteOperations/issubset.jl:300
   [7] issubset at /home/travis/build/JuliaReach/LazySets.jl/src/ConcreteOperations/issubset.jl:291 [inlined]
   [8] issubset at /home/travis/build/JuliaReach/LazySets.jl/src/ConcreteOperations/issubset.jl:317 [inlined] (repeats 2 times)
   [9] eval_test(::Expr, ::Expr, ::LineNumberNode) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:229
   [10] top-level scope at /home/travis/build/JuliaReach/LazySets.jl/test/unit_overapproximate.jl:267
   [11] include at ./boot.jl:317 [inlined]
   [12] include_relative(::Module, ::String) at ./loading.jl:1044
   [13] include(::Module, ::String) at ./sysimg.jl:29
   [14] include(::String) at ./client.jl:392
   [15] macro expansion at /home/travis/build/JuliaReach/LazySets.jl/test/runtests.jl:135 [inlined]
   [16] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1083 [inlined]
   [17] macro expansion at /home/travis/build/JuliaReach/LazySets.jl/test/runtests.jl:135 [inlined]
   [18] macro expansion at ./util.jl:156 [inlined]
   [19] top-level scope at /home/travis/build/JuliaReach/LazySets.jl/test/runtests.jl:135 [inlined]
   [20] top-level scope at ./none:0

@schillic
Copy link
Member

The problem is with Float32 and Rational{Int}. Simply move the tests to the loop for N in [Float64] at the end of the file.

@schillic schillic merged commit d16f98b into master Jun 23, 2020
@schillic schillic deleted the sguadalupe/2154 branch June 23, 2020 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compute the overapproximation of the convex hull array of zonotopes with a zonotope recursively
3 participants