Abstract
Implementations of the simplex method differ mostly in specific aspects such as the pivot rule. Similarly, most relaxation methods for mixed-integer programming differ mostly in the type of cuts and the exploration of the search tree. We provide a scripting mechanism to easily implement and experiment with primal and dual pivot rules for the simplex method, by building upon COIN-OR’s open-source linear programming package CLP, without explicitly interacting with the underlying C\(++\) layers of CLP. In the same manner, users can customize the solution process of mixed-integer linear programs using the CBC and CGL COIN-OR packages by coding branch-and-cut strategies and cut generators in Python. The Cython programming language ensures communication between Python and C\(++\) libraries and activates user-defined customizations as callbacks. Our goal is to emphasize the ease of development in Python while maintaining acceptable performance. The resulting software, named CyLP, has become a part of COIN-OR and is available under open-source terms. For illustration, we provide an implementation of the positive edge rule—a recently proposed rule that is particularly efficient on degenerate problems—and demonstrate how to customize branch-and-cut node selection in the solution of a mixed-integer program.




Similar content being viewed by others
References
Aides, A.: Cython wrapper for IPOPT. http://code.google.com/p/cyipopt. Accessed 2 Nov 2011 (Online)
Berkelaar, M.: lpsolve, A Mixed Integer Linear Programming Software. http://lpsolve.sourceforge.net. Accessed 2 Nov 2011 (Online)
Bland, R.G.: New finite pivoting rules for the Simplex method. Math. Oper. Res. 2(2), 103–107 (1977). (ISSN 0364765X)
Carolan, W., Hill, J., Kennington, J., Niemi, S., Wichmann, S.: Empirical evaluation of the KORBX algorithms for military airlift applications. Oper. Res. 38, 240–248 (1990)
CBC: COIN-OR Branch-and-Cut. http://projects.coin-or.org/Cbc. Accessed 2 Nov 2011 (Online)
CGL: COIN-OR Cut Generation Library. http://projects.coin-or.org/Cgl. Accessed 2 Nov 2011 (Online)
Cipra, B.A.: The best of the 20th century: editors name top 10 algorithms. SIAM News 33(4), 1–2 (2000)
CLP: COIN-OR Linear Programming. https://projects.COIN-OR.org/Clp. Accessed 2 Nov 2011 (Online)
CPLEX: http://www.cplex.com. Accessed 2 Nov 2011 (Online)
Cython: http://www.cython.org. Accessed 1 Sept 2013 (Online)
Dantzig, G.B.: Linear Programming and Extensions. Princeton University Press, NJ (1963)
Dolan, E., Moré, J.: Benchmarking optimization software with performance profiles. Math. Program. B 91, 201–213 (2002)
Dongarra, J., Sullivan, F.: Guest editors’ introduction: the top 10 algorithms. Comput. Sci. Eng. 2, 22–23 (2000). doi:10.1109/MCISE.2000.8146052. (ISSN 1521-9615)
Forrest, J.J., Goldfarb, D.: Steepest-edge simplex algorithms for linear programming. Math. Program. 57, 341–374 (1992). doi:10.1007/BF01581089. (ISSN 0025-5610)
Goldfarb, D., Reid, J.K.: A practicable steepest-edge simplex algorithm. Math. Program. 12, 361–371 (1977). doi:10.1007/BF01593804. (ISSN 0025-5610)
Greenberg, H.J.: An analysis of degeneracy. Naval Res. Log. Q. 33, 635–655 (1986)
Gurobi: http://www.gurobi.com. Accessed 2 Nov 2011 (Online)
Harris, P.M.J.: Pivot selection methods of the Devex LP code. In: Cottle, R.W., et al., (eds.) Computational Practice in Mathematical Programming, Mathematical Programming Studies, vol. 4, pp. 30–57. Springer, Berlin (1975). doi:10.1007/BFb0120710 (ISBN 978-3-642-00766-8)
Hoffman, K.L., Padberg, M.: Solving airline crew scheduling problems by branch-and-cut. Manag. Sci. 39, 675–682 (1993). doi:10.1287/mnsc.39.6.657
Koepke, H.: Cython wrapper for CPLEX. http://www.stat.washington.edu/~hoytak/code/pycpx/index.html. Accessed 2 Nov 2011 (Online)
Koepke, H.: Cython wrapper for lpsolve. http://www.stat.washington.edu/~hoytak/code/pylpsolve/index.html. Accessed 2 Nov 2011 (Online)
Larman, C.: Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, 2nd edn. Prentice Hall, Upper Saddle River (2001)
Lougee-Heimer, R.: The common optimization interface for operations research. IBM J. Res. Dev. 47(1), 57–66 (2003). doi:10.1147/rd.471.0057. http://www.COIN-OR.org
Makhorin, A.: GLPK, GNU Linear Programming Kit. http://www.gnu.org/s/glpk. Accessed 2 Nov 2011 (Online)
Netlib: http://www.netlib.org/lp/data. Accessed 2 Nov 2011 (Online)
Numpy: http://www.numpy.org. Accessed 1 Sept 2013 (Online)
Padberg, M., Rinaldi, G.: A branch-and-cut algorithm for the resolution of large-scale symmetric traveling salesman problems. SIAM Rev. 33, 60–100 (1991). doi:10.1137/1033004. (ISSN 0036-1445)
PuLP: An LP modeler written in Python. http://code.google.com/p/pulp-or. Accessed 2 Nov 2011
Python. http://www.python.org. Accessed 1 Sept 2013 (Online)
Raymond, V.,Soumis, F., Metrane, A., Desrosiers, J.: Positive edge: a pricing criterion for the identification of non-degenerate simplex pivots. In: Cahier du GERAD G-2010-61. GERAD, Montreal (2010)
Raymond, V., Soumis, F., Orban, D.: A new version of the improved primal simplex for degenerate linear programs. Comput. OR 37(1), 91–98 (2010). doi:10.1016/j.cor.2009.03.020
Scipy: http://www.scipy.org. Accessed 1 Sept 2013 (Online)
Silva, P.J.S.: Pycoin, interface to some COIN packages (2005). http://www.ime.usp.br/~pjssilva/software.html. Accessed 2 Nov 2011 (Online)
SoPlex: An open-source LP solver. http://soplex.zib.de. Accessed 1 Sept 2013 (Online)
Terlaky, T., Zhang, S.: Pivot rules for linear programming: a survey on recent theoretical developments. Ann. Oper. Res. 46–47, 203–233 (1993). doi:10.1007/BF02096264. (ISSN 0254-5330)
Towhidi, M., Orban, D.: Customizing the solution process of coin-or’s linear solvers with python. In: Cahier du GERAD G-2012-07. GERAD, Montreal (2012)
Wächter, A., Biegler, L.T.: On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math. Programm. 106, 25–57 (2006). doi:10.1007/s10107-004-0559-y. https://projects.COIN-OR.org/Ipopt
Author information
Authors and Affiliations
Corresponding author
Additional information
Research partially supported by NSERC Discovery Grant 299010-04.
Rights and permissions
About this article
Cite this article
Towhidi, M., Orban, D. Customizing the solution process of COIN-OR’s linear solvers with Python. Math. Prog. Comp. 8, 377–391 (2016). https://doi.org/10.1007/s12532-015-0094-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12532-015-0094-2