I have many polytopes to analyse so I've created a file containing all the necessary polymake commands, thousands of lines of them.
Code: Select all
$ineq = zero_vector(10) | unit_matrix(10);
$m0 = new Matrix([[-1,1,1,1,0,1,0,0,1,0,0],
[-1,1,1,1,0,0,1,0,0,0,1],
[-1,1,1,1,0,0,0,1,0,1,0],
....
....
print $p0->VERTICES;
....
....
If I am using a package like GAP or Magma or Mathematica and I have a long list of GAP or Magma or Mathematica commands (generated by another program) then I can run them simply by typing (on the command line)
Code: Select all
gap < inputfile
magma < inputfile
math < inputfile
OK, can I run polymake in "non-interactive" mode? I searched for "interactive" and discovered scripts ...
But I tried loading them by adding "--script" to the command line, or typing script(inputfile) into the interactive shell. Either nothing happens or I get "ERROR: Bareword found where operator expected at input line 1". Even when I deleted everything except a plain Perl statement (print "Success\n";) from the file, I still couldn't read it in.
Is there a way to read in and execute a sequence of commands?