-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
I have a function that generates a bunch of polyhedra and computes their volume. All of the polyhedra are bounded by [0,1]
in all variables (hence, their volume is finite and less than one), and I add additional constraints according to a certain rule. Sometimes, one of these constraints is completely redundant, and in such cases, volume()
returns an overestimate of the volume.
MWE:
using Polyhedra
poly = polyhedron(HalfSpace([-1.0, 0.0], 0.0) ∩
HalfSpace([0.0, -1.0], 0.0) ∩
HalfSpace([1.0, 0.0], 1.0) ∩
HalfSpace([0.0, 1.0], 1.0) ∩
HalfSpace([-0.2, -0.8], -0.0) ∩
HalfSpace([0.6, 0.4], 0.6))
volume(poly)
# 1.1666666666666665
The vertices of this polyhedron, as correctly given by vrep(poly)
, are
[ 1/3 , 1 ]
[ 1 , 0 ]
[ 0 , 0 ]
[ 0 , 1 ]
and a simple sketch shows that the true area is 2/3
.
- Polyhedra version: 0.6.13
- Julia version: 1.5.4
Metadata
Metadata
Assignees
Labels
No labels