{"id":21962427,"url":"https://github.com/scipopt/pyscipopt","last_synced_at":"2025-05-14T15:08:44.430Z","repository":{"id":38311786,"uuid":"59214089","full_name":"scipopt/PySCIPOpt","owner":"scipopt","description":"Python interface for the SCIP Optimization Suite","archived":false,"fork":false,"pushed_at":"2025-03-27T21:06:09.000Z","size":6776,"stargazers_count":865,"open_issues_count":21,"forks_count":261,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-12T22:17:06.366Z","etag":null,"topics":["cython","integer-optimization","mathematical-programming","nonlinear-optimization","python","scip"],"latest_commit_sha":null,"homepage":"https://pyscipopt.readthedocs.io/en/latest/","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scipopt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-19T14:29:21.000Z","updated_at":"2025-04-11T05:16:23.000Z","dependencies_parsed_at":"2023-02-16T18:32:10.444Z","dependency_job_id":"9f36d7fd-df8e-4cbe-b51c-4c05750db57d","html_url":"https://github.com/scipopt/PySCIPOpt","commit_stats":{"total_commits":1329,"total_committers":63,"mean_commits":"21.095238095238095","dds":0.6839729119638827,"last_synced_commit":"a854b97bcac45daff96180459d377fa5491561de"},"previous_names":["scip-interfaces/pyscipopt"],"tags_count":71,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scipopt%2FPySCIPOpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scipopt%2FPySCIPOpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scipopt%2FPySCIPOpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scipopt%2FPySCIPOpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scipopt","download_url":"https://codeload.github.com/scipopt/PySCIPOpt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637786,"owners_count":21137538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cython","integer-optimization","mathematical-programming","nonlinear-optimization","python","scip"],"created_at":"2024-11-29T10:40:05.281Z","updated_at":"2025-04-12T22:17:15.062Z","avatar_url":"https://github.com/scipopt.png","language":"Cython","readme":"PySCIPOpt\n=========\n\nThis project provides an interface from Python to the [SCIP Optimization Suite](https://www.scipopt.org/). Starting from v8.0.3, SCIP uses the [Apache2.0](https://www.apache.org/licenses/LICENSE-2.0) license. If you plan to use an earlier version of SCIP, please review [SCIP's license restrictions](https://scipopt.org/index.php#license).\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PySCIPOpt/Lobby)\n[![PySCIPOpt on PyPI](https://img.shields.io/pypi/v/pyscipopt.svg)](https://pypi.python.org/pypi/pyscipopt)\n[![Integration test](https://github.com/scipopt/PySCIPOpt/actions/workflows/integration-test.yml/badge.svg)](https://github.com/scipopt/PySCIPOpt/actions/workflows/integration-test.yml)\n[![coverage](https://img.shields.io/codecov/c/github/scipopt/pyscipopt)](https://app.codecov.io/gh/scipopt/pyscipopt/)\n[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/fsa896vkl8be79j9/branch/master?svg=true)](https://ci.appveyor.com/project/mattmilten/pyscipopt/branch/master)\n\n\nDocumentation\n-------------\n\nPlease consult the [online documentation](https://pyscipopt.readthedocs.io/en/latest/) or use the `help()` function directly in Python or `?` in IPython/Jupyter.\n\nThe old documentation, which we are in the process of migrating from,\nis still more complete w.r.t. the API, and can be found [here](https://scipopt.github.io/PySCIPOpt/docs/html/index.html)\n\nSee [CHANGELOG.md](https://github.com/scipopt/PySCIPOpt/blob/master/CHANGELOG.md) for added, removed or fixed functionality.\n\nInstallation\n------------\n\nThe recommended installation method is via PyPI\n```bash\npip install pyscipopt\n```\n\nFor information on specific versions, installation via Conda, and guides for building from source,\nplease see the [online documentation](https://pyscipopt.readthedocs.io/en/latest/install.html).\n\nBuilding and solving a model\n----------------------------\n\nThere are several [examples](https://github.com/scipopt/PySCIPOpt/blob/master/examples/finished) and\n[tutorials](https://github.com/scipopt/PySCIPOpt/blob/master/examples/tutorial). These display some functionality of the\ninterface and can serve as an entry point for writing more complex code. Some of the common usecases are also available in the [recipes](https://github.com/scipopt/PySCIPOpt/blob/master/src/pyscipopt/recipes) sub-package.\nYou might also want to have a look at this article about PySCIPOpt:\n\u003chttps://opus4.kobv.de/opus4-zib/frontdoor/index/index/docId/6045\u003e. The\nfollowing steps are always required when using the interface:\n\n1)  It is necessary to import python-scip in your code. This is achieved\n    by including the line\n\n```python\nfrom pyscipopt import Model\n```\n\n2)  Create a solver instance.\n\n```python\nmodel = Model(\"Example\")  # model name is optional\n```\n\n3)  Access the methods in the `scip.pxi` file using the solver/model\n    instance `model`, e.g.:\n\n```python\nx = model.addVar(\"x\")\ny = model.addVar(\"y\", vtype=\"INTEGER\")\nmodel.setObjective(x + y)\nmodel.addCons(2*x - y*y \u003e= 0)\nmodel.optimize()\nsol = model.getBestSol()\nprint(\"x: {}\".format(sol[x]))\nprint(\"y: {}\".format(sol[y]))\n```\n\nWriting new plugins\n-------------------\n\nThe Python interface can be used to define custom plugins to extend the\nfunctionality of SCIP. You may write a pricer, heuristic or even\nconstraint handler using pure Python code and SCIP can call their\nmethods using the callback system. Every available plugin has a base\nclass that you need to extend, overwriting the predefined but empty\ncallbacks. Please see `test_pricer.py` and `test_heur.py` for two simple\nexamples.\n\nPlease notice that in most cases one needs to use a `dictionary` to\nspecify the return values needed by SCIP.\n\nUsing PySCIPOpt?\n----------------\n\nIf your project or company is using PySCIPOpt, consider letting us know at scip@zib.de. We are always interested\nin knowing how PySCIPOpt is being used, and, given permission, would also appreciate adding your company's logo \nto our website.  \n\nIf you are creating models with some degree of complexity which don't take too long to solve, also consider\nsharing them with us. We might want to add them to [`tests/helpers/utils.py`](tests/helpers/utils.py) to help make our tests more robust, or add them to our examples.\n\nCiting PySCIPOpt\n----------------\n\nPlease cite [this paper](https://opus4.kobv.de/opus4-zib/frontdoor/index/index/docId/6045)\n```\n@incollection{MaherMiltenbergerPedrosoRehfeldtSchwarzSerrano2016,\n  author = {Stephen Maher and Matthias Miltenberger and Jo{\\~{a}}o Pedro Pedroso and Daniel Rehfeldt and Robert Schwarz and Felipe Serrano},\n  title = {{PySCIPOpt}: Mathematical Programming in Python with the {SCIP} Optimization Suite},\n  booktitle = {Mathematical Software {\\textendash} {ICMS} 2016},\n  publisher = {Springer International Publishing},\n  pages = {301--307},\n  year = {2016},\n  doi = {10.1007/978-3-319-42432-3_37},\n}\n```\nas well as the corresponding [SCIP Optimization Suite report](https://scip.zib.de/index.php#cite) when you use this tool for a publication or other scientific work.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscipopt%2Fpyscipopt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscipopt%2Fpyscipopt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscipopt%2Fpyscipopt/lists"}