idinn
idinn: A Python Package for Inventory-Dynamics Control with Neural Networks - Published in JOSS (2025)
Science Score: 87.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 3 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
○Academic email domains
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Last synced: 4 months ago
·
JSON representation
Repository
Inventory dynamics–informed neural networks for solving single-sourcing and dual-sourcing problems.
Basic Info
- Host: gitlab.com
- Owner: ComputationalScience
- License: mit
- Default Branch: main
Statistics
- Stars: 0
- Forks: 0
- Open Issues: 2
- Releases: 0
Created over 4 years ago
https://gitlab.com/ComputationalScience/idinn/blob/main/
# idinn: Inventory-Dynamics Control with Neural Networks [](https://pypi.org/project/idinn/) [](https://colab.research.google.com/drive/1BAMiveGXmErIp10MK3V_SUJlDAXHAyaI) [](https://idinn-demo.streamlit.app) [](https://joss.theoj.org/papers/224380be40f3be0b741a4ec711eac83b) [](https://www.youtube.com/watch?v=hUBfTWV6tWQ) `idinn` implements **i**nventory **d**ynamics**i**nformed **n**eural **n**etwork and other related controllers for solving single-sourcing and dual-sourcing problems. Neural network controllers and inventory dynamics are implemented into customizable objects using PyTorch as backend to enable users to find the optimal controllers for the user-specified inventory systems. ## Demo For a quick demo, you can run our [Streamlit app](https://idinn-demo.streamlit.app/). The app allows you to interactively train and evaluate neural controllers for user-specified dual-sourcing systems. Alternatively, you may use our notebook in [Colab](https://colab.research.google.com/drive/1BAMiveGXmErIp10MK3V_SUJlDAXHAyaI). ## Installation The package can be installed from PyPI. To do that, run ``` pip install idinn ``` Or, if you want to inspect the source code and edit locally, run ``` git clone https://gitlab.com/ComputationalScience/idinn.git cd idinn pip install -e . ``` ## Example Usage ```python import torch from idinn.sourcing_model import SingleSourcingModel from idinn.single_controller import SingleSourcingNeuralController from idinn.demand import UniformDemand # Initialize the sourcing model and the neural controller sourcing_model = SingleSourcingModel( lead_time=0, holding_cost=5, shortage_cost=495, batch_size=32, init_inventory=10, demand_generator=UniformDemand(low=1, high=4), ) controller = SingleSourcingNeuralController( hidden_layers=[2], activation=torch.nn.CELU(alpha=1) ) # Train the neural controller controller.fit( sourcing_model=sourcing_model, sourcing_periods=50, validation_sourcing_periods=1000, epochs=5000, seed=1, ) # Simulate and plot the results controller.plot(sourcing_model=sourcing_model, sourcing_periods=100) # Calculate the optimal order quantity for applications controller.predict(current_inventory=10) ``` ## Documentation See the official [documentation](https://inventory-optimization.readthedocs.io/en/latest/) for more information. ## Contribution We welcome contributions of all kinds! To get started, please see our [contribution guide](CONTRIBUTING.md). ## Papers using `idinn` * Bttcher, Lucas, Thomas Asikis, and Ioannis Fragkos. "Control of dual-sourcing inventory systems using recurrent neural networks." [INFORMS Journal on Computing](https://pubsonline.informs.org/doi/abs/10.1287/ijoc.2022.0136) 35.6 (2023): 1308-1328. * Li, Jiawei, Thomas Asikis, Ioannis Fragkos, and Bttcher, Lucas. "idinn: A Python package for inventory-dynamics control with neural networks." [Journal of Open Source Software](https://joss.theoj.org/papers/10.21105/joss.08508#) 10.112 (2025): 8508. ``` @article{bottcher2023control, title={Control of dual-sourcing inventory systems using recurrent neural networks}, author={B{\"o}ttcher, Lucas and Asikis, Thomas and Fragkos, Ioannis}, journal={INFORMS Journal on Computing}, volume={35}, number={6}, pages={1308--1328}, year={2023} } ``` ``` @article{li2025, title = {idinn: A {P}ython package for inventory-dynamics control with neural networks}, author = {Li, Jiawei and Asikis, Thomas and Fragkos, Ioannis and B{\"o}ttcher, Lucas}, journal = {Journal of Open Source Software}, volume = {10}, number = {112}, pages = {8508}, year = {2025} } ``` ## Contributors * [Jiawei Li](https://github.com/iewaij) * [Thomas Asikis](https://gitlab.com/asikist) * [Ioannis Fragkos](https://gitlab.com/ioannis.fragkos1) * [Lucas Bttcher](https://gitlab.com/lucasboettcher)
Owner
- Name: ComputationalScience
- Login: ComputationalScience
- Kind: organization
- Repositories: 11
- Profile: https://gitlab.com/ComputationalScience
JOSS Publication
idinn: A Python Package for Inventory-Dynamics Control with Neural Networks
Published
August 21, 2025
Volume 10, Issue 112, Page 8508
Authors
Jiawei Li
Department of Computational Science and Philosophy, Frankfurt School of Finance and Management
Department of Computational Science and Philosophy, Frankfurt School of Finance and Management
Tags
PyTorch artificial neural networks inventory dynamics optimization control dynamic programmingIssues and Pull Requests
Last synced: 4 months ago
Packages
- Total packages: 1
-
Total downloads:
- pypi 159 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 8
- Total maintainers: 1
pypi.org: idinn
Inventory dynamics–informed neural networks and other related controllers for solving single-sourcing and dual-sourcing problems.
- Homepage: https://gitlab.com/ComputationalScience/idinn
- Documentation: https://inventory-optimization.readthedocs.io
- License: MIT License Copyright (c) 2021 Jiawei Li, Thomas Asikis, Ioannis Fragkos, and Lucas Boettcher Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Latest release: 0.2.0
published 9 months ago
Rankings
Dependent packages count: 9.7%
Average: 36.8%
Dependent repos count: 63.9%
Maintainers (1)
Last synced:
4 months ago
](https://www.youtube.com/watch?v=hUBfTWV6tWQ)
`idinn` implements **i**nventory **d**ynamics**i**nformed **n**eural **n**etwork and other related controllers for solving single-sourcing and dual-sourcing problems. Neural network controllers and inventory dynamics are implemented into customizable objects using PyTorch as backend to enable users to find the optimal controllers for the user-specified inventory systems.
## Demo
For a quick demo, you can run our [Streamlit app](https://idinn-demo.streamlit.app/). The app allows you to interactively train and evaluate neural controllers for user-specified dual-sourcing systems. Alternatively, you may use our notebook in [Colab](https://colab.research.google.com/drive/1BAMiveGXmErIp10MK3V_SUJlDAXHAyaI).
## Installation
The package can be installed from PyPI. To do that, run
```
pip install idinn
```
Or, if you want to inspect the source code and edit locally, run
```
git clone https://gitlab.com/ComputationalScience/idinn.git
cd idinn
pip install -e .
```
## Example Usage
```python
import torch
from idinn.sourcing_model import SingleSourcingModel
from idinn.single_controller import SingleSourcingNeuralController
from idinn.demand import UniformDemand
# Initialize the sourcing model and the neural controller
sourcing_model = SingleSourcingModel(
lead_time=0,
holding_cost=5,
shortage_cost=495,
batch_size=32,
init_inventory=10,
demand_generator=UniformDemand(low=1, high=4),
)
controller = SingleSourcingNeuralController(
hidden_layers=[2],
activation=torch.nn.CELU(alpha=1)
)
# Train the neural controller
controller.fit(
sourcing_model=sourcing_model,
sourcing_periods=50,
validation_sourcing_periods=1000,
epochs=5000,
seed=1,
)
# Simulate and plot the results
controller.plot(sourcing_model=sourcing_model, sourcing_periods=100)
# Calculate the optimal order quantity for applications
controller.predict(current_inventory=10)
```
## Documentation
See the official [documentation](https://inventory-optimization.readthedocs.io/en/latest/) for more information.
## Contribution
We welcome contributions of all kinds! To get started, please see our [contribution guide](CONTRIBUTING.md).
## Papers using `idinn`
* Bttcher, Lucas, Thomas Asikis, and Ioannis Fragkos. "Control of dual-sourcing inventory systems using recurrent neural networks." [INFORMS Journal on Computing](https://pubsonline.informs.org/doi/abs/10.1287/ijoc.2022.0136) 35.6 (2023): 1308-1328.
* Li, Jiawei, Thomas Asikis, Ioannis Fragkos, and Bttcher, Lucas. "idinn: A Python package for inventory-dynamics control with neural networks." [Journal of Open Source Software](https://joss.theoj.org/papers/10.21105/joss.08508#) 10.112 (2025): 8508.
```
@article{bottcher2023control,
title={Control of dual-sourcing inventory systems using recurrent neural networks},
author={B{\"o}ttcher, Lucas and Asikis, Thomas and Fragkos, Ioannis},
journal={INFORMS Journal on Computing},
volume={35},
number={6},
pages={1308--1328},
year={2023}
}
```
```
@article{li2025,
title = {idinn: A {P}ython package for inventory-dynamics control with neural networks},
author = {Li, Jiawei and Asikis, Thomas and Fragkos, Ioannis and B{\"o}ttcher, Lucas},
journal = {Journal of Open Source Software},
volume = {10},
number = {112},
pages = {8508},
year = {2025}
}
```
## Contributors
* [Jiawei Li](https://github.com/iewaij)
* [Thomas Asikis](https://gitlab.com/asikist)
* [Ioannis Fragkos](https://gitlab.com/ioannis.fragkos1)
* [Lucas Bttcher](https://gitlab.com/lucasboettcher)