Skip to content

Commit

Permalink
Merge pull request #243 from JuliaReach/mforets/fixes
Browse files Browse the repository at this point in the history
Fix dim for constrained reset map method + overapprox with an HPolytope
  • Loading branch information
mforets authored Jun 25, 2020
2 parents d97d1db + 5288647 commit 18a53ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Flowpipes/setops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,12 @@ end
return c, r
end

# overapproximate a hyperrectangular set with a polytope
function _overapproximate(H::AbstractHyperrectangle, ::Type{<:HPolytope})
P = overapproximate(H, Hyperrectangle)
HPolytope([HalfSpace(Vector(c.a), c.b) for c in constraints_list(H)])
end

# ==================================
# Zonotope splitting methods
# ==================================
Expand Down
3 changes: 3 additions & 0 deletions src/Hybrid/transitions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ _affine_term(m::MathematicalSystems.AffineMap{N, <:LazySet}) where {N} = m.c
_affine_term(m::ConstrainedAffineMap{N, MT, VT, <:AbstractVector}) where {N, MT, VT} = Singleton(m.c)
_affine_term(m::ConstrainedAffineMap{N, MT, VT, <:LazySet}) where {N, MT, VT} = Singleton(m.c)

# TODO see LazySets#2198
LazySets.dim(c::ConstrainedResetMap) = c.dim

function _state_matrix(m::Union{<:MathematicalSystems.ResetMap{N},
<:MathematicalSystems.ConstrainedResetMap{N}}) where {N}
n = dim(m)
Expand Down

0 comments on commit 18a53ae

Please sign in to comment.