{"id":34109080,"url":"https://github.com/aidagroup/regelum","last_synced_at":"2026-05-11T19:02:22.112Z","repository":{"id":355018885,"uuid":"1224967370","full_name":"aidagroup/regelum","owner":"aidagroup","description":"Framework for Modeling Phased Reactive Systems.","archived":false,"fork":false,"pushed_at":"2026-05-11T14:53:40.000Z","size":55239,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T16:36:33.821Z","etag":null,"topics":["control-systems","formal-methods","graph-execution","mkdocs","python","reactive-systems","runtime","state-machines"],"latest_commit_sha":null,"homepage":"https://aidagroup.github.io/regelum/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aidagroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2026-04-29T20:12:29.000Z","updated_at":"2026-05-11T15:04:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aidagroup/regelum","commit_stats":null,"previous_names":["aidagroup/regelum"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/aidagroup/regelum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidagroup%2Fregelum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidagroup%2Fregelum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidagroup%2Fregelum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidagroup%2Fregelum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aidagroup","download_url":"https://codeload.github.com/aidagroup/regelum/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidagroup%2Fregelum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32908529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"ssl_error","status_checked_at":"2026-05-11T17:08:45.420Z","response_time":120,"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":["control-systems","formal-methods","graph-execution","mkdocs","python","reactive-systems","runtime","state-machines"],"created_at":"2025-12-14T18:26:07.833Z","updated_at":"2026-05-11T19:02:22.105Z","avatar_url":"https://github.com/aidagroup.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg\n    src=\"https://raw.githubusercontent.com/aidagroup/regelum/main/docs/assets/logo/logo_big.png\"\n    alt=\"regelum\"\n    width=\"360\"\n  \u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://aidagroup.github.io/regelum/\"\u003e\n    \u003cimg alt=\"docs\" src=\"https://img.shields.io/badge/docs-mkdocs%20material-526CFE?logo=materialformkdocs\u0026logoColor=white\"\u003e\n  \u003c/a\u003e\n  \u003cimg alt=\"tests\" src=\"https://img.shields.io/badge/tests-pytest-0A9EDC?logo=pytest\u0026logoColor=white\"\u003e\n  \u003cimg alt=\"python\" src=\"https://img.shields.io/badge/python-3.13%2B-3776AB?logo=python\u0026logoColor=white\"\u003e\n  \u003cimg alt=\"uv\" src=\"https://img.shields.io/badge/managed%20with-uv-6A5ACD\"\u003e\n\u003c/p\u003e\n\n# regelum\n\n`regelum` is a framework for prototyping and simulating dynamic systems and\ngeneral dataflows. It introduces **Phased Reactive Systems** (PRS): systems\nthat execute one tick at a time, activate different groups of nodes in\ndifferent phases, and move between phases with explicit transitions.\n\nAny algorithm written with `regelum` can be decomposed into a graph of phases\nwith conditional transitions. Each phase is represented as a DAG of\ncomputational primitives called **nodes**: stateful computation units with two\nnamespaces, `Inputs` and `State`. A state variable written by one node can be\nused as an input of another node, while a node can also read its own previous\nstate directly in `update`.\n\n`regelum` deliberately leans on Python syntax sugar. The API is inspired by\nframeworks such as FastAPI, Typer, Pydantic, SQLModel, SQLAlchemy, FastStream,\nand others that made Python annotations, descriptors, nested classes, and\ndeclarative function signatures into compact framework DSLs. In `regelum`,\n`Node`, `State`, `Var`, `Input(src=...)`, and `update(...)` provide a concise\nway to write computation nodes while the built-in compiler/resolver derives\nthe execution order and validates the graph.\n\n## Overview\n\n- **Nodes** declare typed inputs and state variables, then compute their next\n  state in `update`.\n- **Phases** decide which node instances are active together and how control\n  moves between phases.\n- **Continuous nodes** declare ODE state and are integrated through\n  `ODESystem` phases.\n- **Compilation** resolves links, schedules nodes, and catches structural\n  mistakes before runtime: unresolved inputs, ambiguous references, invalid\n  phase graphs, and computations that cannot be guaranteed to resolve.\n\nThe best entry point is the Learn overview:\n\n- Docs: \u003chttps://aidagroup.github.io/regelum/\u003e\n- Learn overview: \u003chttps://aidagroup.github.io/regelum/concepts/\u003e\n\n## Quick Example\n\n```python\nimport regelum as rg\n\n\nclass TemperatureSensor(rg.Node):\n    class State(rg.NodeState):\n        temperature: float = rg.Var(init=19.0)\n\n    def update(self) -\u003e State:\n        return self.State(temperature=21.5)\n\n\nclass HeaterController(rg.Node):\n    class Inputs(rg.NodeInputs):\n        temperature: float = rg.Input(\n            src=TemperatureSensor.State.temperature,\n        )\n\n    class State(rg.NodeState):\n        heater_on: bool\n\n    def update(self, inputs: Inputs) -\u003e State:\n        return self.State(heater_on=inputs.temperature \u003c 22.0)\n\n\nclass HeatingCycles(rg.Node):\n    class Inputs(rg.NodeInputs):\n        heater_on: bool = rg.Input(src=HeaterController.State.heater_on)\n\n    class State(rg.NodeState):\n        count: int = rg.Var(init=0)\n\n    def update(self, inputs: Inputs, prev_state: State) -\u003e State:\n        return self.State(\n            count=prev_state.count + int(inputs.heater_on),\n        )\n\n\nsensor = TemperatureSensor(name=\"room_sensor\")\ncontroller = HeaterController(name=\"heater_controller\")\ncycles = HeatingCycles(name=\"heating_cycles\")\n\nsystem = rg.PhasedReactiveSystem(\n    phases=[\n        rg.Phase(\n            \"control\",\n            nodes=(sensor, controller, cycles),\n            transitions=(rg.Goto(rg.terminate),),\n            is_initial=True,\n        ),\n    ],\n)\n\nsystem.step()\nprint(system.read(controller.State.heater_on))\n```\n\n## Installation\n\nRecommended: use `uv`.\n\n```bash\nuv add regelum\n```\n\nFor local development from this repository:\n\n```bash\nuv sync --all-groups\nuv run pytest tests\nuv run ty check src tests\nuv run mkdocs serve\n```\n\n## Examples\n\n```bash\nuv run regelum-pendulum\nuv run marimo edit examples/free_pendulum/rg-examples-free-pendulum.py\nuv run marimo edit examples/controlled_pendulum/rg-examples-controlled-pendulum.py\nuv run regelum-video-player\nuv run regelum-instance-connect\n```\n\n## Release Process\n\nCreate a GitHub Release tagged like `v0.2.0`.\nThe publish workflow builds the package, derives the version from the tag, and\nuploads artifacts to PyPI.\n\nAfter installation, users can verify the packaged version:\n\n```python\nimport regelum\n\nprint(regelum.__version__)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidagroup%2Fregelum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faidagroup%2Fregelum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidagroup%2Fregelum/lists"}