Skip to content

INTO-CPS-Association/simulation-bridge

Repository files navigation

Simulation Bridge

Simulation Bridge (sim-bridge) is a modular, reusable, and bidirectional middleware designed to orchestrate distributed simulation systems involving Digital Twins (DTs), Mock Physical Twins (MockPTs), and Physical Twins (PTs).

It acts as an intelligent communication layer between DTs, PTs, and heterogeneous simulation environments, integrating and coordinating simulations developed with diverse models, technologies, and protocols.

sim-bridge exposes a unified interface that enables seamless data exchange and interaction. It receives inputs from DTs or PTs, routes them to the appropriate simulators through dedicated components called Simulator Agents, collects the simulation results, and delivers them back to the clients.

Simulation Bridge Architecture
Figure 1: Simulation Bridge Architecture

Please refer to the User Guide for detailed requirements, configuration instructions, and usage guidelines for the Simulation Bridge.

Table of Contents

Key Features

Agents

Agent is a software connector that acts as an interpreter between sim-bridge and the specific simulator. Each simulator requires its own Agent, which must be designed to be reusable across diverse simulation scenarios for that simulator.

Refer to the Matlab Agent for an implementation example.

Modes of Simulation

sim-bridge supports Batch and Streaming simulation modes, allowing for both discrete and real-time streaming simulation workflows:

Mode Description
Batch Inputs are provided at the start, the simulation runs to completion without intermediate monitoring, and results are delivered only at the end.
Streaming Enables real-time, step-by-step updates from the simulation during execution

Plug-in Protocol Adapters

The system follows a plug-in-based protocol adapter architecture, enabling seamless future integration of additional protocols. It currently supports MQTT, RabbitMQ, and RESTful interfaces, allowing external clients to communicate with the sim-bridge through these channels.

Supports secure (TLS) and insecure connections for all protocols: MQTT/mqtts, AMQP/amqps, HTTP/2.0, and HTTPS.

TLS certificates (cert.pem, key.pem) are generated automatically when needed.

Plug-in Protocol Adapter Architecture
Figure 2: Plug-in Protocol Adapter Architecture

Documentation

Simulation Bridge

  • User Guide: Comprehensive guide covering system requirements, configuration steps, and detailed usage instructions for the Simulation Bridge.
  • Internal Architecture: Overview of the system's architecture, key modules, and their interactions.
  • Class Diagram: UML Class Diagram of the Simulation Bridge Architecture
  • In-Memory Adapter: Using the bridge directly from Python
  • Performance Metrics: Overview of the performance metrics generated by the Simulation Bridge
  • Performance Analysis: Command-line tool for quantifying the overhead introduced by the Simulation Bridge, analyzing the performance metrics.

Matlab Agent

Package Development

The developer-specific commands are

pylint simulation_bridge
autopep8 --in-place --aggressive --recursive 'simulation_bridge'
pytest --cov=simulation_bridge --cov-report=term --cov-report=html simulation_bridge/test/
open htmlcov/index.html

License

This project is licensed under the INTO-CPS Association Public License v1.0.
See the LICENSE file for full license text.

Author

Marco Melloni

Digital Automation Engineering Student
University of Modena and Reggio Emilia, Department of Sciences and Methods for Engineering (DISMI)

Prof. Marco Picone

Associate Professor
University of Modena and Reggio Emilia, Department of Sciences and Methods for Engineering (DISMI)

Dr. Prasad Talasila

Postdoctoral Researcher
Aarhus University

About

Communication bridge for simulators, digital twins and physical twins

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •