Hi opfer,
Thank you very much for the inputs. They are very helpful.
Code: Select all
use application "polytope";
use vars qw($s $M $l $L @lines @keys $novars);
open($l, "<varname.txt") || die "Error : $!";
my @lines = <$l>;
close($l);
my @keys = split( /\s+/,$lines[0]);
open($L, "<points.txt") || die "Error : $!";
my $M = new Matrix<Rational>(<$L>);
close($L);
reset_preference "*.convex_hull";
prefer_now "ppl";
$s = new Polytope<Rational>(POINTS=>$M, COORDINATE_LABELS=>[@keys]);
print_constraints($s);
Sorry, I've kind of got lost in the lengthy discussion, it contains several possible solutions to the same problem achieved after different roundings and other modifications. Could you please reformulate this claim as a self-contained reproducible task, like this:... Unless I am missing something obvious, this seems like a bug in polymake.
There is absolutely no magic. You create a Polytope object with INEQUALITIES and EQUATIONS, then add an LP subobject with LINEAR_OBJECTIVE vector and ask for LP.MINIMAL_VALUE or LP.MAXIMAL_VALUE or LP.MINIMAL_VERTEX or LP.MAXIMAL_VERTEX. Depending on your current preferences, either your implementation of the simplex algorithm (TOSimplex) or that from lrslib or cddlib is executed.I am not an expert on how Polymake handles LPs/polyhedra.
This is not what I meant. I could reproduce the "problem". If I take an appropriate integer program, I get points as lattice points. If I create a new polytope out of these points and ask for the polytope's facets and add these facets to the IP and convert the IP to an LP, then the objective value is still better than the IP optimal value. I would have expected that they have the same optimal value as the "facets" should define the polytope. Maybe, polymake and I, we have a different understanding of the term "facets". If I take the affine hull constraints and add them instead, then the optimal values coincide.There is absolutely no magic. You create a Polytope object with INEQUALITIES and EQUATIONS, then add an LP subobject with LINEAR_OBJECTIVE vector and ask for LP.MINIMAL_VALUE or LP.MAXIMAL_VALUE or LP.MINIMAL_VERTEX or LP.MAXIMAL_VERTEX. Depending on your current preferences, either your implementation of the simplex algorithm (TOSimplex) or that from lrslib or cddlib is executed.