The question got resolved and this post of mine is a bit tangential. Hence, I have chosen to delete it.
Thanks.
Code: Select all
polymake --script getfacets | tee facets.txt
Code: Select all
# to load the application polytope
use application "polytope";
# all variables in a script have to be
# declared with 'use vars', 'declare' or 'my'
use vars qw($f $p $s);
$f=lp2poly('problem.lp');
$p = new Polytope<Rational>($f);
$p->LATTICE_POINTS;
$s = new Polytope(POINTS=>$p->LATTICE_POINTS, COORDINATE_LABELS=>$p->COORDINATE_LABELS);
print_constraints($s);
Code: Select all
script("filename", any parameters...);
Code: Select all
script("filename", "problem.lp");
Code: Select all
$f=lp2poly($ARGV[0]);
Code: Select all
declare $f=...;
Code: Select all
my $f=...;
Code: Select all
open my $out, ">facets.txt";
print $out "these are my facets:\n", $p->FACETS;
close $out;
Code: Select all
polymake --script getfacets.sh >facets.txt
Code: Select all
polymake --script getfacets.sh problem.lp >facets.txt
Code: Select all
open my $saved_STDOUT, ">&=STDOUT";
close STDOUT;
open STDOUT, ">facets.txt";
print_constraints($s);
close STDOUT;
open STDOUT, ">&=", $saved_STDOUT;
Code: Select all
open STDOUT, ">$ARGV[1]";