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

Precision loss in conversion between Taylor model and zonotope of low order #654

Closed
schillic opened this issue Jul 19, 2022 · 1 comment · Fixed by #655
Closed

Precision loss in conversion between Taylor model and zonotope of low order #654

schillic opened this issue Jul 19, 2022 · 1 comment · Fixed by #655
Assignees
Labels
bug Something isn't working

Comments

@schillic
Copy link
Member

using ReachabilityAnalysis, Plots
Z = Zonotope([0.0, 0], [1.0; 2;;])
TM = overapproximate(Z, TaylorModelReachSet)
Z2 = overapproximate(TM, Zonotope)

julia> Z
Zonotope{Float64, Vector{Float64}, Matrix{Float64}}([0.0, 0.0], [1.0; 2.0;;])

julia> Z2.X
Zonotope{Float64, Vector{Float64}, Matrix{Float64}}([0.0, 0.0], [1.0 1.0; 2.0 2.0])

plot(Z2.X, ls=:dash, lc=:red)
plot!(Z, lc=:blue, lw=2)

example

This is probably the cause of #623.

@schillic schillic added the bug Something isn't working label Jul 19, 2022
@schillic
Copy link
Member Author

The problem is that the conversion from zonotope to Taylor model assumes that the order is at least 1.

# for each variable i = 1, .., n, compute the linear polynomial that covers
# the line segment corresponding to the i-th edge of Z
@inbounds for i in 1:n
pi = c[i] + sum(view(G, i, :) .* x)
vTM[i] = TaylorModel1(Taylor1(pi, orderT), zeroI, zeroI, Δtn)
end

@schillic schillic self-assigned this Jul 19, 2022
mforets added a commit that referenced this issue Jul 25, 2022
#654 - Fix zonotope->TM conversion for low order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant