JuliaPolyhedra / Polyhedra.jl

Polyhedral Computation Interface
Other
172 stars 27 forks source link

Use MultivariatePolynomials #43

Open blegat opened 7 years ago

blegat commented 7 years ago

Now that MultivariatePolynomials is lightweight thanks to https://github.com/blegat/MultivariatePolynomials.jl/pull/41, we could add it to the requirement of Polyhedra and makes the HRepresentation and Polyhedron types BasicSemialgebraicSet subtypes. We could define a Polyhedra.Variable type with a Polyhedra.@polyvar macro and an AffineTerm and an AffinePolynomial types. This way, one could define an HRepresentation with

@polyvar x y
@set x + y == 1 && x >= 0 && y >= 0

The inequalities and equalities iterators would return AffinePolynomials. @rdeits what do you think ?

chriscoey commented 5 years ago

If this would make it easier to work with Newton polytopes for SOS optimization than I'm in favor!

blegat commented 5 years ago

I don't think it would help with Newton polytopes, it just gives a nice interface to build polytopes similar to SemialgebraicSets, I don't think it is a high priority.