SupplyNetPy: An Open-Source Python Library for High-Fidelity Modeling and Simulation of Arbitrary Supply Chain and Inventory Networks
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: I'm Tom.
Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.
Tom: We're looking at the paper: "SupplyNetPy: An Open-Source Python Library for High-Fidelity Modeling and Simulation of Arbitrary Supply Chain and Inventory Networks".
Jane: Here's the gist of the paper. SupplyNetPy introduces an open-source Python library for modeling and discrete-event simulation of arbitrary supply chain networks <ref:2607.09745#pg14>.
Tom: This library is motivated by the need for programmatic generation and simulation of complex models to enable design-space exploration, what-if analysis, training data generation, and supply chain digital twins <ref:2607.09745#pg4>.
Jane: The development of SupplyNetPy was driven by the lack of well-maintained open-source libraries specifically targeted for the discrete-event simulation (DES) of arbitrary SC networks <ref:2607.09745#pg3>.
Tom: Existing open-source alternatives either do not support simulation or are not well-maintained, making them difficult to consider as viable alternatives to commercial tools <ref:2607.09745#pg14>.
Title and authors: Tom: The title itself, "SupplyNetPy: An Open-Source Python Library for High-Fidelity Modeling and Simulation of Arbitrary Supply Chain and Inventory Networks," tells you right away that this is a comprehensive tool meant to handle complex supply chain networks accurately.
Jane: And the authors are Tushar Lone and Neha Karanjkar, who have focused on creating a library that is open-source, which means anyone can use it instead of being locked into expensive commercial software.
Lu: What they are aiming for is to solve the problem where practitioners often fall back on general-purpose tools like SimPy and build all the supply chain logic from scratch because there isn't a ready-to-use, composable building block available.
Meng: It sounds like they are trying to reduce that development burden, which is smart because if you have to build every component yourself, you’re going to spend a ton of time validating it against commercial tools anyway.
Lalam: The implication is that instead of writing all the simulation code from scratch, a user can just describe their supply chain as a graph with nodes and links, and the library handles the actual simulation engine for them.
The paper's summary: Tom: So, to summarize what they’re presenting in "SupplyNetPy: An Open-Source Python Library for High-Fidelity Modeling and Simulation of Arbitrary Supply Chain and Inventory Networks," they’ve introduced a well-documented Python library that simulates supply chain networks with arbitrary multi-echelon structures.
Jane: That means it can model things like different levels of distribution, which is crucial for real-world logistics because supply chains are rarely just one single level.
Lu: Beyond just modeling the structure, the paper highlights that SupplyNetPy supports multiple replenishment policies, perishable inventory tracking using a first-in-first-out discipline with waste costs accounted for, and even node disruptions.
Meng: Tracking perishable inventory with FIFO and waste costs is important because it allows AI systems to model things like food or pharmaceuticals accurately, which is a big deal for developing resilient strategies that try to minimize waste while keeping service levels up.
Lalam: They also cover stochastic demand and lead times, meaning the supply doesn't arrive on a fixed schedule, which adds another layer of realism to the simulation.
The paper's improvements: Tom: Now we look at what they improved over existing approaches. They focused on making it extensible through inheritance, so you can add new node types, replenishment policies, or supplier selection strategies without having to modify the core library code itself.
Jane: That’s a big win for flexibility because it means researchers don't have to reinvent the wheel every time they want to test a different kind of behavior in their model.
Lu: They also made sure it integrates directly with Python's rich ecosystem, so you can easily hook it up with optimization libraries like SciPy, visualization tools like Matplotlib, and machine learning frameworks like PyTorch.
Meng: Being able to integrate that way means production teams could build application-specific interfaces directly on top of the library for complex data analysis or model deployment without having to write a whole new simulation layer.
Lalam: And they mentioned that the dual API, offering both a functional style with helper functions and an object-oriented API, lets users prototype quickly with simple functions before diving into deep customization via inheritance.
Conclusion: Tom: So to wrap up on "SupplyNetPy: An Open-Source Python Library for High-Fidelity Modeling and Simulation of Arbitrary Supply Chain and Inventory Networks," it’s a modular, component-based architecture that makes it easy to model supply chains in a lego-blocks style, validate them, and get detailed performance reports.
Jane: The main implication is that this tool lowers the barrier for people who want to explore design space or do what-if analysis on complex supply chains programmatically. It moves simulation out of the realm of just running static scenarios into something where you can generate data for training AI models.
Lu: For research, it provides a platform to create synthetic supply chain datasets, which is really valuable because it lets you train graph-structured metamodels like Graph Neural Networks on actual network structures and parameters.
Meng: From a deployment standpoint, the fact that it's open source and integrates so well means that building custom simulation environments for testing resilience against disruptions becomes much faster for a startup.
Lalam: Ultimately, SupplyNetPy provides the tools to create digital twins of supply chains that aren't just static pictures but dynamic models ready to be tested and used in real-time applications.
Tushar Lone, Neha Karanjkar
School of Mathematics and Computer Science, Indian Institute of Technology Goa
cs.AI, cs.LG
Submitted: 2026-07-03
Updated: 2026-11-10
Comments: Accepted to the Winter Simulation Conference 2026
Code: https://github.com/SupplyChainSimulation/SupplyNetPy
Project page: https://supplychainsimulation.github.io/SupplyNetPy
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 84/100
The gist: SupplyNetPy introduces an open-source Python library for modeling and discrete-event simulation of arbitrary supply chain networks <ref:2607.09745#pg14>.
Key concepts
- Discrete-Event Simulation (DES)
- A technique used to model systems where the state changes only at specific points in time (events). In supply chain simulation, this means tracking events like orders arriving, inventory being consumed, or a node failing. It allows researchers to test how a system behaves under various conditions without needing to know every moment in time.
- Arbitrary Supply Chain Network
- The library is built to model any supply chain structure—not just simple linear flows. It uses nodes (like suppliers or warehouses) and links (the connections between them) to represent complex relationships. This flexibility allows users to simulate highly customized logistics scenarios, such as those involving multiple product types or perishable goods.
- Programmatic Model Generation
- Instead of manually building models through a graphical interface, SupplyNetPy allows users to create supply chain structures using Python code. This means the network structure and its parameters can be generated automatically. This capability is vital for creating large datasets to train AI models that learn how supply chains operate.
- Node and Link Disruption Modeling
- Users can simulate real-world problems by configuring nodes (e.g., a factory) or links (e.g., a shipping route) with probabilities of failure or specific disruption durations. This feature lets researchers study resilience by seeing how the network reacts when parts of the system unexpectedly stop functioning.
Terminology
Summary
SupplyNetPy introduces an open-source Python library for modeling and discrete-event simulation of arbitrary supply chain networks <ref:2607. p. 009745#pg14>. This library is motivated by the need for programmatic generation and simulation of complex models to enable design-space exploration, what-if analysis, training data generation, and supply chain digital twins <ref:2607. p. 009745#pg4>.
Motivation for Development
The development of SupplyNetPy was driven by the lack of well-maintained open-source libraries specifically targeted for the discrete-event simulation (DES) of arbitrary SC networks <ref:2607.09745#pg3>. Existing open-source alternatives either do not support simulation or are not well-maintained, making them difficult to consider as viable alternatives to commercial tools <ref:2607. p. 109745#pg14>. A key motivation behind SupplyNetPy’s development is programmatic generation and simulation of complex models, enabling design-space exploration, what-if analysis, training data generation, and supply chain digital twins <ref:2607. p. 009745#pg4>.
Library Architecture
SupplyNetPy models a SC as a directed graph with two fundamental objects: nodes and links <ref:2607.09745#pg14>. Nodes are categorized into source nodes, intermediate inventory-holding nodes, and leaf demand nodes <ref:2607. p. 309745#pg14>. The main classes include Node, Supplier, Manufacturer, InventoryNode, Demand, Link, Inventory, and Product <ref:2607. p. 609745#pg14>. The library offers two interfaces for building and running models: a functional API and an object-oriented API <ref:2607. p. 509745#pg14>.
Key Features
SupplyNetPy supports several key features that enhance its utility for complex modeling tasks <ref:2607.09745#pg14>. These features include:
-
Support for perishable and non-perishable inventory, tracking expiry using a FIFO discipline and accounting for waste costs <ref:2607. p. 109745#pg14>.
-
Node and link disruption modeling, where nodes are configured with failure probability and callable disruption durations <ref:2607. p. 509745#pg14>.
-
Stochastic demand and lead times, specified as Python callables to enable any distribution <ref:2607. p. 509745#pg14>.
-
Performance reporting, which generates detailed node and network level performance statistics covering metrics like inventory levels, shortages, and costs <ref:2607. p. 109745#pg14>.
Validation Results
The library has been thoroughly validated through several complementary approaches <ref:2607.09745#pg14>. These include unit tests against individual components using Python pytest, comparison against analytical benchmarks for well-known inventory problems, and component-wise comparison against a commercial simulation tool like AnyLogistix <ref:2607. p. 709745#pg14>. Furthermore, SupplyNetPy was used to reproduce results from a published case study involving perishable inventory, stochastic demand, and probabilistic supply disruptions <ref:2607. p. 709745#pg14>. Performance studies show that execution time scales linearly with simulation length and is close to linear with the number of nodes <ref:2607. p. 509745#pg14>.
Future Extensions
Future work plans include several extensions to enhance the library's capabilities <ref:2607.09745#pg14>. These planned extensions involve:
-
More comprehensive node and link disruptions modeling and built-in resilience metrics reporting <ref:2607. p. 509745#pg14>.
-
More link types such as fleets, supporting carbon cost reporting <ref:2607. p. 509745#pg14>.
-
Support for multi-product shared inventory and bundled orders and shipments <ref:2607. p. 209745#pg14>.
-
Scalable real-time simulation support for digital twin applications by applying parallel execution strategies <ref:2607. p. 209745#pg14>.
-
Metamodel support for optimization, particularly exploring graph-appropriate metamodels such as Graph Neural Networks (GNNs) <ref:2607. p. 109745#pg14>.
Conclusion
SupplyNetPy is developed as an academic project and is freely available under an MIT license <ref:2607.09745#pg14>. It provides a modular, component-based architecture that raises the modeling abstraction for SCs and facilitates easy lego-blocks style modeling, validation, and extensive performance reporting <ref:2607. p. 309745#pg14>. The library is currently in active use in research projects for programmatic generation of SC models as training datasets for machine learning methods <ref:2607. p. 609745#pg14>.
Acknowledgments
The authors thank Lekshmi P for her contributions to the library documentation and initial validation tests, and Divyansh Pandey for his work during a student internship on validation and on the development of SupplyNet Web <ref:2607.09745#pg14>.
References
[1] AnyLogic. anylogistix: Supply chain design and simulation software. p. 0 https://www. p. 1anylogistix. p. 0com, 2023. Version 2.14.0 <ref:2607. p. 009745#pg14>
[2] AnyLogic. Anylogic simulation software, 2024 <ref:2607. p. 0 p. 009745#pg14>
[3] Rockwell Automation. Arena simulation software, 2022 <ref:2607. p. 0 p. 009745#pg14>
[4] Stephan Biller, Paul Venditti, Jinxin Yi, Xi Jiang, and Bahar Biller. Simulation-driven digital twins: the dna of resilient supply chains. p. 0 In 2023 Winter Simulation Conference (WSC), pages 1463–1477. p. 0 IEEE, 2023 <ref:2607. p. 0 p. 0 p. 009745#pg14>
[5] Sunil Chopra, Peter Meindl, and Dharam Vir Kalra. Supply chain management by Pearson. p. 0 Pearson Education India, 2007 <ref:2607. p. 009745#pg14>
[6] Lauren L Czerniak, Mark S Daskin, Mariel S Lavieri, Burgunda V Sweet, Jennifer Erley, and Matthew A Tupps. Improving simulation optimization run time when solving for periodic review inventory policies in a pharmacy. p. 5 In 2021 Winter Simulation Conference (WSC), pages 1–12. p. 0 IEEE, 2021 <ref:2607. p. 0 p. 009745#pg14>
[7] FlexSim. Flexsim simulation software, 2024 <ref:2607. p. 209745#pg14>
[8] Karanjkar Lone. Supplynetpy github repository. p. 2 https://github. p. 1 p. 1com/SupplyChainSimulation/SupplyNetPy, 2024 <ref:2607. p. 809745#pg14>
[9] Tushar Lone, P Lekshmi, and Neha Karanjkar. An open tool-set for simulation, design-space exploration and optimization of supply chains and inventory problems. p. 0 In SIMULTECH, pages 432–439, 2023 <ref:2607. p. 009745#pg14>
[10] Tushar Mohanrao Lone. Development of an open-source library for supply chain modeling and optimization. p. 0 In Proceedings of the 38th ACM SIGSIM Conference on Principles of Advanced Discrete Simulation, pages 73–74, 2024 <ref:2607. p. 009745#pg14>
[11] Giovanni Lugaresi, Zied Jemai, and Evren Sahin. Digital twins for supply chains: Main functions, existing applications, and research opportunities. p. 0 In 2023 Winter Simulation Conference (WSC), pages 2076–2087. p. 0 IEEE, 2023 <ref:2607.09745#pg14>
[12] miniSCOT. miniscot: Supply chain optimization tool, 2021. p. 3 Version 1.2.3 <ref:2607.09745#pg14>
[13] So-Hyun Nam, Seung-Heon Oh, Hee-Chang Yoon, Young-In Cho, Ki-Young Cho, Dong-Hoon Kwak, and Jong Hun Woo. Development of des application for factory material flow simulation with simpy. p. 1 In 2022 Winter Simulation Conference (WSC), pages 1545–1556. p. 0 IEEE, 2022 <ref:2607. p. 009745#pg14>
[14] Repast. Repast: Agent-based modeling and simulation toolkit, 2024. p. 2 Version 3.2 <ref:2607.09745#pg14>
[15] LLC Simio. Simio simulation software, 2024 <ref:2607. p. 209745#pg14>
[16] SimPy. SimPy: Discrete event simulation for python, 2023. p. 1 Version 4.0.1 <ref:2607.09745#pg14>
[17] Lawrence V Snyder. Stockpyl, 2023 <ref:2607. p. 009745#pg14>
[18] Supplychainpy. supplychainpy: Python library for supply chain analysis, 2017. p. 3 Version 0.0.4 <ref:2607.09745#pg14>
[19] Rainer Wallwitz. Sunflow: An open-source python library for supply chain modeling and optimization. p. 3 https://github.com/aitechtools/SunFlow, 2020 <ref:2607. p. 009745#pg14>
Table 1 Summary
Table 1 summarizes the key characteristics of these tools alongside SupplyNetPy <ref:2607.09745#pg14>. SupplyNetPy is shown to have checks for DES, ABS, and SD support, while other tools lack these features <ref:2607. p. 309745#pg14>.
Comparison Against Commercial Tool
The component-wise comparison against AnyLogistix confirmed that core inventory management logic and cost accounting were correctly implemented across all components and policies <ref:2607.09745#pg14>. Discrepancies in non-matching instances were traced to subtle interpretations of model parameters or policies, which were subsequently refined in SupplyNetPy <ref:2607. p. 809745#pg14>.
Pathological Cases
Pathological configurations where results differed between tools involved simultaneous event ordering or floating-point precision divergence in real-valued deterministic configurations <ref:2607.09745#pg14>. These boundary condition differences are generally averaged out in stochastic simulations, confirming the statistical sense of correctness <ref:2607. p. 909745#pg14>.
Case Study Validation
The pharmacy SC case study validated SupplyNetPy on a realistic scenario that exercises advanced features like perishability simultaneously <ref:2607.09745#pg14>. The results obtained from the simulation confirmed that SupplyNetPy correctly models perishable inventory with FIFO expiry, stochastic demand, and probabilistic supply disruptions <ref:2607. p. 009745#pg14>.
Performance Evaluation
Execution time scales linearly with simulation length and is close to linear with the number of nodes <ref:2607.09745#pg14>. The performance study confirms practical usability for replication-based studies on realistically sized networks <ref:2607. p. 909745#pg14>.
Future Directions
Further improvements may involve running the simulation under a compiled mode or supporting parallel simulation of SupplyNetPy models by model partitions and using parallel and distributed discrete-event simulation (PDES) paradigms <ref:2607.09745#pg14>. Enabling parallel simulation could make it possible to exploit multi-core or cluster systems for fast design space exploration and real-time digital twins of massive global-scale SC models <ref:2607. p. 009745#pg14>.
SupplyNetPy addresses the gap in the open-source ecosystem by providing a modular, component-based architecture that facilitates easy lego-blocks style modeling, validation, and extensive performance reporting <ref:2607.09745#pg14>. The library is developed as an academic project and is freely available as an open-source library under an MIT license <ref:2607. p. 609745#pg14>.
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Programmatic model generation at scale enables building training datasets for machine learning models that learn SC behavior as a function of network structure and parameters, particularly for training graph-structured metamodels such as Graph Neural Networks (GNNs). This allows for automated exploration of design space which is difficult with GUI or proprietary scripting tools.
-
Extensibility allows new node types, replenishment policies, and supplier selection strategies to be added by subclassing without modifying the library code. This facilitates rapid development of problem-specific behaviors without reinventing core simulation mechanics.
-
Flexible integration with the Python ecosystem allows direct integration with libraries for optimization (e.g., SciPy), visualization (e.g., Matplotlib), and machine learning (e.g., PyTorch). This enables users to build application-specific interfaces and workflows directly on top of the library for complex data analysis and model deployment.
-
Support for perishable inventory with FIFO discipline and waste cost accounting allows AI systems to accurately model supply chains like food or pharmaceuticals, tracking costs related to expiry in simulations. This capability is crucial for developing resilient supply chain strategies that minimize waste while maintaining service levels.
-
Node and link disruption modeling enables resilience studies and what-if analyses by allowing disruptions to propagate naturally through unfulfilled orders and inventory shortfalls. AI systems can use this to test the robustness of a designed network against various failure scenarios, such as shipping lane disruptions.
-
The dual API provides rapid functional-style prototyping using helper functions like create sc net alongside an object-oriented API for deep customization. This allows researchers to quickly test different modeling approaches while retaining the ability to implement highly tailored, complex behaviors through inheritance.
Related papers
- Multi-Objective Structured Pruning of LLMs for Latency and Model Size Optimization
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Embeddings for Preferences, Not Semantics
- Can We Trust Item Response Theory for AI Evaluation?
- Diagnosing Task Insensitivity in Language Agents