Skip to main content

Python tools for Modeling and Solving Mixed-Integer Linear Programs (MIPs)

Project description

Python MIP (Mixed-Integer Linear Programming) Tools

Package website: http://python-mip.com

Python MIP is a collection of Python tools for the modeling and solution of Mixed-Integer Linear programs (MIPs). MIP syntax was inspired by Pulp. Just like CyLP it also provides access to advanced solver features like cut generation, lazy constraints, MIPstarts and solution Pools. Porting Pulp and Gurobi models should be quite easy.

Some of the main features of MIP are:

  • high level modeling: write your MIP models in Python as easily as in high level languages such as MathProg: operator overloading makes it easy to write linear expressions in Python;

  • full featured:

    • cut generators and lazy constraints: work with strong formulations with a large number of constraints by generating only the required inequalities during the branch and cut search;
    • solution pool: query the elite set of solutions found during the search;
    • MIPStart: use a problem dependent heuristic to generate initial feasible solutions for the MIP search.
  • fast: the Python MIP package calls directly the native dynamic loadable library of the installed solver using the modern python CFFI module; models are efficiently stored and optimized by the solver and MIP transparently handles all communication with your Python code; it is also compatible with the Pypy just in time compiler, meaning that you can have a much better performance, up to 25 times faster for the creation of large MIPs, than the official Gurobi python interface which only runs on CPython;

  • multi solver: Python MIP was written to be deeply integrated with the C libraries of the open-source COIN-OR Branch-&-Cut CBC solver and the commercial solver Gurobi; all details of communicating with different solvers are handled by Python-MIP and you write only one solver independent code;

  • written in modern typed Python 3 (requires Python 3.8 or newer).

Examples

Many Python-MIP examples are documented at https://docs.python-mip.com/en/latest/examples.html

The code of these examples and additional ones (published in tutorials) can be downloaded at https://github.com/coin-or/python-mip/tree/master/examples

Documentation

The full Python-MIP documentation is available at https://docs.python-mip.com/en/latest/

A PDF version is also available: https://python-mip.readthedocs.io/_/downloads/en/latest/pdf/

Mailing list

Questions, suggestions and feature request can be posted at Discussions.

Build status

PyPI version Python versions Docs CI Publish to PyPI PyPI - Downloads Current total of lines License

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mip-1.17.6.tar.gz (9.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mip-1.17.6-py3-none-any.whl (88.2 kB view details)

Uploaded Python 3

File details

Details for the file mip-1.17.6.tar.gz.

File metadata

  • Download URL: mip-1.17.6.tar.gz
  • Upload date:
  • Size: 9.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mip-1.17.6.tar.gz
Algorithm Hash digest
SHA256 9da8074b80bd3ef788513d5a214ef832916d82aa66487da11a49c7da9f89d270
MD5 2ed0f975ce0bc7e229625b043ec60c96
BLAKE2b-256 96157496ce00eafc5b99e98bb696588527754d7629f11ac6208fdc9355f6eec6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mip-1.17.6.tar.gz:

Publisher: publish.yml on coin-or/python-mip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mip-1.17.6-py3-none-any.whl.

File metadata

  • Download URL: mip-1.17.6-py3-none-any.whl
  • Upload date:
  • Size: 88.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mip-1.17.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4fb7ff5d7beacbe7d007de172306a76aff8fb36760fa63a5d88a8cb3aa6f4a57
MD5 dce91df0b054f0aa4a7785d216f7c668
BLAKE2b-256 651d0eb2531e779be687a3249e7f2ba5e465dd34611072390252e5fcf89e7fef

See more details on using hashes here.

Provenance

The following attestation bundles were made for mip-1.17.6-py3-none-any.whl:

Publisher: publish.yml on coin-or/python-mip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page