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

Bug in function polyhedron #173

Open
ga73kud opened this issue Jun 19, 2019 · 4 comments
Open

Bug in function polyhedron #173

ga73kud opened this issue Jun 19, 2019 · 4 comments

Comments

@ga73kud
Copy link

ga73kud commented Jun 19, 2019

It seems that the function polyhedron doesn't compute all my polyhedrons without errors. I also used the MPT Toolbox of the ETH Zürich in Matlab, and the result is different. The polyhedra shouldn't have white spaces between their neighbor polyhedron. In Matlab it works fine, in Julia, the computation seems problematic.
The code:

using MAT
using Polyhedra
using Plots
default(show = false)
function readData()
    println("fcn read data start")
    file = matread("myDat.mat")
    data=file["mydat"]
    vertices=data["polyVertices"]
    for qrt=1:length(vertices)
        first=vertices[qrt]
        v=Polyhedra.vrep(first)
        p=polyhedron(v)
        display(plot!(p, yflip=true))
    end
    println("fcn read data end")
end
readData()
@blegat
Copy link
Member

blegat commented Jun 19, 2019

The polyhedra shouldn't have white spaces between their neighbor polyhedron

Not sure what you mean mean by that.
You can try replacing polyhedron(v) by polyhedron(v, CDDLib.Library(:float)) (adding using CDDLib at the beginning) of the script if you want to use the same underlying library than MPT.

Otherwise, it may be a bug in the default library, we would be interested by an example of instance for which this occur.

@ga73kud
Copy link
Author

ga73kud commented Jul 2, 2019

In Matlab the polyhedrons are perfectly aligned to each other. Like in a mosaic picture. In Julia there are some "white spaces" (I colored the polyhedrons).

I get following error with polyhedron(v, CDDLib.Library(:float))

LoadError: MethodError: objects of type Symbol are not callable
in expression starting at /home/hartmannadm/JULIA_PRO/Scripts/pomdp/visualizeInffeld.jl:20
readData() at visualizeInffeld.jl:15
top-level scope at none:0

@blegat
Copy link
Member

blegat commented Jul 2, 2019

Which version of CDDLib, Polyhedra and Julia are you using ? Can you try CDDLib.Library() in the REPL to isolate the issue ?

@blegat
Copy link
Member

blegat commented May 29, 2020

Any update ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants