{"id":30754384,"url":"https://github.com/cvxpy/cvxkerb","last_synced_at":"2025-09-04T09:10:08.216Z","repository":{"id":175641301,"uuid":"654258117","full_name":"cvxpy/cvxkerb","owner":"cvxpy","description":"Controlling Self-Landing Rockets Using CVXPY","archived":false,"fork":false,"pushed_at":"2023-08-27T23:52:53.000Z","size":3189,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-03-25T20:06:59.940Z","etag":null,"topics":["control","convex-optimization","cvxpy","rocket"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-15T18:15:40.000Z","updated_at":"2024-03-07T08:52:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"df27e9d9-067f-4338-98ba-182294ba258a","html_url":"https://github.com/cvxpy/cvxkerb","commit_stats":{"total_commits":24,"total_committers":3,"mean_commits":8.0,"dds":"0.41666666666666663","last_synced_commit":"2878078698a876d7c2b1f7cf9491d7c251a8a519"},"previous_names":["cvxpy/cvxkerb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cvxpy/cvxkerb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvxpy%2Fcvxkerb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvxpy%2Fcvxkerb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvxpy%2Fcvxkerb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvxpy%2Fcvxkerb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvxpy","download_url":"https://codeload.github.com/cvxpy/cvxkerb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvxpy%2Fcvxkerb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273581326,"owners_count":25131393,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["control","convex-optimization","cvxpy","rocket"],"created_at":"2025-09-04T09:09:16.621Z","updated_at":"2025-09-04T09:10:08.108Z","avatar_url":"https://github.com/cvxpy.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Controlling Self-Landing Rockets Using CVXPY\n\nThis repository contains the installation instructions for a tutorial at SciPy 2023 in Austin, TX. The tutorial will be held on July 10, 2023.\nWe will provide additional materials here before the tutorial.\n\nWe're excited to see you there and hope you enjoy the tutorial!  \nThe CVXPY Team\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"media/badge.png\" alt= “Badge” width=\"50%\"\u003e\n\u003c/p\u003e\n\n\n## Installation\nTo follow along with the tutorial, you will need to install the following packages, ideally in a fresh virtual environment:\n```\ncvxpy\nscipy\nmatplotlib\n```\nCVXPY currently supports Python 3.7-3.11. We are using Python 3.8 for this tutorial, but any of these versions should work.\n\n\u003cdetails\u003e\n  \u003csummary\u003eVerify installation\u003c/summary\u003e\n\nTo verify your installation, run the following commands in a Python interpreter:\n```py\nimport cvxpy as cp\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# Minimize sum of coordinates subject to the unit circle constraint.\nx = cp.Variable(2)\nconstraints = [cp.norm(x, 2) \u003c= 1]\nobj = cp.Minimize(cp.sum(x))\nprob = cp.Problem(obj, constraints)\nprob.solve()\nprint(\"status:\", prob.status)\nprint(\"optimal value\", prob.value)\nprint(\"optimal var\", x.value)\n\n# Plot the solution.\nfig, ax = plt.subplots(figsize=(4, 4))\ncirc = plt.Circle((0, 0), radius=1, edgecolor='b', facecolor='None')\nax.add_patch(circ)\nplt.arrow(0, 0, -np.sqrt(.5) + .1, -np.sqrt(.5) + .1, head_width=0.05, head_length=0.1)\nplt.scatter(x.value[0], x.value[1])\nplt.show()\n```\nThis should produce the following output:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"media/hello_world.png\" alt= “Hello World” width=\"50%\"\u003e\n\u003c/p\u003e\n\u003c/details\u003e\n\n### Binder and Codespace\nYou can also run the notebooks on binder or in a codespace  \n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/cvxpy/cvxkerb/HEAD)  \n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/cvxgrp/cvxmarkowitz)\n\n### Optional: KSP\nIf you have the Kerbal Space Program installed, you can optionally install kRPC.\nThis will allow you to run the code in the `ksp_landing.py` file (will be provided during the tutorial), which uses CVXPY to control a rocket in KSP.\nTo use kRPC, you need the client as well as the server.\nThe client can be installed via pip\n```\npip install krpc==0.5.3\n```\n\nFor the server, you can choose from the installation options provided in the [kRPC documentation](https://krpc.github.io/krpc/getting-started.html).\nIn our case, we downloaded the prebuilt binaries from the [GitHub release](https://github.com/krpc/krpc/releases/tag/v0.5.2) and extracted them to the KSP `GameData` directory.\nNote: Use the exact linked release for `v.0.5.2` (even though the pip install is `0.5.3`), as the `0.5.3` release does not contain the server build.\nWe are using KSP 1.12.5 for this tutorial.\n\n## Tutorial outline\n### [Introduction](https://github.com/cvxpy/cvxkerb/blob/main/slides/intro.pdf) [30 min]\n\n- Explanation of the tutorial's purpose and goals\n- Explanation of the importance of self-landing rockets\n- A brief overview of CVXPY\n\n### [Getting started with CVXPY](https://github.com/cvxpy/cvxkerb/blob/main/slides/cvxpy_intro.pdf) [30 min]\n\n- A single rule for composing convex functions\n- The working principles of CVXPY\n- Creating a simple optimization problems\n\n### [Formulating the rocket landing problem](https://github.com/cvxpy/cvxkerb/blob/main/slides/landing_problem.pdf) [60 min]\n\n- Identifying the problem's parameters\n- Developing the objective function and constraints\n- Specifying the optimization problem in CVXPY\n\n### [Solving the problem](https://github.com/cvxpy/cvxkerb/blob/main/notebooks/solving_the_problem_solution.ipynb) [15 min]\n\n- Using CVXPY to solve the optimization problem\n- Interpreting the results\n\n### [The mission](https://github.com/cvxpy/cvxkerb/blob/main/slides/mission.pdf) [60 min]\n\n- Introduction to the Kerbal Space Program and kRPC\n- Using CVXPY to control a rocket in KSP\n- Launch the rocket and land back on the launchpad\n\n### [Advanced features of CVXPY](https://github.com/cvxpy/cvxkerb/blob/main/slides/advanced.pdf) [30 min]\n\n- Performance improvements via parameters (DPP)\n- Using CVXPYgen for implementations in embedded systems\n- Fastest descent via quasiconvex optimization (DQCP)\n\n### [Conclusion](https://github.com/cvxpy/cvxkerb/blob/main/slides/conclusion.pdf) [15 min]\n\n- Recap of the tutorial's content and the importance of convex optimization and CVXPY in solving real-world problems\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvxpy%2Fcvxkerb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvxpy%2Fcvxkerb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvxpy%2Fcvxkerb/lists"}