Skip to main content

Python interface and modeling environment for SCIP

Project description

PySCIPOpt

This project provides an interface from Python to the SCIP Optimization Suite. Starting from v8.0.3, SCIP uses the Apache2.0 license. If you plan to use an earlier version of SCIP, please review SCIP's license restrictions.

Gitter PySCIPOpt on PyPI Integration test coverage AppVeyor Status

Documentation

Please consult the online documentation or use the help() function directly in Python or ? in IPython/Jupyter.

The old documentation, which we are in the process of migrating from, is still more complete w.r.t. the API, and can be found here

See CHANGELOG.md for added, removed or fixed functionality.

Installation

The recommended installation method is via PyPI

pip install pyscipopt

For information on specific versions, installation via Conda, and guides for building from source, please see the online documentation.

Building and solving a model

There are several examples and tutorials. These display some functionality of the interface and can serve as an entry point for writing more complex code. Some of the common usecases are also available in the recipes sub-package. You might also want to have a look at this article about PySCIPOpt: https://opus4.kobv.de/opus4-zib/frontdoor/index/index/docId/6045. The following steps are always required when using the interface:

  1. It is necessary to import python-scip in your code. This is achieved by including the line
from pyscipopt import Model
  1. Create a solver instance.
model = Model("Example")  # model name is optional
  1. Access the methods in the scip.pxi file using the solver/model instance model, e.g.:
x = model.addVar("x")
y = model.addVar("y", vtype="INTEGER")
model.setObjective(x + y)
model.addCons(2*x - y*y >= 0)
model.optimize()
sol = model.getBestSol()
print("x: {}".format(sol[x]))
print("y: {}".format(sol[y]))

Writing new plugins

The Python interface can be used to define custom plugins to extend the functionality of SCIP. You may write a pricer, heuristic or even constraint handler using pure Python code and SCIP can call their methods using the callback system. Every available plugin has a base class that you need to extend, overwriting the predefined but empty callbacks. Please see test_pricer.py and test_heur.py for two simple examples.

Please notice that in most cases one needs to use a dictionary to specify the return values needed by SCIP.

Citing PySCIPOpt

Please cite this paper

@incollection{MaherMiltenbergerPedrosoRehfeldtSchwarzSerrano2016,
  author = {Stephen Maher and Matthias Miltenberger and Jo{\~{a}}o Pedro Pedroso and Daniel Rehfeldt and Robert Schwarz and Felipe Serrano},
  title = {{PySCIPOpt}: Mathematical Programming in Python with the {SCIP} Optimization Suite},
  booktitle = {Mathematical Software {\textendash} {ICMS} 2016},
  publisher = {Springer International Publishing},
  pages = {301--307},
  year = {2016},
  doi = {10.1007/978-3-319-42432-3_37},
}

as well as the corresponding SCIP Optimization Suite report when you use this tool for a publication or other scientific work.

Project details


Download files

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

Source Distribution

pyscipopt-5.3.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

PySCIPOpt-5.3.0-cp313-cp313-win_amd64.whl (56.8 MB view details)

Uploaded CPython 3.13 Windows x86-64

