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

isdisjoint is not symmetric/commutative #1039

Closed
schillic opened this issue Jan 20, 2019 · 2 comments
Closed

isdisjoint is not symmetric/commutative #1039

schillic opened this issue Jan 20, 2019 · 2 comments
Labels
duplicate 2️⃣ This issue or pull request already exists

Comments

@schillic
Copy link
Member

P below is a box-shaped polytope. Q below is a flat polyhedron.

julia> p = HPolytope([HalfSpace([1.0, 0.0], 0.308261),
        HalfSpace([-1.0, 0.0], -0.2),
        HalfSpace([0.0, 1.0], 0.1),
        HalfSpace([0.0, -1.0], 0.106045)]);

julia> q = HPolyhedron([
        HalfSpace([-1.0, 0.0], 0.0),
        HalfSpace([-0.714286, -1.0], 0.0),
        HalfSpace([0.714286, 1.0], 0.0)]);

julia> isdisjoint(p, q)
false

julia> isdisjoint(q, p)
true

(outsourced from #1038)

@schillic schillic added the bug 🐛 Something isn't working label Jan 20, 2019
@mforets
Copy link
Member

mforets commented Jan 21, 2019

julia> [is_intersection_empty(q, Hi) for Hi in constraints_list(p)]
4-element Array{Bool,1}:
 false
 false
 false
 false

julia> [is_intersection_empty(p, Hi) for Hi in constraints_list(q)]
3-element Array{Bool,1}:

 false
 false
  true

julia> [-ρ(-Hi.a, q) for Hi in constraints_list(p)]
4-element Array{Float64,1}:
   -0.0
 -Inf
 -Inf
   -0.0

julia> [Hi.b for Hi in constraints_list(p)]
4-element Array{Float64,1}:
  0.308261
 -0.2
  0.1
  0.106045

@mforets
Copy link
Member

mforets commented Jan 21, 2019

possibly related to #902 and to #754 (see last comment)

@schillic schillic added duplicate 2️⃣ This issue or pull request already exists and removed bug 🐛 Something isn't working labels Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate 2️⃣ This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants