{"id":20612626,"url":"https://github.com/pypsa/linopy","last_synced_at":"2026-03-04T09:00:42.199Z","repository":{"id":43453447,"uuid":"350276805","full_name":"PyPSA/linopy","owner":"PyPSA","description":"Linear optimization with N-D labeled arrays in Python","archived":false,"fork":false,"pushed_at":"2026-03-03T14:30:14.000Z","size":3876,"stargazers_count":239,"open_issues_count":71,"forks_count":74,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-03-03T18:45:49.055Z","etag":null,"topics":["cbc","cplex","glpk","gurobi","linear-optimisation","linear-optimization","optimisation","optimization","python","xarray","xpress"],"latest_commit_sha":null,"homepage":"https://linopy.readthedocs.io","language":"Python","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/PyPSA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-22T09:08:29.000Z","updated_at":"2026-03-02T07:47:13.000Z","dependencies_parsed_at":"2023-02-19T10:31:02.023Z","dependency_job_id":"9535d735-09ed-484d-8dd8-1aed525aa411","html_url":"https://github.com/PyPSA/linopy","commit_stats":{"total_commits":591,"total_committers":25,"mean_commits":23.64,"dds":"0.20812182741116747","last_synced_commit":"6abf0a5a24dba24912922f9aaef258840de0fced"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/PyPSA/linopy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyPSA%2Flinopy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyPSA%2Flinopy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyPSA%2Flinopy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyPSA%2Flinopy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyPSA","download_url":"https://codeload.github.com/PyPSA/linopy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyPSA%2Flinopy/sbom","scorecard":{"id":115255,"data":{"date":"2025-08-11","repo":{"name":"github.com/PyPSA/linopy","commit":"f9e3a5e386d41c916dea9ecc6e932d33cc01a663"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.8,"checks":[{"name":"Maintained","score":10,"reason":"10 commit(s) and 13 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":6,"reason":"Found 17/27 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/claude-code-review.yml:24","Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/claude-code-review.yml:25","Info: jobLevel 'issues' permission set to 'read': .github/workflows/claude-code-review.yml:26","Info: jobLevel 'contents' permission set to 'read': .github/workflows/claude.yml:28","Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/claude.yml:29","Info: jobLevel 'issues' permission set to 'read': .github/workflows/claude.yml:30","Info: jobLevel 'packages' permission set to 'read': .github/workflows/codeql.yml:36","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:39","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:40","Warn: no topLevel permission defined: .github/workflows/claude-code-review.yml:1","Warn: no topLevel permission defined: .github/workflows/claude.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test-models.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":5,"reason":"binaries present in source code","details":["Warn: binary detected: benchmark/scripts/leftovers/benchmarks-pypsa-eur/__pycache__/benchmark-linopy.cpython-310.pyc:1","Warn: binary detected: benchmark/scripts/leftovers/benchmarks-pypsa-eur/__pycache__/benchmark-pyomo.cpython-310.pyc:1","Warn: binary detected: benchmark/scripts/leftovers/benchmarks-pypsa-eur/__pycache__/benchmark-pypsa-linopf.cpython-310.pyc:1","Warn: binary detected: benchmark/scripts/leftovers/benchmarks-pypsa-eur/__pycache__/common.cpython-39.pyc:1","Warn: binary detected: benchmark/scripts/leftovers/benchmarks-pypsa-eur/__pycache__/plot-benchmarks.cpython-310.pyc:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/claude-code-review.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/claude-code-review.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/claude-code-review.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/claude-code-review.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/claude.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/claude.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/claude.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/claude.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-models.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test-models.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-models.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test-models.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-models.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test-models.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-models.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test-models.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-models.yml:104: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test-models.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:95: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:105: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:110: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:115: update your workflow using https://app.stepsecurity.io/secureworkflow/PyPSA/linopy/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:84","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:122","Info:   0 out of  19 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   9 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:28"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":9,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 25 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T01:03:04.809Z","repository_id":43453447,"created_at":"2025-08-16T01:03:04.809Z","updated_at":"2025-08-16T01:03:04.809Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30076935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cbc","cplex","glpk","gurobi","linear-optimisation","linear-optimization","optimisation","optimization","python","xarray","xpress"],"created_at":"2024-11-16T11:05:58.753Z","updated_at":"2026-03-04T09:00:42.183Z","avatar_url":"https://github.com/PyPSA.png","language":"Python","readme":"# linopy: Optimization with array-like variables and constraints\n\n[![PyPI](https://img.shields.io/pypi/v/linopy)](https://pypi.org/project/linopy/)\n[![License](https://img.shields.io/pypi/l/linopy.svg)](LICENSE.txt)\n[![Tests](https://github.com/PyPSA/linopy/actions/workflows/test.yml/badge.svg)](https://github.com/PyPSA/linopy/actions/workflows/test.yml)\n[![doc](https://readthedocs.org/projects/linopy/badge/?version=latest)](https://linopy.readthedocs.io/en/latest/)\n[![codecov](https://codecov.io/gh/PyPSA/linopy/branch/master/graph/badge.svg?token=TT4EYFCCZX)](https://codecov.io/gh/PyPSA/linopy)\n\n\n\n\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; **L**inear\\\n\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; **I**nteger\\\n\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; **N**on-linear\\\n\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; **O**ptimization in\\\n\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; **PY**thon\n\n**linopy** is an open-source python package that facilitates **optimization** with **real world data**. It builds a bridge between data analysis packages like [xarray](https://github.com/pydata/xarray) \u0026 [pandas](https://pandas.pydata.org/) and problem solvers like [cbc](https://projects.coin-or.org/Cbc), [gurobi](https://www.gurobi.com/) (see the full list below). **Linopy** supports **Linear, Integer, Mixed-Integer and Quadratic Programming** while aiming to make linear programming in Python easy, highly-flexible and performant.\n\n\n\n## Benchmarks\n\n**linopy** is designed to be fast and efficient. The following benchmark compares the performance of **linopy** with the alternative popular optimization packages.\n\n![Performance Benchmark](doc/benchmark_resource-overhead.png)\n\n\n## Main features\n\n**linopy** is heavily based on [xarray](https://github.com/pydata/xarray) which allows for many flexible data-handling features:\n\n* Define (arrays of) continuous or binary variables with **coordinates**, e.g. time, consumers, etc.\n* Apply **arithmetic operations** on the variables like adding, substracting, multiplying with all the  **broadcasting** potentials of xarray\n* Apply **arithmetic operations** on the **linear expressions** (combination of variables)\n* **Group terms** of a linear expression by coordinates\n* Get insight into the **clear and transparent data model**\n* **Modify** and **delete** assigned variables and constraints on the fly\n* Use **lazy operations** for large linear programs  with [dask](https://dask.org/)\n* Choose from **different commercial and non-commercial solvers**\n* Fast **import and export** a linear model using xarray's netcdf IO\n\n\n## Installation\n\nSo far **linopy** is available on the PyPI repository\n\n```bash\npip install linopy\n```\n\nor on conda-forge\n\n```bash\nconda install -c conda-forge linopy\n```\n\n## In a Nutshell\n\nLinopy aims to make optimization programs transparent and flexible. To illustrate its usage, let's consider a scenario where we aim to minimize the cost of buying apples and bananas over a week, subject to daily and weekly vitamin intake constraints.\n\n\n```python\n\u003e\u003e\u003e import pandas as pd\n\u003e\u003e\u003e import linopy\n\n\u003e\u003e\u003e m = linopy.Model()\n\n\u003e\u003e\u003e days = pd.Index([\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\"], name=\"day\")\n\u003e\u003e\u003e apples = m.add_variables(lower=0, name=\"apples\", coords=[days])\n\u003e\u003e\u003e bananas = m.add_variables(lower=0, name=\"bananas\", coords=[days])\n\u003e\u003e\u003e apples\n```\n```\nVariable (day: 5)\n-----------------\n[Mon]: apples[Mon] ∈ [0, inf]\n[Tue]: apples[Tue] ∈ [0, inf]\n[Wed]: apples[Wed] ∈ [0, inf]\n[Thu]: apples[Thu] ∈ [0, inf]\n[Fri]: apples[Fri] ∈ [0, inf]\n```\n\nAdd daily vitamin constraints\n\n```python\n\u003e\u003e\u003e m.add_constraints(3 * apples + 2 * bananas \u003e= 8, name=\"daily_vitamins\")\n```\n```\nConstraint `daily_vitamins` (day: 5):\n-------------------------------------\n[Mon]: +3 apples[Mon] + 2 bananas[Mon] ≥ 8\n[Tue]: +3 apples[Tue] + 2 bananas[Tue] ≥ 8\n[Wed]: +3 apples[Wed] + 2 bananas[Wed] ≥ 8\n[Thu]: +3 apples[Thu] + 2 bananas[Thu] ≥ 8\n[Fri]: +3 apples[Fri] + 2 bananas[Fri] ≥ 8\n```\n\nAdd weekly vitamin constraint\n\n```python\n\u003e\u003e\u003e m.add_constraints((3 * apples + 2 * bananas).sum() \u003e= 50, name=\"weekly_vitamins\")\n```\n```\nConstraint `weekly_vitamins`\n----------------------------\n+3 apples[Mon] + 2 bananas[Mon] + 3 apples[Tue] ... +2 bananas[Thu] + 3 apples[Fri] + 2 bananas[Fri] ≥ 50\n```\n\nDefine the prices of apples and bananas and the objective function\n\n```python\n\u003e\u003e\u003e apple_price = [1, 1.5, 1, 2, 1]\n\u003e\u003e\u003e banana_price = [1, 1, 0.5, 1, 0.5]\n\u003e\u003e\u003e m.objective = apple_price * apples + banana_price * bananas\n```\n\nFinally, we can solve the problem and get the optimal solution:\n\n```python\n\u003e\u003e\u003e m.solve()\n\u003e\u003e\u003e m.objective.value\n```\n```\n17.166\n```\n\n... and display the solution as a pandas DataFrame\n```python\n\u003e\u003e\u003e m.solution.to_pandas()\n```\n```\n        apples  bananas\nday\nMon    2.667      0\nTue    0          4\nWed    0          9\nThu    0          4\nFri    0          4\n```\n## Supported solvers\n\n**linopy** supports the following solvers\n\n* [Cbc](https://projects.coin-or.org/Cbc)\n* [GLPK](https://www.gnu.org/software/glpk/)\n* [HiGHS](https://highs.dev/)\n* [Gurobi](https://www.gurobi.com/)\n* [Xpress](https://www.fico.com/en/products/fico-xpress-solver)\n* [Cplex](https://www.ibm.com/de-de/analytics/cplex-optimizer)\n* [MOSEK](https://www.mosek.com/)\n* [COPT](https://www.shanshu.ai/copt)\n* [cuPDLPx](https://github.com/MIT-Lu-Lab/cuPDLPx)\n* [Knitro](https://www.artelys.com/solvers/knitro/)\n\nNote that these do have to be installed by the user separately.\n\n## Development Setup\n\nTo set up a local development environment for linopy and to run the same tests that are run in the CI, you can run:\n\n```sh\npython -m venv venv\nsource venv/bin/activate\npip install uv\nuv pip install -e .[dev,solvers]\npytest\n```\n\nThe `-e` flag of the install command installs the `linopy` package in editable mode, which means that the virtualenv (and thus the tests) will run the code from your local checkout.\n\n## Citing Linopy\n\nIf you use Linopy in your research, please cite the following paper:\n\n- Hofmann, F., (2023). Linopy: Linear optimization with n-dimensional labeled variables.\nJournal of Open Source Software, 8(84), 4823, [https://doi.org/10.21105/joss.04823](https://doi.org/10.21105/joss.04823)\n\nA BibTeX entry for LaTeX users is\n\n```latex\n@article{Hofmann2023,\n    doi = {10.21105/joss.04823},\n    url = {https://doi.org/10.21105/joss.04823},\n    year = {2023}, publisher = {The Open Journal},\n    volume = {8},\n    number = {84},\n    pages = {4823},\n    author = {Fabian Hofmann},\n    title = {Linopy: Linear optimization with n-dimensional labeled variables},\n    journal = {Journal of Open Source Software}\n}\n```\n\n\n## License\n\nCopyright 2021 Fabian Hofmann\n\n\n\nThis package is published under MIT license. See [LICENSE.txt](LICENSE.txt) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpypsa%2Flinopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpypsa%2Flinopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpypsa%2Flinopy/lists"}