PySCIPOpt-5.3.0-cp313-cp313-manylinux_2_28_x86_64.whl (14.8 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.28+ x86-64

PySCIPOpt-5.3.0-cp313-cp313-macosx_14_0_arm64.whl (7.1 MB view details)

Uploaded CPython 3.13 macOS 14.0+ ARM64

PySCIPOpt-5.3.0-cp313-cp313-macosx_13_0_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.13 macOS 13.0+ x86-64

PySCIPOpt-5.3.0-cp312-cp312-win_amd64.whl (56.8 MB view details)

Uploaded CPython 3.12 Windows x86-64

PySCIPOpt-5.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (14.8 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

PySCIPOpt-5.3.0-cp312-cp312-macosx_14_0_arm64.whl (7.1 MB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

PySCIPOpt-5.3.0-cp312-cp312-macosx_13_0_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.12 macOS 13.0+ x86-64

PySCIPOpt-5.3.0-cp311-cp311-win_amd64.whl (56.9 MB view details)

Uploaded CPython 3.11 Windows x86-64

PySCIPOpt-5.3.0-cp311-cp311-manylinux_2_28_x86_64.whl (14.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

PySCIPOpt-5.3.0-cp311-cp311-macosx_14_0_arm64.whl (7.1 MB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

PySCIPOpt-5.3.0-cp311-cp311-macosx_13_0_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

PySCIPOpt-5.3.0-cp310-cp310-win_amd64.whl (56.9 MB view details)

Uploaded CPython 3.10 Windows x86-64

PySCIPOpt-5.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

PySCIPOpt-5.3.0-cp310-cp310-macosx_14_0_arm64.whl (7.1 MB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

PySCIPOpt-5.3.0-cp310-cp310-macosx_13_0_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

PySCIPOpt-5.3.0-cp39-cp39-win_amd64.whl (56.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

PySCIPOpt-5.3.0-cp39-cp39-manylinux_2_28_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

PySCIPOpt-5.3.0-cp39-cp39-macosx_14_0_arm64.whl (7.1 MB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

PySCIPOpt-5.3.0-cp39-cp39-macosx_13_0_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.9 macOS 13.0+ x86-64

PySCIPOpt-5.3.0-cp38-cp38-win_amd64.whl (56.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

PySCIPOpt-5.3.0-cp38-cp38-manylinux_2_28_x86_64.whl (14.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

PySCIPOpt-5.3.0-cp38-cp38-macosx_14_0_arm64.whl (7.1 MB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

PySCIPOpt-5.3.0-cp38-cp38-macosx_13_0_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.8 macOS 13.0+ x86-64

File details

Details for the file pyscipopt-5.3.0.tar.gz.

File metadata

  • Download URL: pyscipopt-5.3.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pyscipopt-5.3.0.tar.gz
Algorithm Hash digest
SHA256 8b1f1d15b59d7851eaf25b1de1123082c8304aecaf2ca624b85f52e307a2cc70
MD5 d99011a0c6f4a49a46b99eb5ea919609
BLAKE2b-256 93cd892364dd6c3f93b0acf2d68879a526998f11063a14646c510a99d55a9772

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2c1387478f9bdea427bef1fee9e07a8bdbabd8b9f365aeda3f58113daa84aa5d
MD5 1a4be52f440f24eb37e4b3e7a43cfc16
BLAKE2b-256 737a1de2072b47320b0e07248ccef30c471a2273256818e7d05c56b0b06fc4f3

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 37f45146131ee1c21dd90b407aa0b2a7ed5d79e4df950289213a6b6bf4ba86e8
MD5 9f76c059e22f14cc7a8d0357c4517859
BLAKE2b-256 8791901e142f2df49f8205f5d3fed2988eb75695411e46985b8cba52fc67daa2

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e94825f502fc40bfcbd9e543fdf325ab193375dc267f032ca1663bc0bbf8ea26
MD5 6046bc76a66528e1000253790bee4e4b
BLAKE2b-256 9be32e0057394f477cb2ce3f76cfe1261f2c1bed7b159fb9b66ccb4804321fab

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 31b69cfdd380355fc43d0b400f6db6588e6f44faaedf1b7d0652be85fa160a63
MD5 b7e5fc93a8019fd784dcdc1f843eb6fc
BLAKE2b-256 830d37d8fc0284c98b754518b0bedb2a38e40931d932e23ac99448a10ea59987

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3732b0afc29b4e85d9fffa3bdb8cd47e9b954ecbe2c6a18c51221a8ae20f415a
MD5 5ed6635fa1a2efd7c70ad6bd5f183275
BLAKE2b-256 f7bbc7b1d8c9e824d5f41017a57990d1b794d8935700bbf70fc9ba67ab81b683

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3e467a1afb9d9360aa0546c229589bf0beb57fe8afd8554efc393c469ad19b4d
MD5 a869f25efff3267211d1fbf9ad3d8800
BLAKE2b-256 222d7336664c8c44a6793275a3ae3570f645952af8e4e5c080886c1c923c19cd

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 fe9cc4501e50b9d0a415c7dabe8d4ebf02e8c0f76463a9dd6b07d8b60a683303
MD5 fd87b7b3b5e217137f4f254939aaa74e
BLAKE2b-256 a1ba1c7c25a64822cbb882116daef83680e395bdc535d6575bc5810c52bafef5

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f28aa725164c4d3d255363edbcd836d2fc3285e1d44d9f24904497b4cf0c0730
MD5 d34bdb5c78a682cf8ee721c5b0751a0b
BLAKE2b-256 be1db551f5b28f7782833e52f3b7f957370fce8ceafd3b5b170dac6cca7ffcac

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c8e67159287dae80b662a5c2e6a2411633de60a781fabf0fd991ceffcf5b75cf
MD5 3302a27abb355ddb5f9bb25b8bd1c7ac
BLAKE2b-256 8c692467b588bd568eedcad6416156c88c15185436d008e82aead40fb7501fc1

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 de780a8309edf47d6642a01a84673469297a700943085cddac308c6344f54c74
MD5 6dec86f8356811a4ee5c93376da07668
BLAKE2b-256 4518c9e36b5579693a670323faa6524ffb024b4e3ecdbc2d3fe0564686aaa0c0

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ce599c61b30f4858dee4fcf623df12cfc9d6a321500e095824eeacaae852d238
MD5 33794764af4ec2fc84a8e4166b5d8537
BLAKE2b-256 bbe3b3cd60f360e74a487893d12c4ea3f0548ef50f50425f7b5d498af37efb08

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 9e834d11b3738a50acdf3c6688651b970b8161b03db545f8f5c3e85198fcfbc9
MD5 4d37b45b8d4ccfee8e8094f330bdfda0
BLAKE2b-256 f20440c9b193774fe1ddd961d0feb25b1aef965776fddc442351284a9ad5651e

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 96e8a1cee6fde9478b8beee72947827e0e90c900f885f7404c4dcc221e0ef7cb
MD5 dac8a89b0a5959b1777f1a0c1103ef48
BLAKE2b-256 c6c106ff28b0de42947adf189c12033bd51cc076d462d5247b60aeb0f539d117

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 64ce3929d6aa747662500c9ddc6e2c10c7a37edaeda64769ef7ca36ae76a7287
MD5 13b7bc8cb802dd3e1a5ca9beb4fc180c
BLAKE2b-256 a44a7db9e25582e1026be0cb0322b3225f21f233c40efd0a6e007c804d22f35a

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 68bc58f8a8fc2d45ed532d3c9f0d5a8acc4c56a8be813d9a0c56a1782ca0074e
MD5 985138998156a11467c9d638683aaecd
BLAKE2b-256 354131f8068cc4a497f9286300c62e8325f9bd60a20fe2aa60e50b53b7ea3587

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 17fe19062f50421d8560f64b0aa08cbff25d35bd02abe210d3b483c38f9149d9
MD5 1941709b4dec4375c313e408556788fb
BLAKE2b-256 e9a58db9d7bb1d4c91b30e88cb8cbe532f1ff93bbb120b8cef5ff7fb76125cf5

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: PySCIPOpt-5.3.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 56.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for PySCIPOpt-5.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 335322323a19f84f001e403fcbf347081098ea154bd067bc0f815b436f6e985c
MD5 34d552f2dd1037363337d96d717b7f72
BLAKE2b-256 c399a84c9ffb84c1a5c075f450f037811e173fd3ee9584a551737bc55f7f0413

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dd5678f9a4a7dcbeb179296cfffef9c86ac9b47b6c2ace5d4ab12ea71f08d24e
MD5 259bc3b6a9f1e0a07b13c96b85de5d36
BLAKE2b-256 4a9557e21f57694d837647726fe0072b9db3910dfe4f9bd4fcdbf4aa8d4f6f90

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 dcc2591ade0bcf3a8d1fb2cf0582b89bfc067de32e229bc1c185eb153320e1e1
MD5 b6d50c785a6a0c80193e9624b2aa83bb
BLAKE2b-256 ef7adecbbff1323849b9bbc0bbaf0fed50eeeff23ab3b93aec6747a36f9c4846

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp39-cp39-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 11acb4a2acbfddfca9e03371d3e2a2fb94696619ad4d19a758db96067becd8ce
MD5 f842bcaae3f623b541544c3bccf29054
BLAKE2b-256 e329dd2059ea01541d5fab1288b60901ff156f4e99ecae6491cd13bdfec22423

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: PySCIPOpt-5.3.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 56.9 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for PySCIPOpt-5.3.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8d0388f05ea6fd69cd61eed855b1fd12579880c1bb0b383b25937390d123f2d3
MD5 d0b5967c8ab912cb7f71d9f051be2dc3
BLAKE2b-256 3dd0fe26fbb33faa16b2bb222293ad41aee7406450c473198bddf5330e9c7899

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8c35bc76da4f00a7ad6408e5f024aaff6ddd45658b4c4780b321cedf0078b659
MD5 aa99c634beaa1a158dd20c54f5b54ab0
BLAKE2b-256 0ebc49c9b2d0a6d7bf53cfa08a41329bb14f0761c04c9e9d49e681de9a3b1a7a

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp38-cp38-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a25a776cc577fdd17327ce6c5cf0a0a736a5b67ea7e20ec1807941de37b257aa
MD5 6b459267d516543fefddd69301c71fa3
BLAKE2b-256 8edef024669852217f386f7b5d94b89e6538bbda12a5628c2ee67b01b60e53f5

See more details on using hashes here.

File details

Details for the file PySCIPOpt-5.3.0-cp38-cp38-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for PySCIPOpt-5.3.0-cp38-cp38-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 bf756130e33f42757c82021d672a6f121c8eb6bd8512bdde2f4598d3363cee2b
MD5 c1da7392715501d5cfe4241268d806a2
BLAKE2b-256 d5be5c5807e1ff74f252c54675db916952600d7233c1065261265017c410e199

See more details on using hashes here.

Supported by

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