idinn: A Python Package for Inventory-Dynamics Control with Neural Networks

Jiawei Li*, Thomas Asikis, Ioannis Fragkos, Lucas Böttcher

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review

Abstract

Identifying optimal policies for replenishing inventory from multiple suppliers is a key problem in
inventory management. Solving such optimization problems requires determining the quantities
to order from each supplier based on the current inventory and outstanding orders, minimizing
the expected ordering, holding, and out-of-stock costs. Despite over 60 years of extensive
research on inventory management problems, even fundamental dual-sourcing problems—where
orders from an expensive supplier arrive faster than orders from a low-cost supplier—remain
analytically intractable (Barankin, 1961; Fukuda, 1964). Additionally, there is a growing interest
in optimization algorithms that can handle real-world inventory problems with non-stationary
demand (Song et al., 2020).
We provide a Python package, idinn, which implements inventory dynamics-informed neural
networks designed to control both single-sourcing and dual-sourcing problems. In singlesourcing problems, a single supplier delivers an ordered quantity to a firm within a known
lead time and at a known unit cost. In dual-sourcing problems, which are more complex, a
company has two potential suppliers of a product, each with different known lead times and
unit costs. The objective is to place orders that minimize the expected order, inventory, and
out-of-stock costs over a finite or infinite horizon. idinn implements neural network controllers
and inventory dynamics as customizable objects using PyTorch as the backend, allowing users
to identify near-optimal ordering policies with reasonable computational resources.
The methods used in idinn take advantage of advances in automatic differentiation (Paszke
et al., 2019, 2017) and the growing use of neural networks in dynamical system identification
(Chen et al., 2018; Fronk & Petzold, 2023; Wang & Lin, 1998) and control (Asikis et al., 2022;
Böttcher et al., 2022, 2025; Böttcher, 2023; Böttcher & Asikis, 2022; Mowlavi & Nabi, 2023).
Original languageEnglish
JournalJournal of Open Source Software
DOIs
Publication statusPublished - 21 Aug 2025

Fingerprint

Dive into the research topics of 'idinn: A Python Package for Inventory-Dynamics Control with Neural Networks'. Together they form a unique fingerprint.

Cite this