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

vertices_list for AbstractHPolygon with infeasible constraints is incorrect #918

Closed
schillic opened this issue Nov 16, 2018 · 0 comments
Closed
Assignees
Labels
bug 🐛 Something isn't working

Comments

@schillic
Copy link
Member

vertices_list does not work correctly if the constraints are infeasible.
The result should be an empty list, but it is not.

julia> P = HPolygon([
    HalfSpace([1.0, 1.0], 0.0),
    HalfSpace([-1.0, 0.0], -1.0),
    HalfSpace([0.0, -1.0], -1.0)]);

julia> vertices_list(P)
3-element Array{Array{Float64,1},1}:
 [1.0, -1.0]
 [1.0, 1.0] 
 [-1.0, 1.0]

The reason is that we take the intersection of lines without caring for the direction of the normal vector.
This has serious consequences because the emptiness check relies on it.

@schillic schillic added the bug 🐛 Something isn't working label Nov 16, 2018
@schillic schillic self-assigned this Nov 16, 2018
schillic added a commit that referenced this issue Nov 17, 2018
#918 - vertices_list for AbstractHPolygon with infeasible constraints is incorrect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant