extensions:polytropes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
extensions:polytropes [2020/03/18 11:25] – created joswigextensions:polytropes [2021/01/12 14:34] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Polytropes ======+====== polytropes ======
  
 This is the software companion to the article "The tropical geometry of shortest paths" by This is the software companion to the article "The tropical geometry of shortest paths" by
-[[https://page.math.tu-berlin.de/~joswig/|Michael Joswig]] and [[http://people.math.binghamton.edu/schroeter/|Benjamin Schröter]], [[https://arxiv.org/abs/1904.01082|arXiv:1904.01082]]+[[https://page.math.tu-berlin.de/~joswig/|Michael Joswig]] and [[http://people.math.binghamton.edu/schroeter/|Benjamin Schröter]], [[https://arxiv.org/abs/1904.01082|arXiv:1904.01082]]
 +Ewgenij Gawrilow co-authors the code. 
  
 We study parameterized versions of classical algorithms for computing shortest-path trees. This is most easily expressed in terms of tropical geometry. Applications include the enumeration of polytropes, i.e., ordinary convex polytopes which are also tropically convex, as well as shortest paths in traffic networks with variable link travel times. We study parameterized versions of classical algorithms for computing shortest-path trees. This is most easily expressed in terms of tropical geometry. Applications include the enumeration of polytropes, i.e., ordinary convex polytopes which are also tropically convex, as well as shortest paths in traffic networks with variable link travel times.
Line 8: Line 9:
 ===== Download ===== ===== Download =====
  
-[[http://page.math.tu-berlin.de/~joswig/software/polymake/polytropes-0.1.tar.xz|polytropes-0.1.tar.xz]] [18 Mar 2020], for polymake version 4.0+[[http://page.math.tu-berlin.de/~joswig/software/polymake/polytropes-0.1.tar.xz|polytropes-0.1.tar.xz]] [18 Mar 2020], for the upcoming polymake version 4.1 (but mostly usable for 4.0, too).
  
 ===== Installation ===== ===== Installation =====
Line 20: Line 21:
 Suppose this ends up at ''/your/path/polytropes-0.1'' Then you start up polymake.  Within the polymake shell do: Suppose this ends up at ''/your/path/polytropes-0.1'' Then you start up polymake.  Within the polymake shell do:
 <code> <code>
-import_extension "/your/path/poyltropes-0.1";+import_extension "/your/path/polytropes-0.1";
 </code> </code>
-Do not forget to use an absolute path!  Afterwards you are good to run the code.  This import needs to be performed only once.  The reference to the extension is permanently stored in ''$HOME/.polymake/prefer.pl'' For more details there is a [[user_guide/extend/extensions|guide to polymake's extension system]].+Do not forget to use an absolute path!  Afterwards you are good to run the code.  This import needs to be performed only once.  The reference to the extension is permanently stored in ''$HOME/.polymake/settings'' For more details there is a [[user_guide/extend/extensions|guide to polymake's extension system]].
  
 ===== Examples ===== ===== Examples =====
Line 28: Line 29:
 This extension contributes to the application ''graph''. This extension contributes to the application ''graph''.
  
-In the application ''graph'' you can create a directed graph whose weights are allowed to be intervals with nonnegative rational boundaries or $+\infty$.  That is, we are in the case of [i]seperated variables[/i].+In the application ''graph'' you can create a directed graph whose weights are allowed to be intervals with nonnegative rational boundaries or $+\infty$.  That is, we are in the case of //separated variables//.
  
 We construct Example 8 from the paper (see Figure 3, loc. cit.). We construct Example 8 from the paper (see Figure 3, loc. cit.).
Line 36: Line 37:
 > $G = new GraphAdjacency<Directed>(4); > $G = new GraphAdjacency<Directed>(4);
 </code> </code>
-The edges are defined along with their weights.+[For polymake 4.0 use ''props::Graph'' instead of ''GraphAdjacency''; the rest stays the same.] The edges are defined along with their weights.
 <code> <code>
 > $Weights = new EdgeMap<Directed, WeightInterval<Rational>>($G); > $Weights = new EdgeMap<Directed, WeightInterval<Rational>>($G);
Line 131: Line 132:
 In the first solution, e.g., we see that $c$ and $d$ go through $b$ to reach $a$. In the first solution, e.g., we see that $c$ and $d$ go through $b$ to reach $a$.
 The next part of the output for each solution are the distances from each node to the target, written in the form $\alpha + \beta x$, where $x$ is the variable weight of the arc from $b$ to $a$. The next part of the output for each solution are the distances from each node to the target, written in the form $\alpha + \beta x$, where $x$ is the variable weight of the arc from $b$ to $a$.
-The distance from $a$ to itself is zero; the output "(2)" is SparseVector notation; it means zero.+The distance from $a$ to itself is zero; the output "(2)" is SparseVector notation; it means zero; see below for more details on the sparse notation.
 The distance from $b$ to $a$ is $x$. The distance from $b$ to $a$ is $x$.
 The distance from $c$ to $a$ is $2+x$. The distance from $c$ to $a$ is $2+x$.
Line 137: Line 138:
 All these hold under the conditions $3-x \geq 0$ and $1-x \geq 0$ (standard polymake notation for linear inequalities); i.e., $0 \leq x \leq 1$, and the other inequality is redundant. All these hold under the conditions $3-x \geq 0$ and $1-x \geq 0$ (standard polymake notation for linear inequalities); i.e., $0 \leq x \leq 1$, and the other inequality is redundant.
 The nonnegativity is always implicit. The nonnegativity is always implicit.
 +
 +The actual feasibility of a shortest path tree is //not// checked here.
 +The second solution (which is the one shown in Figure 3) is subject to the conditions $-3+x\geq 0$ and $1-x\geq 0$, i.e., $x \geq 3$ and $x\leq 1$, which is impossible.
 +The feasibility can be checked via an LP oracle.
 +
 +The sparse matrix notation works as follows: each row is a sparse vector. Each sparse vector starts with its length (in parantheses), followed by a list of pairs of indices and nonzero coefficients.
 +
  • extensions/polytropes.1584530749.txt.gz
  • Last modified: 2020/03/18 11:25
  • by joswig