Skip to content

Commit 8fe5986

Browse files
authored
Merge pull request #754 from JuliaReach/schillic/ASB07_zonotope
Concretely type zonotopes in ASB07
2 parents 8fdb982 + c6f3641 commit 8fe5986

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/ReachSets/ContinuousPost/ASB07/post.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,19 @@ function post(𝒜::ASB07,
1414
order=𝑂[:order_discretization],
1515
set_operations=𝑂[:set_operations_discretization])
1616
Ω0, Φ = 𝑃_discrete.x0, 𝑃_discrete.s.A
17+
if ! (genmat(Ω0) isa Matrix)
18+
Ω0 = Zonotope(center(Ω0), Matrix(genmat(Ω0)))
19+
end
1720

1821
# ====================
1922
# Flowpipe computation
2023
# ====================
2124

2225
# preallocate output
23-
T = 𝑂[:set_operations_discretization] == "zonotope" ? Zonotope : LazySet
24-
Rsets = Vector{ReachSet{T{Float64}}}(undef, N)
26+
T = 𝑂[:set_operations_discretization] == "zonotope" ?
27+
Zonotope{Float64, Vector{Float64}, Matrix{Float64}} :
28+
LazySet{Float64}
29+
Rsets = Vector{ReachSet{T}}(undef, N)
2530

2631
max_order = 𝑂[:max_order]
2732

src/ReachSets/ContinuousPost/ASB07/reach.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ function reach_ASB07!(R::Vector{<:ReachSet},
2020
# store reach set
2121
t0 = t1
2222
t1 += δ
23+
if ! (genmat(Rₖ) isa Matrix)
24+
Rₖ = Zonotope(center(Rₖ), Matrix(genmat(Rₖ)))
25+
end
2326
R[k] = ReachSet(Rₖ, t0, t1)
2427

2528
k += 1

0 commit comments

Comments
 (0)