GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - aidagroup/regelum: Framework for Modeling Phased Reactive Systems.

BranchesTags
Open more actions menu

Latest commit

 

History

98 Commits
98 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
examples
examples
 
 
src/regelum
src/regelum
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.python-version
.python-version
 
 
CITATION.cff
CITATION.cff
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
mkdocs.yml
mkdocs.yml
 
 
pyproject.toml
pyproject.toml
 
 
uv.lock
uv.lock
 
 

Repository files navigation

regelum

docs tests python uv

regelum

regelum is a framework for designing and simulating dynamic systems, feedback loops, DAGs, and dataflows as Phased Reactive Systems (PRS). A PRS has two levels of abstraction: low-level computational primitives called nodes, and high-level execution stages called phases. Nodes declare Inputs for values read from other nodes or system sources and State for values they own and publish; phases group node instances into executable slices, resolve their dependency graph, and move execution through explicit transitions. These transitions can be unconditional or conditional, so execution can branch to different phases depending on current system state.

The API is intentionally built from Python's own language features: type annotations, nested classes, descriptors, declarative function signatures, operator overloading, and ordinary Python objects. It is inspired by frameworks such as FastAPI, Typer, Pydantic, SQLModel, SQLAlchemy, and FastStream. The goal is to make system models look like regular Python while still giving the compiler enough structure to resolve dependencies, validate the graph, schedule execution, and integrate continuous dynamics.

The best entry point is the Learn overview:

  • Docs: https://aidagroup.github.io/regelum/
  • Learn overview: https://aidagroup.github.io/regelum/latest/concepts/

Quick Example

import random

import regelum as rg


class TemperatureSensor(rg.Node):
    class State(rg.NodeState):
        temperature: float

    def update(self) -> State:
        return self.State(temperature=round(random.uniform(18.0, 26.0), 1))


class HeaterController(rg.Node):
    class Inputs(rg.NodeInputs):
        temperature: float = rg.src(TemperatureSensor.State.temperature)

    class State(rg.NodeState):
        heater_on: bool

    def update(self, inputs: Inputs) -> State:
        return self.State(heater_on=inputs.temperature < 22.0)


class HeatingCycles(rg.Node):
    class State(rg.NodeState):
        count: int = rg.var(init=0)

    def update(
        self,
        prev_state: State,
        is_heater_on: bool = rg.src(HeaterController.State.heater_on),
    ) -> State:
        return self.State(
            count=prev_state.count + int(is_heater_on),
        )


sensor = TemperatureSensor()
controller = HeaterController()
cycles = HeatingCycles()

system = rg.PhasedReactiveSystem(
    phases=[
        rg.Phase(
            "control",
            nodes=(sensor, controller, cycles),
            transitions=(rg.Goto(rg.terminate),),
            is_initial=True,
        ),
    ],
)

system.step()
print(system.read(controller.State.heater_on))

Installation

Recommended: use uv.

uv add regelum

For local development from this repository:

uv sync --all-groups
uv run pytest tests
uv run mkdocs serve

Citation

If you use regelum in academic work, please cite it using the metadata in CITATION.cff.

License

regelum is distributed under the MIT License. See LICENSE.

Release Process

Create a GitHub Release tagged like v0.2.0. The publish workflow builds the package, derives the version from the tag, and uploads artifacts to PyPI.

About

Framework for Modeling Phased Reactive Systems.

aidagroup.github.io/regelum/

Topics

control-systemsformal-methodsgraph-executionmkdocspythonreactive-systemsruntimestate-machines

Resources

Readme
MIT license
Activity
Custom properties

Stars

18 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.