Introduction

The Python-MIP package provides tools for modeling and solving Mixed Integer Linear Programming Problems (MIPs) [Jung09] in Python. The default installation includes the COIN-OR Linear Programming Solver - CLP, which is currently the fastest open source linear programming solver and the COIN-OR Branch-and-Cut solver - CBC, a highly configurable MIP solver. It also works with the state-of-the-art Gurobi MIP solver. Python-MIP was written in modern, statically typed Python and works with the fast just-in-time Python compiler Pypy.

In the modeling layer, models can be written very concisely, as in high-level mathematical programming languages such as MathProg. Modeling examples for some applications can be viewed in Chapter 3.

Python-MIP eases the development of high-performance MIP based solvers for custom applications by providing a tight integration with the branch-and-cut algorithms of the supported solvers. Strong formulations with an exponential number of constraints can be handled by the inclusion of Cut Generators. Heuristics can be integrated for providing initial feasible solutions to the MIP solver. These features can be used in both solver engines, CBC and GUROBI, without changing a single line of code.

This document is organized as follows: in the next Chapter installation and configuration instructions for different platforms are presented. In Chapter 3 an overview of some common model creation and optimization code included. Commented examples are included in Chapter 4. Chapter 5 includes some common solver customizations that can be done to improve the performance of application specific solvers. Finally, the detailed reference information for the main classes is included in Chapter 6.

Acknowledgments

We would like to thank for the support of the Combinatorial Optimization and Decision Support (CODeS) research group in KU Leuven through the senior research fellowship of Prof. Haroldo in 2018-2019, CNPq “Produtividade em Pesquisa” grant, FAPEMIG and the GOAL research group in the Computing Department of UFOP.