Simulation and Reliability, Availability, Maintainability (RAM) analysis of self-replicating robotic systems across 6 configurations.
SRRS models robot colonies that can collect materials, print components, and assemble new robots. Six configurations are studied, varying replication strategy (Homogeneous vs Heterogeneous) and robot mix (One type vs External specialists):
| Config | Description |
|---|---|
| CHO | Collect-Homogeneous-One — single replicator builds Normal workers |
| DHO | Deterministic-Homogeneous-One — replicator clones itself |
| HHO | Heterogeneous-Homogeneous-One — replicator alternates Normal/Replicator |
| CHE | Collect-Heterogeneous-External — Assembler + Printer team builds Normal workers |
| DHE | Deterministic-Heterogeneous-External — Assembler + Printer alternate clones |
| HHE | Heterogeneous-Heterogeneous-External — rotating 3-type build cycle |
python/
├── models/
│ ├── types.py ← RobotType, TaskType, Config, SimMode enums
│ ├── robot.py ← Robot base class + Replicator/Normal/Assembler/Printer
│ └── resources.py ← Simulation resource state (materials, env_materials, …)
├── simulation/
│ ├── config.py ← SimulationParams (all tunable parameters)
│ └── runner.py ← Core simulation loop (deterministic + MC)
├── analysis/
│ ├── ram.py ← System-level MTBF / MTTR / MDT / Aoss
│ └── stats.py ← MC aggregation + confidence intervals
├── visualization/
│ └── plots.py ← Plotly HTML output (6-panel summary + MC distributions)
└── main.py ← CLI entrypoint
# From source
pip install -e ".[dev]"
# From built wheel
pip install dist/srrs-*.whl# Deterministic — single config, 100 timesteps
python -m python.main --config CHO --mode D --timesteps 100
# Deterministic — with Plotly HTML output
python -m python.main --config CHO --mode D --timesteps 250 --plot --output-dir output/
# Monte Carlo — 6 configs, 500 runs each
python -m python.main --config CHO DHO HHO CHE DHE HHE --mode MC --mc-runs 500 --timesteps 250 --plot
# All options
python -m python.main --helpfrom python.models.types import Config, SimMode
from python.models.resources import Resources
from python.simulation.config import SimulationParams
from python.simulation.runner import run_simulation
params = SimulationParams(
config=Config.CHO,
mode=SimMode.DETERMINISTIC,
timesteps=100,
quality_threshold=0.5,
risk_threshold=3.0,
)
df, ram = run_simulation(params)
print(f"Final robots: {df['#In'].iloc[-1]}")
print(f"System Aoss: {ram.aoss:.4f}")# Run all tests
pytest
# Run tests for a specific config with coverage
pytest tests/test_CHO.py -v --cov=python --cov-report=term-missing
# Run all configs
pytest tests/ -v --cov=python --cov-report=term-missingGitHub Actions runs on every push and PR:
- build — installs
build, runspython -m build --wheel, uploads the.whlas an artifact - test / CHO … HHE — 6 parallel jobs, each downloads the wheel, installs it, and runs
pytest tests/test_<CONFIG>.pywith coverage
| Metric | Description |
|---|---|
| MTBF | Mean Time Between Failures |
| MTTR | Mean Time To Repair |
| MDT | Mean Down Time |
| Aoss | Operational Steady-State Availability |
numpy
pandas
plotly
pydantic>=2.0
python-dotenv
Dev: pytest, pytest-cov