I would like to read in an input file containing points for which I want polymake to compute the facets as inequalities.
Using the method prescribed at https://polymake.org/doku.php/tutorial/data, I have come up with the following script that runs to completion on small input file sizes.
Code: Select all
use application "polytope";
use vars qw($pts $M $ptope);
open($pts, "<polymakepoints.txt") || die "Error : $!";
my $M = new Matrix<Rational>(<$pts>);
close($pts);
$ptope = new Polytope<Rational>(POINTS=>$M);
print_constraints($ptope);
I have two specific questions:
(1)During the 30 seconds that this script mentioned above runs, if I press Ctrl C in the terminal window, I get the following:
Code: Select all
^Cpolymake: WARNING: rule POINTED : INPUT_RAYS failed: killed by signal
^Cpolymake: WARNING: rule ppl.convex_hull.primal: FACETS, LINEAR_SPAN : RAYS | INPUT_RAYS failed: killed by signal
^Cpolymake: WARNING: rule cdd.convex_hull.primal: FACETS, LINEAR_SPAN : RAYS | INPUT_RAYS failed: killed by signal
^Cpolymake: WARNING: rule lrs.convex_hull.primal: FACETS, LINEAR_SPAN : RAYS | INPUT_RAYS failed: killed by signal
^Cpolymake: WARNING: rule cdd.convex_hull.canon: POINTED, RAYS, LINEALITY_SPACE : INPUT_RAYS failed: killed by signal
^Cpolymake: WARNING: rule cdd.convex_hull.lineality: LINEALITY_SPACE, POINTED : INPUT_RAYS failed: killed by signal
polymake: ERROR: no more rules available to compute 'FACETS | INEQUALITIES'
(2)I ended up doing Ctrl C on an input file that was even larger since I had no way of knowing whether polymake was running or it was stuck in an endless loop, etc. (apart from querying the OS which indicated that the process was indeed consuming 100% CPU, but 100% CPU can be consumed even if a process is stuck in an endless loop.) Is there any setting that lets the user know that the current run is 25% complete, 50% complete, etc?
(3)Related to (2), is there any recommended way to terminate a run on computing facets prematurely and still recover the facets computed thus far? For instance, is there any setting that I can add to my script file such that if and when I terminate/interrupt it, polymake dumps all facets it has discovered thus far to an output file? Or, even better, can polymake dynamically and instantaneously update an output facet file as and when it discovers a new facet? This way, if I terminate the run, I still have some facetial representation of the polytope. As of now, if I understand correctly, polymake gives the facets only after all facets are discovered.
Thank you.
Regards.