{"id":16499749,"url":"https://github.com/blegat/switchonsafety.jl","last_synced_at":"2025-03-16T18:32:23.628Z","repository":{"id":37513958,"uuid":"69153136","full_name":"blegat/SwitchOnSafety.jl","owner":"blegat","description":"Julia Package for computing [controlled] invariant sets of Hybrid Systems using Sum Of Squares Programming","archived":false,"fork":false,"pushed_at":"2024-08-14T16:42:00.000Z","size":3395,"stargazers_count":22,"open_issues_count":7,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-22T21:36:55.413Z","etag":null,"topics":["julia"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blegat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"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-09-25T08:44:30.000Z","updated_at":"2024-08-14T16:37:25.000Z","dependencies_parsed_at":"2024-01-20T11:32:00.300Z","dependency_job_id":"b5a21c88-f316-42f8-8982-14f61069e3c5","html_url":"https://github.com/blegat/SwitchOnSafety.jl","commit_stats":{"total_commits":296,"total_committers":5,"mean_commits":59.2,"dds":0.03378378378378377,"last_synced_commit":"f3b2fecf174bfb256a42ac3f4b3a5ead9073150b"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blegat%2FSwitchOnSafety.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blegat%2FSwitchOnSafety.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blegat%2FSwitchOnSafety.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blegat%2FSwitchOnSafety.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blegat","download_url":"https://codeload.github.com/blegat/SwitchOnSafety.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826783,"owners_count":20354220,"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":["julia"],"created_at":"2024-10-11T14:54:16.401Z","updated_at":"2025-03-16T18:32:18.596Z","avatar_url":"https://github.com/blegat.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Switch On Safety (SOS)\n\n| **Documentation** | **Build Status** | **Zenodo** |\n|:-----------------:|:----------------:|:----------------------:|\n| [![][docs-stable-img]][docs-stable-url] | [![Build Status][build-img]][build-url] | [![DOI][zenodo-img]][zenodo-url] |\n| [![][docs-latest-img]][docs-latest-url] | [![Codecov branch][codecov-img]][codecov-url] | |\n\n[\u003cimg src=\"examples/FinConjCounterEx.png\" height=\"360\"\u003e](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/Finiteness_conjecture_counterexample.ipynb)\n\nThis packages implements methods for computing invariant sets using [Sum Of Squares Programming](https://github.com/JuliaOpt/SumOfSquares.jl).\nIt supports:\n* Systems defined in [MathematicalSystems.jl](https://github.com/JuliaReach/MathematicalSystems.jl).\n* Hybrid Systems defined in [HybridSystems.jl](https://github.com/blegat/HybridSystems.jl).\n\nIt also includes utilities for approximation the [Joint Spectral Radius](https://link.springer.com/book/10.1007%2F978-3-540-95980-9).\n\n## Installation\n\nThe package currently requires Julia v1.0, you can download it [here](https://julialang.org/downloads/).\nOnce Julia is installed, simply launch the REPL an type\n```julia\n] add SwitchOnSafety\n```\n\n## Examples\n\nExample notebooks are available in the [`examples` folder](https://github.com/blegat/SwitchOnSafety.jl/tree/master/examples).\nWe link them below with the literature.\n\n### Reproducing\n\nThe linked notebooks reproduce the results of the following papers:\n\n* [LTJ18] B. Legat, P. Tabuada, R. M. Jungers.\n[Computing controlled invariant sets for hybrid systems with applications to model-predictive control](https://www.sciencedirect.com/science/article/pii/S2405896318311480),\nIFAC-PapersOnLine, Volume 51, Issue 16, **2018**, Pages 193-198, ISSN 2405-8963,\n[https://doi.org/10.1016/j.ifacol.2018.08.033](https://doi.org/10.1016/j.ifacol.2018.08.033):\n[Figure 4 and 5](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/cruise_control.ipynb),\n[Figure 6](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/model_predictive_control.ipynb).\n* [LJP17] B. Legat, R. M. Jungers, and P. A. Parrilo.\n[Certifying unstability of Switched Systems using Sum of Squares Programming](https://arxiv.org/abs/1710.01814),\narXiv preprint arXiv:1710.01814, **2017**:\n[running example](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/LPJ17.ipynb),\n[Example 4.3](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/LPJ17e43.ipynb).\n\n### Exploring\n\nThe linked notebooks explores the examples of the following papers using this\npackage:\n\n* [AJPR14] A. Ahmadi, R. Jungers, P. Parrilo and M. Roozbehani,\n*Joint spectral radius and path-complete graph Lyapunov functions.*\nSIAM J. CONTROL OPTIM 52(1), 687-717, **2014**:\n[Example 5.4](https://blegat.github.io/SwitchOnSafety.jl/latest/generated/AJPR14e54/).\n* [AP12] A. Ahmadi, and P. Parrilo\n*Joint spectral radius of rank one matrices and the maximum cycle mean problem.*\nCDC, 731-733, **2012**:\n[Example 2.1](https://blegat.github.io/SwitchOnSafety.jl/latest/generated/AP12e21/).\n* [AS98] Ando, T. and Shih, M.-h.\n*Simultaneous Contractibility*.\nSIAM Journal on Matrix Analysis \u0026 Applications, **1998**, 19, 487:\n[construction](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/LPJ17e43.ipynb).\n* [BTV03] V. D. Blondel, J. Theys and A. A. Vladimirov.\n*An elementary counterexample to the finiteness conjecture*,\nSIAM Journal on Matrix Analysis and Applications, **2003**. 24, 963-970:\n[the counterexample](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/Finiteness_conjecture_counterexample.ipynb).\n* [GZ05] N. Guglielmi and M. Zennaro.\n*Polytope norms and related algorithms for the computation of the joint spectral radius*.\n44th IEEE Conference on Decision and Control, and European Control Conference, **2005**, pp. 3007-3012:\n[Section V](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/Finiteness_conjecture_counterexample.ipynb).\n* [GZ08] N. Guglielmi and M. Zennaro.\n*An algorithm for finding extremal polytope norms of matrix families*.\nLinear Algebra and its Applications, **2008**, 428(10), 2265-2282:\n[Section 5](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/Finiteness_conjecture_counterexample.ipynb).\n* [GP13] N. Guglielmi and V. Protasov.\n*Exact computation of joint spectral characteristics of linear operators*.\nFoundations of Computational Mathematics 13.1, **2013**, 37-97.\n[Example 1](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/Finiteness_conjecture_counterexample.ipynb).\n[Example 2](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/Finiteness_conjecture_counterexample.ipynb).\n* [HMST11] K. G. Hare, I. D Morris, N. Sidorov and J. Theys,\n*An explicit counterexample to the Lagarias–Wang finiteness conjecture*.\nAdvances in Mathematics, **2011**, 226(6), 4667-4701:\n[the counterexample](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/Finiteness_conjecture_counterexample.ipynb).\n* [JCG14] R. Jungers, A. Cicone and N. Guglielmi,\n*Lifted polytope methods for computing the joint spectral radius.*\nSIAM Journal on Matrix Analysis and Applications, SIAM, **2014**, 35, 391-410:\n[Example 6.1](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/JCG14e61.ipynb),\n[Example 6.3](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/JCG14e63.ipynb).\n* [PJ08] P. Parrilo and A. Jadbabaie.\n*Approximation of the joint spectral radius using sum of squares*.\nLinear Algebra and its Applications, Elsevier, **2008**, 428, 2385-2402:\n[Example 2.8](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/LPJ17e43.ipynb),\n[Example 5.4](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/PJ08e54.ipynb).\n* [P17] M. Philippe.\n*Path-Complete Methods and Analysis of Constrained Switching Systems*\nDoctoral dissertation, UCLouvain, **2017**:\n[Example 2.50](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/LPJ17.ipynb),\n[Example 2.52](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/Consensus.ipynb).\n* [PEDJ16] M. Philippe, R. Essick, G. E. Dullerud and R. M. Jungers.\n*Stability of discrete-time switching systems with constrained switching sequences.*\nAutomatica, 72:242-250, **2016**:\n[Section 4](https://github.com/blegat/SwitchOnSafety.jl/blob/master/examples/LPJ17.ipynb),\n\n## How to cite\n\nFor the `soslyapb` and `sosbuildsequence` functions, cite:\n```bibtex\n@Article{legat2020certifying,\n  author    = {Legat, Beno\\^it and Parrilo, Pablo A. and Jungers, Rapha\\\"el M.},\n  journal   = {{SIAM} Journal on Control and Optimization},\n  title     = {Certifying Unstability of Switched Systems Using Sum of Squares Programming},\n  year      = {2020},\n  month     = jan,\n  number    = {4},\n  pages     = {2616--2638},\n  volume    = {58},\n  doi       = {10.1137/18M1173460},\n  publisher = {Society for Industrial {\\\u0026} Applied Mathematics ({SIAM})},\n}\n```\nand for the lower bound obtained by `soslyapb`, see:\n```bibtex\n@Article{legat2019entropy,\n  author    = {Beno\\^it Legat and Pablo A. Parrilo and Rapha\\\"el M. Jungers},\n  title     = {An entropy-based bound for the computational complexity of a switched system},\n  journal   = {IEEE Transactions on Automatic Control},\n  year      = {2019},\n  doi       = {10.1109/TAC.2019.2902625},\n  publisher = {IEEE},\n}\n```\n\nFor the `getis` and `fillis!` functions with ellipsoids or polysets, cite:\n```bibtex\n@InProceedings{legat2018computing,\n  author   = {Beno\\^it Legat and Paulo Tabuada and Rapha\\\"el M. Jungers},\n  title    = {Computing controlled invariant sets for hybrid systems with applications to model-predictive control},\n  year     = {2018},\n  volume   = {51},\n  number   = {16},\n  pages    = {193--198},\n  note     = {6th IFAC Conference on Analysis and Design of Hybrid Systems ADHS 2018},\n  doi      = {https://doi.org/10.1016/j.ifacol.2018.08.033},\n  issn     = {2405-8963},\n  journal  = {IFAC-PapersOnLine},\n  keywords = {Controller Synthesis, Set Invariance, LMIs, Scalable Methods},\n  url      = {http://www.sciencedirect.com/science/article/pii/S2405896318311480},\n}\n```\nor with piecewise semi-ellipsoids, cite:\n```bibtex\n@Article{legat2020piecewise,\n  author    = {Beno{\\^\\i}t Legat and Sa{\\v{s}}a V. Rakovi{\\'c} and Rapha{\\\"e}l M. Jungers},\n  journal   = {{IEEE} Control Systems Letters},\n  title     = {Piecewise Semi-Ellipsoidal Control Invariant Sets},\n  year      = {2021},\n  month     = jul,\n  number    = {3},\n  pages     = {755--760},\n  volume    = {5},\n  doi       = {10.1109/LCSYS.2020.3005326},\n  publisher = {Institute of Electrical and Electronics Engineers ({IEEE})},\n}\n```\n\n[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg\n[docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg\n[docs-stable-url]: https://blegat.github.io/SwitchOnSafety.jl/stable\n[docs-latest-url]: https://blegat.github.io/SwitchOnSafety.jl/latest\n\n[build-img]: https://github.com/blegat/SwitchOnSafety.jl/workflows/CI/badge.svg?branch=master\n[build-url]: https://github.com/blegat/SwitchOnSafety.jl/actions?query=workflow%3ACI\n[codecov-img]: http://codecov.io/github/blegat/SwitchOnSafety.jl/coverage.svg?branch=master\n[codecov-url]: http://codecov.io/github/blegat/SwitchOnSafety.jl?branch=master\n\n[zenodo-url]: https://doi.org/10.5281/zenodo.3234046\n[zenodo-img]: https://zenodo.org/badge/DOI/10.5281/zenodo.3234046.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblegat%2Fswitchonsafety.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblegat%2Fswitchonsafety.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblegat%2Fswitchonsafety.jl/lists"}