Giter Site home page Giter Site logo

Comments (3)

stephane-caron avatar stephane-caron commented on June 19, 2024 1

compute_polytope_vertices is an application of the more general get_generators() from cdd, where we further assume that the output is a polytope (get_generators works with general polyhedra, which can have both rays and vertices).

from pypoman.

stephane-caron avatar stephane-caron commented on June 19, 2024

It seems indeed that cdd does not find any vertex. It could be that the set is empty, or the problem hits some numerical issue.

One small piece of advice: your NumPy arrays will have an integer datatype, but compute_polytope_vertices assumes floating-point numbers. One advice (not changing the outcome here) is to add dtype=np.float64 to the calls to np.array to make sure all numbers are treated as floating point scalars.

To go further, I'd recommend you dig into what the function is doing, that is, taking the code out and managing the pycddlib objects directly. For instance rather you can try another number type:

mat = cdd.Matrix(np.hstack([b, -A]), number_type="float")

I don't know whether that's the case but it may also be possible to get more verbose outputs from cdd to see why it returns no generator.

Hoping this helps!

from pypoman.

paulpacaud avatar paulpacaud commented on June 19, 2024

Thank you for your reply. Picking up on what you said, to enumerate vertices of a polytope, what's the difference between compute_polytope_vertices from pypoman and poly.get_generators() from pycddlib ?

from pypoman.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.