ReachabilityAnalysis.jl
ReachabilityAnalysis.jl copied to clipboard
Fixes for intersection heuristics
not urgent, but there is some nonsense with some combinations of options as i'll collect below.
- the idea of
BoxIntersection
is to compute X \cap Y by overapproximating with boxes X and Y (if they are bounded) and also the result. this is cheap but overapproximative. so it should it be used in combination with aggregation strategies.
H = HalfSpace([-1.0, -1.0], -1.0) # y >= -x + 1
B = BallInf([0.0, 1.0], 0.5)
RA._intersection(B, H, BoxIntersection())
MethodError: no method matching _intersection(::BallInf{Float64,Array{Float64,1}}, ::HalfSpace{Float64,Array{Float64,1}}, ::BoxIntersection)
Closest candidates are:
_intersection(!Matched::TaylorModelReachSet, ::LazySet, ::BoxIntersection) at /home/mforets/.julia/dev/ReachabilityAnalysis/src/Flowpipes/setops.jl:823
_intersection(::AbstractPolyhedron, ::AbstractPolyhedron, !Matched::HRepIntersection) at /home/mforets/.julia/dev/ReachabilityAnalysis/src/Flowpipes/setops.jl:868
_intersection(::AbstractPolyhedron, ::AbstractPolyhedron, !Matched::AbstractPolyhedron, !Matched::HRepIntersection) at /home/mforets/.julia/dev/ReachabilityAnalysis/src/Flowpipes/setops.jl:876
...
Stacktrace:
[1] top-level scope at In[44]:3
Notes
- for
HRepIntersection
, the notes should say doesn't use vrep; in other words doesnt need the dual representation - the two strategies for BoxIntersection are not equivalent (example: if box(X) and Y do not intersect, then the second strategy will give you an empty set)
- maybe for the bounded case one option is to do box intersection (which is cheap) and only if it is nonempty do the real intersection and then take a box