user_guide:tutorials:polymakeilp

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
researchdata:polymakeilp [2015/01/29 15:21] benmuelluser_guide:tutorials:polymakeilp [2019/01/29 21:46] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== polymake in Linear and Integer Programming ======+====== Computing convex hulls and counting integer points with polymake ====== 
 + 
  
 Here we collect programs and data for the experiments reported on in the paper Here we collect programs and data for the experiments reported on in the paper
-  * Benjamin Assarf, Ewgenij Gawrilow, Katrin Herr, Michael Joswig, Benjamin Lorenz, Andreas Paffenholz, Thomas Rehn: polymake in Linear and Integer Programming, [[http://arxiv.org/abs/1408.4653|arXiv:1408.4653]]+  * Benjamin Assarf, Ewgenij Gawrilow, Katrin Herr, Michael Joswig, Benjamin Lorenz, Andreas Paffenholz, Thomas Rehn: [[https://link.springer.com/article/10.1007/s12532-016-0104-z|Computing convex hulls and counting integer points with polymake]], Mathematical Programming Computation, March 2017, Volume 9, Issue 1, pp 1–38.
  
 In integer and linear optimization the software workhorses are solvers for linear programs as well as generic frameworks for branch-and-bound or branch-and-cut schemes. While today it is common to solve linear programs with millions of rows and columns and, moreover, mixed integer linear programs with sometimes hundreds of thousands of rows and columns, big challenges remain. A main purpose of this note is to report on the state of the art of getting at the facets of the integer hull in a brute force kind of way. And we will do so by explaining how our software system polymake can help. First, we explore how various convex hull algorithms and implementations behave on various kinds of input. Our input is chosen according to typical scenarios which are motivated by computational tasks arising in optimization. Second, we look into enumerating lattice points in polytopes, which is actually the first step for this integer hull approach. We will sum up our experience in this area in several "rules of thumb", all of which have to be taken with a grain of salt.  In integer and linear optimization the software workhorses are solvers for linear programs as well as generic frameworks for branch-and-bound or branch-and-cut schemes. While today it is common to solve linear programs with millions of rows and columns and, moreover, mixed integer linear programs with sometimes hundreds of thousands of rows and columns, big challenges remain. A main purpose of this note is to report on the state of the art of getting at the facets of the integer hull in a brute force kind of way. And we will do so by explaining how our software system polymake can help. First, we explore how various convex hull algorithms and implementations behave on various kinds of input. Our input is chosen according to typical scenarios which are motivated by computational tasks arising in optimization. Second, we look into enumerating lattice points in polytopes, which is actually the first step for this integer hull approach. We will sum up our experience in this area in several "rules of thumb", all of which have to be taken with a grain of salt. 
Line 8: Line 10:
 ===== Experimental setup ===== ===== Experimental setup =====
  
-All experiments can be run with a clean polymake 2.13 installation if the requirements for the corresponding bundled extensions are met (check the configure output):+All experiments can be run with a clean polymake 2.15 beta 3 installation if the requirements for the corresponding bundled extensions are met (check the configure output):
   * Convex hull computations up to symmetry need the group extension and thus the [[http://www.boost.org/|boost library]].   * Convex hull computations up to symmetry need the group extension and thus the [[http://www.boost.org/|boost library]].
   * The ppl extension needs an installed version of the [[http://bugseng.com/products/ppl/|ppl library]].   * The ppl extension needs an installed version of the [[http://bugseng.com/products/ppl/|ppl library]].
Line 15: Line 17:
   * [[https://www.math.ucdavis.edu/~latte/|LattE]] needs to be installed and configured.   * [[https://www.math.ucdavis.edu/~latte/|LattE]] needs to be installed and configured.
  
-==== Software versions used for the experiments in the paper ====+=== Software versions used for the experiments in the paper ===
  
-  * openSUSE 13.1 with gcc 4.8.1, gmp 5.1.2 and perl 5.18.1 +  * openSUSE 13.1 with with Linux kernel 3.11.10-25 and gcc 4.9.3, gmp 5.1.2 and perl 5.18.1 
-  * polymake 2.13 +  * polymake 2.15 beta 3 
-  * cddlib 0.94f +  * cddlib 0.94h 
-  * lrslib 4.2b+  * lrslib 6.0
   * ppl 1.1   * ppl 1.1
-  * libnormaliz 2.10.1 +  * libnormaliz 2.99.4 
-  * 4ti2 1.6.2 +  * 4ti2 1.6.6 
-  * LattE 1.6+  * LattE 1.73 
 +  * azove 2.0 
 +  * porta 1.4.1-20090921
  
-==== Hardware ===+=== Hardware ===
   * CPU: AMD Phenom(tm) II X6 1090T   * CPU: AMD Phenom(tm) II X6 1090T
   * bogomips: 6421.34   * bogomips: 6421.34
   * MemTotal: 8191520 kB   * MemTotal: 8191520 kB
 +
 +=== Using the scripts ===
 +If you want to use one of the following scripts in polymake load the script via
 +<code>
 +script("/path/to/the/script/file.script");
 +</code>
 +and run the commands suggested in the corresponding section below.
  
  
 ===== Caveat ===== ===== Caveat =====
  
-Some experiments are specifically set up to stress memory usage.  Therefore we set a fixed limit to 4GB.  If you feel like duplicating our experiments you should use the following:+Some experiments are specifically set up to stress memory usage.  Therefore we set a fixed limit to 4GB.  If you feel like duplicating our experiments you should use the following shell command before starting polymake:
 <code> <code>
 ulimit -v 4000000 ulimit -v 4000000
 </code> </code>
- 
  
 ===== Convex Hull Computations ===== ===== Convex Hull Computations =====
Line 45: Line 55:
 <code perl> <code perl>
 $path = "/path/to/store/the/output/files"; $path = "/path/to/store/the/output/files";
 +start_time_cut_polytope(["porta"],0,7, { path=>$path });
 start_time_cut_polytope(["beneath_beyond"],0,4, { path=>$path, }); start_time_cut_polytope(["beneath_beyond"],0,4, { path=>$path, });
 start_time_cut_polytope(["cdd"],0,9, { path=>$path }); start_time_cut_polytope(["cdd"],0,9, { path=>$path });
 start_time_cut_polytope(["lrs"],0,5, { path=>$path, only_once=>{"5"=>1 } }); start_time_cut_polytope(["lrs"],0,5, { path=>$path, only_once=>{"5"=>1 } });
-start_time_cut_polytope(["ppl"],0,14, { path=>$path, only_once=>{"14"=>1 } });+start_time_cut_polytope(["ppl"],0,14, { path=>$path });
  
 ### ###
 ## If you want to use only one thread for normaliz set the following environment variable ## If you want to use only one thread for normaliz set the following environment variable
 ## export OMP_NUM_THREADS=1 ## export OMP_NUM_THREADS=1
-start_time_cut_polytope(["libnormaliz"],0,8, { path=>$path, only_once=>{"8"=>1 } });+#start_time_cut_polytope(["libnormaliz"],0,14, { path=>$path, only_once=>{"14"=>1 } });
  
 ### ###
 ## If you want to use more than one thread for normaliz set the following environment variable ## If you want to use more than one thread for normaliz set the following environment variable
 ## export OMP_NUM_THREADS=6 ## export OMP_NUM_THREADS=6
-start_time_cut_polytope(["libnormaliz"],0,9, { path=>$path, only_once=>{"9"=>1 } });+#start_time_cut_polytope(["libnormaliz"],0,14, { path=>$path, only_once=>{"14"=>1 } });
 </code> </code>
  
  
 === Knapsack Integer Hulls === === Knapsack Integer Hulls ===
-Download the {{:researchdata:knapsack_convexhull.script|script}} and load it into polymake. Use the following commands to run the tests. You may download the output data {{:researchdata:knapsack_convex_hull.zip|here}}.+Download the {{:researchdata:knapsack_convexhull.script|script}} and load it into polymake. Use the following commands to run the tests. You may download the output data {{:researchdata:knapsack_conv.zip|here}}.
 <code perl> <code perl>
 $path = "/path/to/store/the/output/files"; $path = "/path/to/store/the/output/files";
-start_time_knapsack(["beneath_beyond", "ppl"],4,6,40,100, 2,3, { path=>$path });+### 
 +## To use only one thread for normaliz set the following environment variable 
 +# export OMP_NUM_THREADS=1 
 + 
 +start_time_knapsack(["libnormaliz", "porta", "beneath_beyond", "ppl"],4,6,40,100, 2,3, { path=>$path });
 start_time_knapsack(["cdd"],4,6,40,[100,100,80],2,3, { path=>$path, only_once=>{"5,100"=>1} }); start_time_knapsack(["cdd"],4,6,40,[100,100,80],2,3, { path=>$path, only_once=>{"5,100"=>1} });
 start_time_knapsack(["lrs"],4,6,40,[100,70,60],2,3, { path=>$path, only_once=>{"4,100"=>1,"5,70"=>1, "6,60"=>1} }); start_time_knapsack(["lrs"],4,6,40,[100,70,60],2,3, { path=>$path, only_once=>{"4,100"=>1,"5,70"=>1, "6,60"=>1} });
  
 ## different kinds of input sorting ## different kinds of input sorting
-## 1=random sorting, 2=good sorting (vertices come first) +## 1=random sorting, 2=vertices come first 
-start_time_knapsack(["beneath_beyond"],4,6,40,100, 2,3, { path=>$path, inputSort=>1 }); +start_time_knapsack(["beneath_beyond", "porta"],4,6,40,100, 2,3, { path=>$path, inputSort=>1 }); 
-start_time_knapsack(["beneath_beyond"],4,6,40,100, 2,3, { path=>$path, inputSort=>2 });+start_time_knapsack(["beneath_beyond", "porta"],4,6,40,100, 2,3, { path=>$path, inputSort=>2 });
  
-start_time_knapsack(["lrs"],4,6,40,[100,100,90],2,3, { path=>$path, inputSort=>1 });+start_time_knapsack(["lrs"],4,6,40,100,2,3, { path=>$path, inputSort=>1 }); 
 +start_time_knapsack(["lrs"],4,6,40,100,2,3, { path=>$path, inputSort=>2 }); 
 + 
 +start_time_knapsack(["cdd"],4,6,40,100,2,3, { path=>$path, inputSort=>}); 
 +start_time_knapsack(["cdd"],4,6,40,100,2,3, { path=>$path, inputSort=>});
 </code> </code>
  
Line 82: Line 101:
 Download the {{:researchdata:voronoi.script|script}} and load it into polymake. Use the following commands to run the tests. You may download the output data {{:researchdata:voronoi.zip|here}}. Download the {{:researchdata:voronoi.script|script}} and load it into polymake. Use the following commands to run the tests. You may download the output data {{:researchdata:voronoi.zip|here}}.
 <code perl> <code perl>
 +# set environment: export OMP_NUM_THREADS=1
 +
 $path = "/path/to/store/the/output/files"; $path = "/path/to/store/the/output/files";
 +# no porta because coordinates are too ugly (porta does not use gmp)
 start_time_voronoi(["beneath_beyond"],3,7,500,[3000,3000,3000,3000,1000], { path=>$path, only_once=>{"7,1000"=>1 } }); start_time_voronoi(["beneath_beyond"],3,7,500,[3000,3000,3000,3000,1000], { path=>$path, only_once=>{"7,1000"=>1 } });
-start_time_voronoi(["cdd"],3,6,500,[3000,2000,1000,500], { path=>$path, only_once=>{"6,500"=>1,"5,1000"=>});+start_time_voronoi(["cdd"],3,6,500,[3000,3000,1500,500], { path=>$path, "5,1500"=> });
 start_time_voronoi(["lrs"],3,7,500,[3000,3000,3000,3000,1000], { path=>$path, only_once=>{"6,3000"=>1 } }); start_time_voronoi(["lrs"],3,7,500,[3000,3000,3000,3000,1000], { path=>$path, only_once=>{"6,3000"=>1 } });
-start_time_voronoi(["ppl"],3,6,500,[3000,3000,3000,1000], { path=>$path, only_once=>{"6,1000"=>1 } });+start_time_voronoi(["libnormaliz"],3,7,500,[3000,3000,3000,1500,500], { path=>$path }); 
 +start_time_voronoi(["ppl"],3,6,500,[3000,3000,2500,1000], { path=>$path, only_once=>{"5,2500"=>1, "6,1000"=>1 } });
  
 ## Running one example many times (1000) to check standard deviation ## Running one example many times (1000) to check standard deviation
-stats_voronoi(["beneath_beyond","cdd","lrs","ppl"],5,500,1000, { path=>$path } );+#stats_voronoi(["beneath_beyond","cdd","lrs","ppl","libnormaliz"],5,500,1000, { path=>$path } );
 </code> </code>
  
  
 === Symmetric Cut Polytopes === === Symmetric Cut Polytopes ===
-Download the {{:researchdata:cut_polytopes.script|script}} and load it into polymake. Use the following commands to run the tests. You may download the output data {{:researchdata:cut_poly.zip|here}}.+Download the {{:researchdata:cut_polytopes.script|script}} and load it into polymake. Use the following commands to run the tests. You may download the output data {{:researchdata:cut_poly_ch.zip|here}}.
 <code perl> <code perl>
 $n_runs = 10; $n_runs = 10;
 $choose_induced_syms = 1; # uses induced symmetries of graph instead of linear symmetries of cut polytope (set to 0 for linear symmetries!) $choose_induced_syms = 1; # uses induced symmetries of graph instead of linear symmetries of cut polytope (set to 0 for linear symmetries!)
 +
 $path = "/path/to/store/the/output/files"; $path = "/path/to/store/the/output/files";
 foreach my $n_nodes (9,10) { foreach my $n_nodes (9,10) {
Line 120: Line 144:
 ## To use only one thread for normaliz set the following environment variable ## To use only one thread for normaliz set the following environment variable
 # export OMP_NUM_THREADS=1 # export OMP_NUM_THREADS=1
 +###
 +## to run latte in all primal mode use the polymake command
 +# set_custom($latte_count_param="--irrational-all-primal --maxdet=25 --exponential");
 +## and restart polymake
 $path = "/path/to/store/the/output/files"; $path = "/path/to/store/the/output/files";
  
 ## experiments: just varying the dimension ## experiments: just varying the dimension
-$dpath = "$path/plots_dim/";+my $dpath = "$path/plots_dim/";
 start_time_knapsack(["bbox", "projection","_4ti2"],4,20,60,60, 2,3, { path=>$dpath }); start_time_knapsack(["bbox", "projection","_4ti2"],4,20,60,60, 2,3, { path=>$dpath });
-start_time_knapsack(["libnormaliz"],4,7,60,60, 2,3, { path=>$dpath }); +start_time_knapsack(["libnormaliz"],4,20,60,60, 2,3, { path=>$dpath }); 
-start_time_knapsack(["latte"],4,18,60,60, 2,3, { path=>$dpath });+start_time_knapsack(["libnormaliz"],4,20,60,60, 2,3, { path=>$dpath, normaliz_dual=>}); 
 +start_time_knapsack(["latte"],4,18,60,60, 2,3, { path=>$dpath }); # default 
 +#start_time_knapsack(["latte"],4,12,60,60, 2,3, { path=>$dpath }); # all_primal
  
 ## experiments: just varying the right hand side  ## experiments: just varying the right hand side 
-$bpath = "$path/plots_rhs/";+my $bpath = "$path/plots_rhs/";
 start_time_knapsack(["bbox", "latte", "projection","libnormaliz"],5,5,40,200, 2,3, { path=>$bpath }); start_time_knapsack(["bbox", "latte", "projection","libnormaliz"],5,5,40,200, 2,3, { path=>$bpath });
 +start_time_knapsack(["libnormaliz"],5,5,40,200, 2,3, { path=>$bpath });
 +start_time_knapsack(["libnormaliz"],5,5,40,200, 2,3, { path=>$bpath, normaliz_dual=>1 });
 start_time_knapsack(["_4ti2"],5,5,40,90, 2,3, { path=>$bpath }); start_time_knapsack(["_4ti2"],5,5,40,90, 2,3, { path=>$bpath });
- 
-## normaliz with higher granularity 
-start_time_knapsack(["libnormaliz"],5,5,40,191, 2,3, { path=>$bpath."smallsteps/", bstep=>1 }); 
 </code> </code>
  
  
 === Random Box === === Random Box ===
-Download the {{:researchdata:randbox_lattice.script|script}} and load it into polymake. Use the following commands to run the tests. You may download the output data {{:researchdata:rand_box_lattice.zip|here}}.+Download the {{:researchdata:randbox_lattice.script|script}} and load it into polymake. Use the following commands to run the tests. You may download the output data {{:researchdata:randbox_lattice.zip|here}}.
 <code perl> <code perl>
 ### ###
 ## To use only one thread for normaliz set the following environment variable ## To use only one thread for normaliz set the following environment variable
 # export OMP_NUM_THREADS=1 # export OMP_NUM_THREADS=1
 +###
 +## to run latte in all primal mode use the polymake command
 +# set_custom($latte_count_param="--irrational-all-primal --maxdet=25 --exponential");
 +## and restart polymake
 $path = "/path/to/store/the/output/files"; $path = "/path/to/store/the/output/files";
 start_time_rand_box(["libnormaliz"],4,9,20,70,{ path=>$path }); start_time_rand_box(["libnormaliz"],4,9,20,70,{ path=>$path });
-start_time_rand_box(["projection"],4,9,20,[70,70,70,70,70,60],{ path=>$path });+start_time_rand_box(["projection"],4,9,20,70,{ path=>$path });
 start_time_rand_box(["bbox"],4,9,20,[70,70,70,70,70,40],{ path=>$path }); start_time_rand_box(["bbox"],4,9,20,[70,70,70,70,70,40],{ path=>$path });
-start_time_rand_box(["latte"],4,5,20,[70,30],{ path=>$path, only_once=>{"5,30"=>1} });+start_time_rand_box(["latte"],4,7,20,70,{ path=>$path }); 
 +# 4ti2 and nmz dual disabled due to high variance, see below
 #start_time_rand_box(["_4ti2"],4,7,20,70,{ path=>$path }); #start_time_rand_box(["_4ti2"],4,7,20,70,{ path=>$path });
 +#start_time_rand_box(["libnormaliz"],4,5,20,[70,30],{ path=>$path, normaliz_dual=>1 });
  
  
 ## Running one example many times (100) to check standard deviation ## Running one example many times (100) to check standard deviation
 stats_rand_box(["libnormaliz","projection","bbox"],6,50,100, { path=>$path } ); stats_rand_box(["libnormaliz","projection","bbox"],6,50,100, { path=>$path } );
 +stats_rand_box(["projection","bbox"],6,50,100, { path=>$path } );
 stats_rand_box(["latte"],4,20,100, { path=>$path } ); stats_rand_box(["latte"],4,20,100, { path=>$path } );
  
-## Set a ulimit on time since the running times of 4ti2 have high variance+## These tests produce a high variance 
 +#stats_rand_box(["libnormaliz"],4,20,100, { path=>$path, normaliz_dual=>1 } ); 
 +## Setting a ulimit on time aborts the extreme cases after one hour
 # ulimit -t 3600 # ulimit -t 3600
-stats_rand_box(["_4ti2"],4,20,100, { path=>$path } );+#stats_rand_box(["_4ti2"],4,20,100, { path=>$path } ); 
 +</code> 
 + 
 +=== Matching Polytopes === 
 +Download the {{:researchdata:matching_polytope_lattice.script|script}} and load it into polymake. Use the following commands to run the tests. You may download the output data {{:researchdata:matching_lattice.zip|here}}. 
 +<code perl> 
 +### 
 +## To use only one thread for normaliz set the following environment variable 
 +# export OMP_NUM_THREADS=1 
 +$path = "/path/to/store/the/output/files"; 
 + 
 +start_time_matching_polytope(["azove"],4,19, { path=>$path }); 
 +start_time_matching_polytope(["_4ti2"],4,9, { path=>$path }); 
 +start_time_matching_polytope(["bbox"],4,7, { path=>$path }); 
 +start_time_matching_polytope(["projection"],4,9, { path=>$path }); 
 +start_time_matching_polytope(["libnormaliz"],4,7, { path=>$path }); 
 +start_time_matching_polytope(["libnormaliz"],4,10, { path=>$path, normaliz_dual=>1 }); 
 + 
 +### 
 +## to run latte in all primal mode use the polymake command 
 +# set_custom($latte_count_param="--irrational-all-primal --maxdet=25 --exponential"); 
 +## and restart polymake 
 +start_time_matching_polytope(["latte"],4,7, { path=>$path }); # default 
 +#start_time_matching_polytope(["latte"],4,5, { path=>$path }); # all primal
 </code> </code>
  • user_guide/tutorials/polymakeilp.1422544911.txt.gz
  • Last modified: 2015/01/29 15:21
  • by benmuell