First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The solver aims at miximizing a linear form on the polytope you defined, hence it likes returning extreme points even if the linear form is not specified. If you want to find an (relative) interior point pf your polytope, it suffice to build a non-degenerate convex combination of the extreme points of the polytope.

You can find extreme points as follows:

sage: p.polyhedron().vertices()
(A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 1, 0),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 2, 0),
 A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 0, 1),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 0, 2),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 2, 0),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 1, 0),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 2, 0),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 0, 2),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 0, 1),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 0, 2))
click to hide/show revision 2
No.2 Revision

The solver aims at miximizing a linear form on the polytope you defined, hence it likes returning extreme or boundary points even if the linear form is not specified. If you want to find an a (relative) interior point pf of your polytope, it suffice to build a non-degenerate convex combination of the extreme points of the polytope.

You can find extreme points as follows:

sage: p.polyhedron().vertices()
(A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 1, 0),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 2, 0),
 A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 0, 1),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 0, 2),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 2, 0),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 1, 0),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 2, 0),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 0, 2),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 0, 1),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 0, 2))
click to hide/show revision 3
No.3 Revision

The solver aims at miximizing a linear form on the polytope you defined, hence it likes returning extreme or boundary points even if the linear form is not specified. If you want to find a (relative) interior point of your polytope, it suffice to build a non-degenerate convex combination of the extreme points of the polytope.

You can find extreme points as follows:

sage: p.polyhedron().vertices()
(A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 1, 0),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 2, 0),
 A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 0, 1),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 0, 2),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 2, 0),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 1, 0),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 2, 0),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 0, 2),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 0, 1),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 0, 2))

For example, you can do:

sage: V = p.polyhedron().vertices()
sage: sum(v.vector() for v in V) / len(V)
(3/10, 3/10, 2/5, 3/10, 2/5, 17/10, 13/10, 17/10, 4/5, 4/5)
click to hide/show revision 4
No.4 Revision

The solver aims at miximizing a linear form on the polytope you defined, hence it likes returning extreme or boundary points even if the linear form is not specified. If you want to find a (relative) interior point of your polytope, it suffice to build a non-degenerate convex combination of the extreme points of the polytope.

You can find extreme points as follows:

sage: p.polyhedron().vertices()
(A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 1, 0),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 2, 0),
 A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 0, 1),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 0, 2),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 2, 0),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 1, 0),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 2, 0),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 0, 2),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 0, 1),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 0, 2))

For example, you can do:

sage: V = p.polyhedron().vertices()
sage: sum(v.vector() for v in V) / len(V)
(3/10, 3/10, 2/5, 3/10, 2/5, 17/10, 13/10, 17/10, 4/5, 4/5)

Or even:

sage: p.polyhedron().center()
(3/10, 3/10, 2/5, 3/10, 2/5, 17/10, 13/10, 17/10, 4/5, 4/5)
click to hide/show revision 5
No.5 Revision

The solver aims at miximizing a linear form on the polytope you defined, hence it likes returning extreme or boundary points even if the linear form is not specified. If you want to find a (relative) interior point of your polytope, it suffice to build a non-degenerate convex combination of the extreme points of the polytope.

You can find extreme points as follows:

sage: p.polyhedron().vertices()
(A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 1, 0),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 2, 0),
 A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 0, 1),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 0, 2),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 2, 0),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 1, 0),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 2, 0),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 0, 2),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 0, 1),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 0, 2))

For example, you can do:

sage: V = p.polyhedron().vertices()
sage: sum(v.vector() for v in V) / len(V)
(3/10, 3/10, 2/5, 3/10, 2/5, 17/10, 13/10, 17/10, 4/5, 4/5)

Or even:

sage: p.polyhedron().center()
(3/10, 3/10, 2/5, 3/10, 2/5, 17/10, 13/10, 17/10, 4/5, 4/5)

Or even:

sage: sum((i+1)*v.vector() for (i,v) in enumerate(V)) / (len(V)*(len(V)+1)/2)
(47/110, 43/110, 21/55, 5/22, 19/55, 177/110, 153/110, 173/110, 7/11, 56/55)
click to hide/show revision 6
No.6 Revision

The solver aims at miximizing a linear form on the polytope you defined, hence it likes returning extreme or boundary points even if the linear form is not specified. If you want to find a (relative) interior point of your polytope, it suffice to build a non-degenerate convex combination of the extreme points of the polytope.

You can find extreme points as follows:

sage: p.polyhedron().vertices()
(A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 1, 0),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 2, 0),
 A vertex at (0, 0, 1, 0, 1, 2, 1, 2, 0, 1),
 A vertex at (0, 0, 0, 1, 0, 2, 1, 2, 0, 2),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 2, 0),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 1, 0),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 2, 0),
 A vertex at (1/2, 1/2, 0, 1/2, 0, 3/2, 3/2, 3/2, 0, 2),
 A vertex at (0, 1, 0, 0, 1, 1, 2, 2, 0, 1),
 A vertex at (1, 0, 1, 0, 0, 2, 1, 1, 0, 2))

For example, you can do:

sage: V = p.polyhedron().vertices()
sage: sum(v.vector() for v in V) / len(V)
(3/10, 3/10, 2/5, 3/10, 2/5, 17/10, 13/10, 17/10, 4/5, 4/5)

Or even:Equivalently:

sage: p.polyhedron().center()
(3/10, 3/10, 2/5, 3/10, 2/5, 17/10, 13/10, 17/10, 4/5, 4/5)

Or even:

sage: sum((i+1)*v.vector() for (i,v) in enumerate(V)) / (len(V)*(len(V)+1)/2)
(47/110, 43/110, 21/55, 5/22, 19/55, 177/110, 153/110, 173/110, 7/11, 56/55)