# capocchi/devsimpy architecture

> Architecture diagram of the GitHub repository capocchi/devsimpy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/capocchi/devsimpy
- Repository: https://github.com/capocchi/devsimpy
- Video tour (about a minute): https://gitdiagram.com/capocchi/devsimpy/video

## Overview

DEVSimPy is a DEVS modeling and simulation environment. Its main workflow is to create or import a model, run it with a selected simulation kernel, and inspect or export results. The graph also preserves documented command-line execution, model libraries, plugins, YAML export, REST access, and broker-based streaming. Paths and runtime relationships are based on the supplied tree, README, and sampled excerpts; several feature links are documented capabilities rather than inspected call sites.

Main entry points: [`devsimpy/Domain/Basic`](https://github.com/capocchi/devsimpy/tree/master/devsimpy/Domain/Basic) (DEVS Objects), [`devsimpy/DEVSKernel/Strategies.py`](https://github.com/capocchi/devsimpy/blob/master/devsimpy/DEVSKernel/Strategies.py) (Kernel Strategies), [`devsimpy/devsimpy.py`](https://github.com/capocchi/devsimpy/blob/master/devsimpy/devsimpy.py) (GUI Application), [`devsimpy/DEVSKernel/PyDEVS`](https://github.com/capocchi/devsimpy/tree/master/devsimpy/DEVSKernel/PyDEVS) (PyDEVS Kernel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_modeling["Modeling"]
  node_model_objects["DEVS Objects"]
  node_domain_interfaces["Domain Interfaces"]
  node_library["Model Libraries<br/>[ImportLibrary.py]"]
  node_zip_manager["Model Archives<br/>[ZipManager.py]"]
end

subgraph group_interface["User Interface"]
  node_gui["GUI Application<br/>[devsimpy.py]"]
  node_cli["CLI Runner<br/>[devsimpy-nogui.py]"]
  node_diagram["Diagram Editor<br/>[DiagramNotebook.py]"]
  node_code_editor["Code Editor<br/>[Editor.py]"]
  node_simulation_ui["Simulation Controls<br/>[SimulationGUI.py]"]
end

subgraph group_simulation["Simulation Runtime"]
  node_kernel_strategies["Kernel Strategies<br/>[Strategies.py]"]
  node_pydevs["PyDEVS Kernel"]
  node_pypdevs["PyPDEVS Kernel"]
  node_broker_runtime["Broker Runtime"]
end

subgraph group_outputs["Results And Integration"]
  node_collectors["Result Collectors"]
  node_analysis["Analysis And Plots<br/>[PlotGUI.py]"]
  node_yaml_export["YAML Export<br/>[YAMLExportGUI.py]"]
  node_rest_server["Remote Simulation<br/>[Server.py]"]
  node_broker_service["Message Brokers"]
end

subgraph group_extensions["Extensions"]
  node_plugin_manager["Plugin Manager<br/>[PluginManager.py]"]
  node_plugins["Plugins"]
end

node_user(("Modeler"))
node_remote_user(("Remote Client"))

node_user -->|"opens"| node_gui
node_user -->|"runs models"| node_cli
node_gui -->|"opens editor"| node_diagram
node_diagram -->|"edits models"| node_model_objects
node_code_editor -->|"edits code"| node_model_objects
node_library -->|"imports archives"| node_zip_manager
node_user -->|"imports or exports"| node_library
node_model_objects -->|"implements"| node_domain_interfaces
node_simulation_ui -->|"selects kernel"| node_kernel_strategies
node_cli -->|"selects kernel"| node_kernel_strategies
node_kernel_strategies -->|"dispatches"| node_pydevs
node_kernel_strategies -->|"dispatches"| node_pypdevs
node_model_objects -->|"simulates model"| node_pydevs
node_model_objects -->|"simulates model"| node_pypdevs
node_simulation_ui -.->|"runs streaming"| node_broker_runtime
node_broker_runtime -->|"exchanges messages"| node_broker_service
node_pydevs -->|"emits results"| node_collectors
node_pypdevs -->|"emits results"| node_collectors
node_collectors -->|"feeds analysis"| node_analysis
node_model_objects -->|"exports model"| node_yaml_export
node_remote_user -.->|"requests simulation"| node_rest_server
node_rest_server -.->|"delivers model input"| node_model_objects
node_gui -->|"loads extensions"| node_plugin_manager
node_plugin_manager -->|"dispatches events"| node_plugins

click node_gui "https://github.com/capocchi/devsimpy/blob/master/devsimpy/devsimpy.py"
click node_cli "https://github.com/capocchi/devsimpy/blob/master/devsimpy/devsimpy-nogui.py"
click node_diagram "https://github.com/capocchi/devsimpy/blob/master/devsimpy/DiagramNotebook.py"
click node_code_editor "https://github.com/capocchi/devsimpy/blob/master/devsimpy/Editor.py"
click node_model_objects "https://github.com/capocchi/devsimpy/tree/master/devsimpy/Domain/Basic"
click node_domain_interfaces "https://github.com/capocchi/devsimpy/tree/master/devsimpy/DomainInterface"
click node_library "https://github.com/capocchi/devsimpy/blob/master/devsimpy/ImportLibrary.py"
click node_zip_manager "https://github.com/capocchi/devsimpy/blob/master/devsimpy/ZipManager.py"
click node_kernel_strategies "https://github.com/capocchi/devsimpy/blob/master/devsimpy/DEVSKernel/Strategies.py"
click node_pydevs "https://github.com/capocchi/devsimpy/tree/master/devsimpy/DEVSKernel/PyDEVS"
click node_pypdevs "https://github.com/capocchi/devsimpy/tree/master/devsimpy/DEVSKernel/PyPDEVS/pypdevs221/src"
click node_broker_runtime "https://github.com/capocchi/devsimpy/tree/master/devsimpy/DEVSKernel/BrokerDEVS"
click node_simulation_ui "https://github.com/capocchi/devsimpy/blob/master/devsimpy/SimulationGUI.py"
click node_collectors "https://github.com/capocchi/devsimpy/tree/master/devsimpy/Domain/Collector"
click node_analysis "https://github.com/capocchi/devsimpy/blob/master/devsimpy/PlotGUI.py"
click node_yaml_export "https://github.com/capocchi/devsimpy/blob/master/devsimpy/YAMLExportGUI.py"
click node_rest_server "https://github.com/capocchi/devsimpy/blob/master/devsimpy/Domain/Web/Server.py"
click node_broker_service "https://github.com/capocchi/devsimpy/tree/master/devsimpy/DEVSKernel/BrokerDEVS/Brokers"
click node_plugin_manager "https://github.com/capocchi/devsimpy/blob/master/devsimpy/PluginManager.py"
click node_plugins "https://github.com/capocchi/devsimpy/tree/master/devsimpy/plugins"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_model_objects,node_domain_interfaces,node_library,node_zip_manager,node_remote_user toneBlue
class node_gui,node_cli,node_diagram,node_code_editor,node_simulation_ui toneAmber
class node_kernel_strategies,node_pydevs,node_pypdevs,node_broker_runtime toneMint
class node_collectors,node_analysis,node_yaml_export,node_rest_server,node_broker_service toneRose
class node_plugin_manager,node_plugins,node_user toneIndigo
```

## Components

### Modeling

- [DEVS Objects](https://github.com/capocchi/devsimpy/tree/master/devsimpy/Domain/Basic): `devsimpy/Domain/Basic`
- [Domain Interfaces](https://github.com/capocchi/devsimpy/tree/master/devsimpy/DomainInterface): `devsimpy/DomainInterface`
- [Model Libraries](https://github.com/capocchi/devsimpy/blob/master/devsimpy/ImportLibrary.py): `devsimpy/ImportLibrary.py`
- [Model Archives](https://github.com/capocchi/devsimpy/blob/master/devsimpy/ZipManager.py): `devsimpy/ZipManager.py`

### User Interface

- [GUI Application](https://github.com/capocchi/devsimpy/blob/master/devsimpy/devsimpy.py): `devsimpy/devsimpy.py`
- [CLI Runner](https://github.com/capocchi/devsimpy/blob/master/devsimpy/devsimpy-nogui.py): `devsimpy/devsimpy-nogui.py`
- [Diagram Editor](https://github.com/capocchi/devsimpy/blob/master/devsimpy/DiagramNotebook.py): `devsimpy/DiagramNotebook.py`
- [Code Editor](https://github.com/capocchi/devsimpy/blob/master/devsimpy/Editor.py): `devsimpy/Editor.py`
- [Simulation Controls](https://github.com/capocchi/devsimpy/blob/master/devsimpy/SimulationGUI.py): `devsimpy/SimulationGUI.py`

### Simulation Runtime

- [Kernel Strategies](https://github.com/capocchi/devsimpy/blob/master/devsimpy/DEVSKernel/Strategies.py): `devsimpy/DEVSKernel/Strategies.py`
- [PyDEVS Kernel](https://github.com/capocchi/devsimpy/tree/master/devsimpy/DEVSKernel/PyDEVS): `devsimpy/DEVSKernel/PyDEVS`
- [PyPDEVS Kernel](https://github.com/capocchi/devsimpy/tree/master/devsimpy/DEVSKernel/PyPDEVS/pypdevs221/src): `devsimpy/DEVSKernel/PyPDEVS/pypdevs221/src`
- [Broker Runtime](https://github.com/capocchi/devsimpy/tree/master/devsimpy/DEVSKernel/BrokerDEVS): `devsimpy/DEVSKernel/BrokerDEVS`

### Results And Integration

- [Result Collectors](https://github.com/capocchi/devsimpy/tree/master/devsimpy/Domain/Collector): `devsimpy/Domain/Collector`
- [Analysis And Plots](https://github.com/capocchi/devsimpy/blob/master/devsimpy/PlotGUI.py): `devsimpy/PlotGUI.py`
- [YAML Export](https://github.com/capocchi/devsimpy/blob/master/devsimpy/YAMLExportGUI.py): `devsimpy/YAMLExportGUI.py`
- [Remote Simulation](https://github.com/capocchi/devsimpy/blob/master/devsimpy/Domain/Web/Server.py): `devsimpy/Domain/Web/Server.py`
- [Message Brokers](https://github.com/capocchi/devsimpy/tree/master/devsimpy/DEVSKernel/BrokerDEVS/Brokers): `devsimpy/DEVSKernel/BrokerDEVS/Brokers`

### Extensions

- [Plugin Manager](https://github.com/capocchi/devsimpy/blob/master/devsimpy/PluginManager.py): `devsimpy/PluginManager.py`
- [Plugins](https://github.com/capocchi/devsimpy/tree/master/devsimpy/plugins): `devsimpy/plugins`

### Other components

- **Modeler**
- **Remote Client**

## Connections

- Modeler → GUI Application: opens
- Modeler → CLI Runner: runs models
- GUI Application → Diagram Editor: opens editor
- Diagram Editor → DEVS Objects: edits models
- Code Editor → DEVS Objects: edits code
- Model Libraries → Model Archives: imports archives
- Modeler → Model Libraries: imports or exports
- DEVS Objects → Domain Interfaces: implements
- Simulation Controls → Kernel Strategies: selects kernel
- CLI Runner → Kernel Strategies: selects kernel
- Kernel Strategies → PyDEVS Kernel: dispatches
- Kernel Strategies → PyPDEVS Kernel: dispatches
- DEVS Objects → PyDEVS Kernel: simulates model
- DEVS Objects → PyPDEVS Kernel: simulates model
- Simulation Controls → Broker Runtime: runs streaming
- Broker Runtime → Message Brokers: exchanges messages
- PyDEVS Kernel → Result Collectors: emits results
- PyPDEVS Kernel → Result Collectors: emits results
- Result Collectors → Analysis And Plots: feeds analysis
- DEVS Objects → YAML Export: exports model
- Remote Client → Remote Simulation: requests simulation
- Remote Simulation → DEVS Objects: delivers model input
- GUI Application → Plugin Manager: loads extensions
- Plugin Manager → Plugins: dispatches events
