{"id":13449718,"url":"https://github.com/cvxpy/cvxpy","last_synced_at":"2025-08-27T13:37:50.763Z","repository":{"id":9278772,"uuid":"11110385","full_name":"cvxpy/cvxpy","owner":"cvxpy","description":"A Python-embedded modeling language for convex optimization problems.","archived":false,"fork":false,"pushed_at":"2025-03-17T15:58:44.000Z","size":209749,"stargazers_count":5663,"open_issues_count":253,"forks_count":1086,"subscribers_count":126,"default_branch":"master","last_synced_at":"2025-03-17T16:47:38.101Z","etag":null,"topics":["convex-optimization","cvxpy","mathematical-optimization","modeling-language","numerical-optimization","optimization","optimization-modeling","python"],"latest_commit_sha":null,"homepage":"https://www.cvxpy.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cvxpy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2013-07-01T23:48:58.000Z","updated_at":"2025-03-17T15:58:49.000Z","dependencies_parsed_at":"2023-12-28T06:27:52.420Z","dependency_job_id":"f2963d92-cf45-4967-9595-91c8f7bc7bca","html_url":"https://github.com/cvxpy/cvxpy","commit_stats":{"total_commits":3209,"total_committers":219,"mean_commits":14.65296803652968,"dds":"0.47429105640386415","last_synced_commit":"13c10b1a389b88d2d5a589e28e6f2063498b2938"},"previous_names":[],"tags_count":143,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvxpy%2Fcvxpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvxpy%2Fcvxpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvxpy%2Fcvxpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvxpy%2Fcvxpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvxpy","download_url":"https://codeload.github.com/cvxpy/cvxpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244075471,"owners_count":20393973,"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":["convex-optimization","cvxpy","mathematical-optimization","modeling-language","numerical-optimization","optimization","optimization-modeling","python"],"created_at":"2024-07-31T06:00:52.347Z","updated_at":"2025-08-27T13:37:50.747Z","avatar_url":"https://github.com/cvxpy.png","language":"C++","funding_links":[],"categories":["Data Science","Basic Components","C++","Basic theory","Other libraries and tools","\u003cspan id=\"head24\"\u003e3.2. Optimization\u003c/span\u003e","其他_机器学习与深度学习","Spacecraft GNC","ریاضی","General tools","**Other Resources**"],"sub_categories":["Cryptocurrencies","Fundamental libraries","Mesh tools","\u003cspan id=\"head25\"\u003e3.2.1. Metaheuristic\u003c/span\u003e","Descent And Landing","کار با زمان و تقویم","Code Repositories"],"readme":"CVXPY\n=====================\n[![Build Status](http://github.com/cvxpy/cvxpy/workflows/build/badge.svg?event=push)](https://github.com/cvxpy/cvxpy/actions/workflows/build.yml)\n![PyPI - downloads](https://img.shields.io/pypi/dm/cvxpy.svg?label=Pypi%20downloads)\n![Conda - downloads](https://img.shields.io/conda/dn/conda-forge/cvxpy.svg?label=Conda%20downloads)\n[![Discord](https://img.shields.io/badge/Chat-Discord-Blue?color=5865f2)](https://discord.gg/4urRQeGBCr)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=cvxpy_cvxpy\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=cvxpy_cvxpy)\n[![Benchmarks](http://img.shields.io/badge/benchmarked%20by-asv-blue.svg?style=flat)](https://cvxpy.github.io/benchmarks/)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/cvxpy/cvxpy/badge)](https://api.securityscorecards.dev/projects/github.com/cvxpy/cvxpy)\n\n**The CVXPY documentation is at [cvxpy.org](https://www.cvxpy.org/).**\n\n*We are building a CVXPY community on [Discord](https://discord.gg/4urRQeGBCr). Join the conversation! For issues and long-form discussions, use [Github Issues](https://github.com/cvxpy/cvxpy/issues) and [Github Discussions](https://github.com/cvxpy/cvxpy/discussions).*\n\n**Contents**\n- [Installation](#installation)\n- [Getting started](#getting-started)\n- [Issues](#issues)\n- [Community](#community)\n- [Contributing](#contributing)\n- [Team](#team)\n- [Citing](#citing)\n\n\nCVXPY is a Python-embedded modeling language for convex optimization problems. It allows you to express your problem in a natural way that follows the math, rather than in the restrictive standard form required by solvers.\n\nFor example, the following code solves a least-squares problem where the variable is constrained by lower and upper bounds:\n\n```python3\nimport cvxpy as cp\nimport numpy\n\n# Problem data.\nm = 30\nn = 20\nnumpy.random.seed(1)\nA = numpy.random.randn(m, n)\nb = numpy.random.randn(m)\n\n# Construct the problem.\nx = cp.Variable(n)\nobjective = cp.Minimize(cp.sum_squares(A @ x - b))\nconstraints = [0 \u003c= x, x \u003c= 1]\nprob = cp.Problem(objective, constraints)\n\n# The optimal objective is returned by prob.solve().\nresult = prob.solve()\n# The optimal value for x is stored in x.value.\nprint(x.value)\n# The optimal Lagrange multiplier for a constraint\n# is stored in constraint.dual_value.\nprint(constraints[0].dual_value)\n```\n\nWith CVXPY, you can model\n* convex optimization problems,\n* mixed-integer convex optimization problems,\n* geometric programs, and\n* quasiconvex programs.\n\nCVXPY is not a solver. It relies upon the open source solvers \n[Clarabel](https://github.com/oxfordcontrol/Clarabel.rs), [SCS](https://github.com/bodono/scs-python),\nand [OSQP](https://github.com/oxfordcontrol/osqp). Additional solvers are\n[available](https://www.cvxpy.org/tutorial/solvers/index.html#choosing-a-solver),\nbut must be installed separately.\n\nCVXPY began as a Stanford University research project. It is now developed by\nmany people, across many institutions and countries.\n\n\n## Installation\nCVXPY is available on PyPI, and can be installed with\n```\npip install cvxpy\n```\n\nCVXPY can also be installed with conda, using\n```\nconda install -c conda-forge cvxpy\n```\n\nCVXPY has the following dependencies:\n\n- Python \u003e= 3.11\n- Clarabel \u003e= 0.5.0\n- OSQP \u003e= 0.6.2\n- SCS \u003e= 3.2.4.post1\n- NumPy \u003e= 1.22.4\n- SciPy \u003e= 1.13.0\n\nFor detailed instructions, see the [installation\nguide](https://www.cvxpy.org/install/index.html).\n\n## Getting started\nTo get started with CVXPY, check out the following:\n* [official CVXPY tutorial](https://www.cvxpy.org/tutorial/index.html)\n* [example library](https://www.cvxpy.org/examples/index.html)\n* [API reference](https://www.cvxpy.org/api_reference/cvxpy.html)\n\n## Issues\nWe encourage you to report issues using the [Github tracker](https://github.com/cvxpy/cvxpy/issues). We welcome all kinds of issues, especially those related to correctness, documentation, performance, and feature requests.\n\nFor basic usage questions (e.g., \"Why isn't my problem DCP?\"), please use [StackOverflow](https://stackoverflow.com/questions/tagged/cvxpy) instead.\n\n## Community\nThe CVXPY community consists of researchers, data scientists, software engineers, and students from all over the world. We welcome you to join us!\n\n* To chat with the CVXPY community in real-time, join us on [Discord](https://discord.gg/4urRQeGBCr).\n* To have longer, in-depth discussions with the CVXPY community, use [Github Discussions](https://github.com/cvxpy/cvxpy/discussions).\n* To share feature requests and bug reports, use [Github Issues](https://github.com/cvxpy/cvxpy/issues).\n\nPlease be respectful in your communications with the CVXPY community, and make sure to abide by our [code of conduct](https://github.com/cvxpy/cvxpy/blob/master/CODE_OF_CONDUCT.md).\n\n## Contributing\nWe appreciate all contributions. You don't need to be an expert in convex\noptimization to help out.\n\nYou should first\ninstall [CVXPY from source](https://www.cvxpy.org/install/index.html#install-from-source).\nHere are some simple ways to start contributing immediately:\n* Read the CVXPY source code and improve the documentation, or address TODOs\n* Enhance the [website documentation](https://github.com/cvxpy/cvxpy/tree/master/doc)\n* Browse the [issue tracker](https://github.com/cvxpy/cvxpy/issues), and look for issues tagged as \"help wanted\"\n* Polish the [example library](https://github.com/cvxpy/cvxpy/tree/master/examples)\n* Add a [benchmark](https://github.com/cvxpy/cvxpy/tree/master/cvxpy/tests/test_benchmarks.py)\n\nIf you'd like to add a new example to our library, or implement a new feature,\nplease get in touch with us first to make sure that your priorities align with\nours. \n\nContributions should be submitted as [pull requests](https://github.com/cvxpy/cvxpy/pulls).\nA member of the CVXPY development team will review the pull request and guide\nyou through the contributing process.\n\nBefore starting work on your contribution, please read the [contributing guide](https://github.com/cvxpy/cvxpy/blob/master/CONTRIBUTING.md).\n\n## Team\nCVXPY is a community project, built from the contributions of many\nresearchers and engineers.\n\nCVXPY is developed and maintained by [Steven\nDiamond](https://stevendiamond.me/), [Akshay\nAgrawal](https://akshayagrawal.com), [Riley Murray](https://rileyjmurray.wordpress.com/), \n[Philipp Schiele](https://www.philippschiele.com/),\n[Bartolomeo Stellato](https://stellato.io/),\nand [Parth Nobel](https://ptnobel.github.io), with many others contributing\nsignificantly.\nA non-exhaustive list of people who have shaped CVXPY over the\nyears includes Stephen Boyd, Eric Chu, Robin Verschueren,\nJaehyun Park, Enzo Busseti, AJ Friend, Judson Wilson, Chris Dembia, and\nWilliam Zhang.\n\nFor more information about the team and our processes, see our [governance document](https://github.com/cvxpy/org/blob/main/governance.md).\n\n## Citing\nIf you use CVXPY for academic work, we encourage you to [cite our papers](https://www.cvxpy.org/resources/citing/index.html). If you use CVXPY in industry, we'd love to hear from you as well, on Discord or over email.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvxpy%2Fcvxpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvxpy%2Fcvxpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvxpy%2Fcvxpy/lists"}