LazySets.jl icon indicating copy to clipboard operation
LazySets.jl copied to clipboard

#2245 - Add constrained dimensions of a line

Open mforets opened this issue 5 years ago • 2 comments

Closes https://github.com/JuliaReach/LazySets.jl/issues/2245.


Adding #2245 as i had done it already. Here the interpretation of a "constrained dimension" is that the set is bounded along the i-the dimension, otherwise it is "unconstrained". In fact, as discussed in #2245, for half-spaces the interpretation is the same.

On the other hand, one can't blindly apply the constrained_dimensions to the BFPSV19 algorithm implemented in Reachability.jl (not yet available in RA) because it requires equality with the projection of the set along the constrained dimensions, times the cartesian prod with the universal set in the unconstrained dimensions.. using a line, one only gets an overapproximation.

mforets avatar Jul 25 '20 01:07 mforets

In fact, as discussed in #2245, for half-spaces the interpretation is the same.

julia> L = Line(ones(3), [1., 0., 1.]);

julia> constrained_dimensions(L)  # implementation in master
3-element Array{Int64,1}:
 1
 2
 3

julia> function constrained_dimensions2(L::Line)  # implementation proposed here
           return findall(LazySets.isapproxzero, L.d)
       end

julia> constrained_dimensions2(L)
1-element Array{Int64,1}:
 2

The definition in master returns those dimensions i such that at least one constraint is nonzero in dimension i.

julia> constraints_list(L)
4-element Array{HalfSpace{Float64,Array{Float64,1}},1}:
 HalfSpace{Float64,Array{Float64,1}}([0.0, 1.0, 0.0], 1.0)
 HalfSpace{Float64,Array{Float64,1}}([-0.0, -1.0, -0.0], -1.0)
 HalfSpace{Float64,Array{Float64,1}}([-0.7071067811865475, 0.0, 0.7071067811865475], 0.0)
 HalfSpace{Float64,Array{Float64,1}}([0.7071067811865475, -0.0, -0.7071067811865475], -0.0)

schillic avatar Jul 26 '20 10:07 schillic

Ideas for names:

-> nonuniversal_dimensions: those dimensions i such that at least one constraint is nonzero in dimension i.

-> bounded_dimensions: the set is bounded along the i-th dimension (meaning that both rho(ei, X) and rho(-ei, X) are bounded).

Examples:

  • x >= 0 in 2D the non-universal dimensions are [1] and the bounded dimensions are [].

mforets avatar Jul 29 '20 14:07 mforets

Closing as stale.

mforets avatar Apr 09 '23 13:04 mforets