Skip to content

PolymakeInterface

Dave Swinarski edited this page May 8, 2016 · 12 revisions

May 6:

Plan: Madeline and Dave will work on PolymakeInterface and PolyhedralObjects from the Wake Forest 2012 workshop. Justin and Roger will add new stuff to LexIdeals.

We emailed Josephine Yu and Diane Maclagan. They plan to work on the gfan interface at the upcoming M2 workshop at Warwick, so we will not work on it at the Utah workshop.

The following info was copied and updated from the Wake Forest 2012 workshop wiki:

Running the Polymake interface on Mac

The current Polymake interface assumes that you can run the command polymake [script_file] in the terminal to run a polymake script. However, this does not work on some Mac machines. If you have this problem, maybe you can try the following:

  1. Duplicate the file /Applications/polymake.app/Contents/MacOS/polymake.start into /Applications/polymake.app/Contents/MacOS/polymake.start2.
  2. Open the new file polymake.start2 with a text editor. Delete line 3, which says echo -ne "\033]0;polymake\007"
  3. Still inside polymake.start2, add "$@" (with the quotation marks) to the end of the last line of the file. So the last line is now $ResourcesDir/polymake/bin/polymake "$@".
  4. Create a new file named polymake in the directory /usr/local/bin/, type the following: /Applications/polymake.app/Contents/MacOS/polymake.start2 "$@"
  5. Open a terminal and type the following: chmod +x /usr/local/bin/polymake

PolyhedralObjects and PolymakeInterface

We updated both packages. They are running successfully (install, no example errors, pass all checks) in Macaulay2 1.9 on Macs (Madeline and Dave) and also in Macaulay2 1.7 in Linux (Fordham Research Computing Cluster)

About the property LatticePointsGenerators in PolymakeInterface

This corresponds to the property LATTICE_POINTS_GENERATORS in Polymake: https://polymake.org/release_docs/2.14/polytope.html#Polytope_Rational__LATTICE_POINTS_GENERATORS In which the input is a polyhedron and the output is 3 matrices. One contains a list of points P, the second a list of rays R, and the third is a basis for the lineality space L. Then every lattice point in the polyhedron can be expressed as $p + \lambda R + \mu L$, where entries of $\lambda$ are non-negative integers and entries of $\mu$ are integers. There is a special parser for this type of output called parseLatticePointsGenerators.

Mike requested:

  • Hilbert basis (probably already implemented, we will check this)
  • Lattice points (was already implemented, not tested, polymake changed)
  • gfan: what weight gives you an initial ideal (probably already implemented, will check)
  • Triangulations of polytopes (does polymake just call TOPCOM? We can do this directly from M2)
  • time polymake interface. Maybe this data will convince the polymake team to speed this up for us.

We worked on updating PolymakeInterface's "LatticePoints" to polymake's new "LatticePointsGenerators". End of day May 6: it is working but we need to change either the domain or codomain of the empty matrix to match Lineality Space

To Do on Sunday:
  • search for untested functions inside PolymakeInterface
  • Look for package exports
  • Mike requests