Year: 2026
Type: article
Abstract: SerializableSimpy is a Python framework for building discrete-event simulations (DES).DES modeling and analysis are useful in time-sensitive applications, such as manufacturing, logistics, and distributed systems.The framework provides core DES building blocks, including logical processes (LPs) and event causality.It also includes components for state and synchronization, such as stores, resources, and priority queues.Users focus on business logic, not the eventprocessing engine.After modeling the system, users can start, pause, and resume.SerializableSimpy is inspired by SimPy (Zinoviev, 2024) but replaces its generator-based execution engine with a serializable design that enables checkpoint/restart and parallel or distributed runs (Fujimoto, 2017).It preserves familiar modeling abstractions while focusing on reproducibility and scaling.Unlike SimPy, which relies on non-serializable generator code (Vassalotti, 2009), SerializableSimpy implements context switches between LPs using standard Python function calls, with an event queue of Python callables.In other words, code that would use yield in SimPy is replaced with functions that finish using return.This design enables:• Effortless checkpointing and full recovery of simulation state, including LPs and event queues, using standard serialization tools such as pickle (Python Software Foundation, 2023b).It requires no serialization logic from users.• Parallel Discrete-Event Simulation (Fujimoto, 2017) using multiprocessing (Python Software Foundation, 2023a) or mpi4py (Dalcin et al., 2011), with support for interprocess event exchange through shared memory or message passing.SerializableSimpy reuses familiar SimPy abstractions where possible, while offering a fundamentally different execution engine.It is not a drop-in replacement; it is designed for users who require reproducibility, parallel performance scaling, or integration into networked systems.The package includes tutorials, reproduces selected official SimPy examples, and provides performance comparisons with other DES frameworks.
DOI: 10.21105/joss.08502
Author: Pierrick Pochelu
Institution: University of Luxembourg
Language: English
Field: Decision Sciences
Domain: Social Sciences
Open Access status: diamond
OpenAlex ID: W7129746342
