Skip to main content

hybrid-automaton

PyPI - Version PyPI - Python Version


Field Value
Last Updated 2026-08-10
Version 1.0.0

Overview

Hybrid Automaton is a Python-based framework for simulating and running hybrid automata in both real-time and offline settings. It provides a lightweight, flexible foundation for defining & evaluating custom automata, while remaining easily integrable into real-world technology stacks such as ROS2 or other systems. The design emphasizes simplicity, extensibility, and practical applicability for a wide range of use cases.

This project was created out of necessity for a USV Hybrid Automaton project and is the first implementation of its kind. As of v1.0.0, it is production-capable for many real-world applications including robotics, industrial control, building automation, and more. See Practical Use Cases below for detailed information.

Framework Status: v1.0.0 - Stable API, ready for production use in non-safety-critical applications with proper testing.

If you have ideas for improvement or want to contribute, please reach out and become a collaborator!

Table of Contents

Installation

pip install hybrid-automaton

Usage

Below is a sample of how one of the demonstration hybrid automaton (bouncing ball) definitions are ran in simulation mode. The definition of the Automaton using the framework can be found here: bouncing ball automaton definition

import os
import numpy as np

from hybrid_automatons import bouncing_ball
from hybrid_automaton import Automaton, RunResult, RuntimeContext

ContinuousState = RuntimeContext.ContinuousState

ha: Automaton = bouncing_ball(gravity=-9.81, restitution=0.8)
results: RunResult = await ha.activate(
    initial_continuous_state=ContinuousState(
        "bouncing_ball_state",
        x0=np.array([5.0, 0.0]),
        x_labels=['height', 'velocity'],
    ),
    enable_real_time_mode=False,
    continuous_state_sampler_enabled=True,
    continuous_state_sampler_rate=100,
    enable_self_integration=True,
    delta_time=0.001,
    timeout_sec=30.0,
    output_dir=os.path.join(os.getcwd(), 'logs', 'bouncing_ball_run')
)
print(results)

Practical Use Cases

Is this framework ready for real-world use? Yes! As of v1.0.0, hybrid-automaton is production-capable for many applications.

Key Applications

This framework excels in domains requiring both continuous dynamics and discrete state management:

  • 🚗 Autonomous Vehicles & Robotics: Cruise control, USV navigation, drone flight controllers
  • 🏭 Industrial Control: HVAC systems, batch processing, conveyor control
  • 🏢 Building Automation: Smart thermostats, traffic lights, elevator systems
  • ⚡ Energy Management: Battery management, microgrid control, EV charging
  • 🎓 Education & Research: Hybrid systems theory, control algorithm prototyping
  • 🏥 Medical Devices: Infusion pumps, ventilators (with proper validation)

Framework Strengths

  • ✅ ROS2 Integration Ready - Designed for robotics stacks
  • ✅ Real-Time & Simulation Modes - Test offline, deploy online
  • ✅ Async-Native - Built with Python asyncio for modern concurrent systems
  • ✅ Well-Tested - Comprehensive test suite included
  • ✅ Rich Examples - Bouncing ball, cruise control, thermostat, traffic lights

Maturity Assessment

Use Case Status Recommendation
Academic/Research ✅ Ready Excellent for prototyping and learning
Robotics Prototyping ✅ Ready Great for ROS2 projects, test thoroughly
Industrial Automation ⚠️ Pilot Projects Start with non-critical systems
Production Systems ⚠️ With Caution Pin versions, extensive validation

📚 For detailed use cases, integration patterns, and best practices, see PRACTICAL_USES.md

Collaborators

This project was created by:

Contributing

We welcome contributions! This is an active project and the first open-source framework of its kind for hybrid automata in Python. Whether you're interested in:

  • 🐛 Reporting bugs or suggesting features
  • 📝 Improving documentation or examples
  • 🔧 Contributing code improvements
  • 🧪 Adding test coverage
  • 🎓 Using it in research or teaching

Please open an issue or pull request on GitHub.

Citation

Please cite this package as described below if used in research:

@misc{hybrid_automaton_2026,
  author       = {Ryan McKee},
  title        = {hybrid-automaton v1.0.0},
  howpublished = {GitHub repository},
  year         = {2026},
  note         = {Accessed: Aug. 10, 2026},
  url          = {https://github.com/rymc-dev/hybrid-automaton}
}

License

hybrid-automaton is distributed under the terms of the MIT license.

Metadata

Release files for hybrid-automaton 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hybrid-automaton 1.0.0
File Size Uploaded
hybrid_automaton-1.0.0.tar.gz 36.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hybrid-automaton 1.0.0
File Interpreter ABI Platform
hybrid_automaton-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 80.1 kB

Release files / hybrid_automaton-1.0.0.tar.gz

Download URL hybrid_automaton-1.0.0.tar.gz
Size 36.7 kB
Tags Source
SHA-256 checksum
How to use checksums
05a9ad2171b0afb5f10874a76fdf2d7c49405dba8ef689526e486df9e6e3ca47
BLAKE2b-256 checksum
How to use checksums
47763feece757348e82fe1a8e8ff37f1787db539a0f61a44243069b10f2bb753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

Release files / hybrid_automaton-1.0.0-py3-none-any.whl

Download URL hybrid_automaton-1.0.0-py3-none-any.whl
Size 43.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cfbc548cc931c071f5bf44f64eb0b57b93370158e056432ef79ef86ffd7aef7
BLAKE2b-256 checksum
How to use checksums
40bab9a6b382c3aec93ae587a7b573cf56dbbf0c4897e7069601686b5267c823
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page