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

#1352 - Disambiguation for lazy intersection of polyhedra #1354

Merged
merged 5 commits into from
Aug 23, 2019

Conversation

mforets
Copy link
Member

@mforets mforets commented May 8, 2019

Closes #1352.

Marking this as WIP since i consider it still under discussion.

Copy link
Member

@schillic schillic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point about unboundedness, but as you said here we already have this issue in the other methods because we cannot statically detect boundedness of general LazySets.
The only alternative I see is to manually wrap the constraints in an HPolytope, thereby expressing boundedness. The user has to deal with the case that the intersection is unbounded either way.
So from a usability point of view I would say we can add your disambiguation.

src/Approximations/overapproximate.jl Outdated Show resolved Hide resolved
@schillic
Copy link
Member

Maybe we should assert boundedness of X in overapproximate_cap_helper (compare to #1517) or change the return type of Q accordingly.

function overapproximate_cap_helper(X::LazySet{N}, # compact set
P::AbstractPolyhedron{N}, # polyhedron
dir::AbstractDirections{N};
kwargs...
) where {N<:Real}
Hi = constraints_list(P)
m = length(Hi)
Q = HPolytope{N}()
for di in dir
ρ_X_Hi_min = ρ(di, X Hi[1], kwargs...)
for i in 2:m
ρ_X_Hi = ρ(di, X Hi[i], kwargs...)
if ρ_X_Hi < ρ_X_Hi_min
ρ_X_Hi_min = ρ_X_Hi
end
end
addconstraint!(Q, HalfSpace(di, ρ_X_Hi_min))
end
return Q
end

@schillic schillic changed the title WIP #1352 - Disambiguation for lazy intersection of polyhedra #1352 - Disambiguation for lazy intersection of polyhedra Aug 19, 2019
Copy link
Member

@schillic schillic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the remaining ambiguities.

@schillic schillic merged commit 9fc3571 into master Aug 23, 2019
@schillic schillic deleted the mforets/1352 branch August 23, 2019 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MethodError in overapproximation of lazy intersections of polyhedra
2 participants