pyscipopt

Python interface for the SCIP Optimization Suite

https://github.com/scipopt/pyscipopt

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    12 of 74 committers (16.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.1%) to scientific vocabulary

Keywords

cython integer-optimization mathematical-programming nonlinear-optimization python scip

Keywords from Contributors

interactive closember transformers mesh interpretability gym-environment sequences generic projection polynomial
Last synced: 6 months ago · JSON representation ·

Repository

Python interface for the SCIP Optimization Suite

Basic Info
Statistics
  • Stars: 915
  • Watchers: 26
  • Forks: 269
  • Open Issues: 37
  • Releases: 27
Topics
cython integer-optimization mathematical-programming nonlinear-optimization python scip
Created almost 10 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Code of conduct Citation

README.md

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:

bash pip install pyscipopt

To avoid interfering with system packages, it's best to use a virtual environment:

bash python3 -m venv venv # creates a virtual environment called venv source venv/bin/activate # activates the environment. On Windows use: venv\Scripts\activate pip install pyscipopt Remember to activate the environment (source venv/bin/activate or equivalent) in each terminal session where you use PySCIPOpt. Note that some configurations require the use of virtual environments.

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

python from pyscipopt import Model

2) Create a solver instance.

python model = Model("Example") # model name is optional

3) Access the methods in the scip.pxi file using the solver/model instance model, e.g.:

python 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.

Using PySCIPOpt?

If your project or company is using PySCIPOpt, consider letting us know at scip@zib.de. We are always interested in knowing how PySCIPOpt is being used, and, given permission, would also appreciate adding your company's logo to our website.

If you are creating models with some degree of complexity which don't take too long to solve, also consider sharing them with us. We might want to add them to tests/helpers/utils.py to help make our tests more robust, or add them to our examples.

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.

Owner

  • Name: scipopt
  • Login: scipopt
  • Kind: organization

Collection of software around the SCIP Optimization Suite (scipopt.org)

Citation (CITATION.bib)

@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},
}

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,772
  • Total Committers: 74
  • Avg Commits per committer: 23.946
  • Development Distribution Score (DDS): 0.649
Past Year
  • Commits: 154
  • Committers: 12
  • Avg Commits per committer: 12.833
  • Development Distribution Score (DDS): 0.526
Top Committers
Name Email Commits
Matthias Miltenberger m****r@z****e 622
Joao-Dionisio u****0@u****t 159
Mark Turner t****r@z****e 130
Mohammed Ghannam m****m@g****m 113
Felipe Serrano s****o@z****e 96
Robert Schwarz m****l@r****t 76
Christoph Graczyk g****k@z****e 72
Stephen J. Maher s****3@l****k 55
Franziska Schloesser s****r@z****e 47
Benjamin Mueller b****r@z****e 29
Stephen J. Maher s****r@e****k 27
Roberto Amabile r****e@r****e 27
Robert Schwarz s****z@z****e 24
Yori Zwols y****i@g****m 19
Daniel Rehfeldt r****t@z****e 18
ansgar 2****g 16
Travis Deployment Bot d****y@t****g 15
AntoinePrv A****v 15
Peter Enenkel p****b@g****m 14
Matthias Koeppe m****e@m****u 13
Benjamin Mueller b****8@g****m 12
Connor Duncan c****n@i****m 10
Moritz Firsching m****z@m****e 10
Ambros Gleixner g****r@z****e 10
Mueller b****h@o****e 10
Marc Pfetsch p****h@m****e 9
Yori Zwols y****s@g****m 8
lascavana l****o@g****m 8
Steffan Schlein s****n@r****e 7
Julian Manns m****s@z****e 6
and 44 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 263
  • Total pull requests: 262
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 165
  • Total pull request authors: 37
  • Average comments per issue: 4.52
  • Average comments per pull request: 1.98
  • Merged pull requests: 203
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 63
  • Pull requests: 129
  • Average time to close issues: 26 days
  • Average time to close pull requests: 6 days
  • Issue authors: 39
  • Pull request authors: 18
  • Average comments per issue: 3.57
  • Average comments per pull request: 2.16
  • Merged pull requests: 92
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • Joao-Dionisio (18)
  • abb-omidi (15)
  • Zeroto521 (8)
  • adover134 (6)
  • fengshaoA (6)
  • prachishah6795 (5)
  • kkazda (4)
  • mmghannam (4)
  • cjrodriguez98 (3)
  • rlacjfjin (3)
  • vvvol (3)
  • dzmitry-lahoda (3)
  • JPelda (3)
  • andreafresa (3)
  • Opt-Mucca (3)
Pull Request Authors
  • Joao-Dionisio (123)
  • Opt-Mucca (66)
  • mmghannam (51)
  • mattmilten (13)
  • mkoeppe (11)
  • ju-manns (9)
  • pfetsch (6)
  • DominikKamp (5)
  • sirenard (4)
  • chrhansk (4)
  • ctdunc (4)
  • a1ex-siege (4)
  • fserra (4)
  • Zeroto521 (4)
  • lidingxu (3)
Top Labels
Issue Labels
feature (15) bug (14) question (7) enhancement (5) installation (4) help wanted (3) doc (3) macOS (1) duplicate (1) performance (1)
Pull Request Labels
feature (3) dependencies (2) help wanted (2)

Packages

  • Total packages: 2
  • Total downloads: unknown
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 17
  • Total maintainers: 1
spack.io: py-pyscipopt

Python interface for the SCIP Optimization Suite

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 6.6%
Stargazers count: 9.4%
Average: 18.3%
Dependent packages count: 57.3%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: pyscipopt
  • Versions: 16
  • Dependent Packages: 1
  • Dependent Repositories: 1
Rankings
Forks count: 12.1%
Stargazers count: 16.0%
Average: 20.4%
Dependent repos count: 24.4%
Dependent packages count: 29.0%
Last synced: 6 months ago

Dependencies

.github/workflows/integration-test.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/test-release.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/update-packages-and-documentation.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
setup.py pypi
  • wheel *