Gymnasium-Compatible Inventory Management Environments & Benchmarks (or-gym-inventory)
This repository provides or_gym_inventory, an installable Python package containing implementations of classic inventory management environments. These environments are adapted from the original OR-Gym library and updated for compatibility with the Gymnasium API (the successor to OpenAI Gym).
The package also includes comprehensive benchmarking scripts (located in the examples/ directory of the source repository) to compare various heuristic, optimization-inspired, and Reinforcement Learning (RL) policies on these environments.
Environments Included:
- Newsvendor (
or_gym_inventory.newsvendor): Multi-period newsvendor problem with lead times and stochastic Poisson demand (based on Zipkin (2000, 2008), and Balaji et al. 2019, https://arxiv.org/abs/1911.10641). Class:NewsvendorEnv. - Inventory Management (
or_gym_inventory.inventory_management): Multi-period, multi-echelon inventory system for a single product (based on Paul Glasserman and Sridhar Tayur (1995) and D. Hubbs (2020)). IncludesInvManagementBacklogEnvandInvManagementLostSalesEnv. - Network Inventory Management (
or_gym_inventory.network_management): Multi-period, multi-node inventory system with a network structure (factories, distributors, retailers, markets). IncludesNetInvMgmtBacklogEnvandNetInvMgmtLostSalesEnv(based on Paul Glasserman and Sridhar Tayur (1995) and Perez et al. (2021)).
Features
- Installable Package: Easily install using pip (
pip install or_gym_inventory). - Gymnasium Compatible: Environments adhere to the modern Gymnasium API standard (
resetreturnsobs, info,stepreturnsobs, reward, terminated, truncated, info). - Three Core Environments: Covers single-item, multi-echelon, and network inventory problems.
- Backlog & Lost Sales Variants: Specific environment classes (
*BacklogEnv,*LostSalesEnv) implement these dynamics. - Comprehensive Benchmarking Examples: Includes dedicated scripts (
examples/benchmark_*.pyin the source repo) comparing various agents:- Baselines: Random Agent.
- Heuristics: Relevant heuristics adapted for each environment type (e.g., Order-Up-To, Classic Newsvendor, (s,S) for Newsvendor; Base Stock, Constant Order for multi-echelon/network).
- Stable Baselines3 Agents: PPO, SAC, TD3, A2C, DDPG examples.
- Ray RLlib Agents: PPO, SAC examples.
- Detailed Reporting (from Benchmarks): Benchmark examples generate:
- Summary tables (CSV).
- Raw results per episode (CSV).
- Detailed step-by-step data (optional, JSON Lines).
- Comparison plots (PNG).
Installation
You can install the core package using pip:
pip install or_gym_inventory
Metadata
Release files for or-gym-inventory 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| or_gym_inventory-1.0.0.tar.gz | 26.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| or_gym_inventory-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.4 kB
Release files / or_gym_inventory-1.0.0.tar.gz
| Download URL | or_gym_inventory-1.0.0.tar.gz |
|---|---|
| Size | 26.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22ab96f8dae3248e4350545215a297026ae7cecfe1591dd52c5e5f658594716b
|
|
BLAKE2b-256 checksum How to use checksums |
604420c4cf33a99008d6aa33306d1ccae4915ffe751642d4b0eac583c1181cab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Release files / or_gym_inventory-1.0.0-py3-none-any.whl
| Download URL | or_gym_inventory-1.0.0-py3-none-any.whl |
|---|---|
| Size | 27.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edb95db8c1a3f4d4bbc5fd1129e98c68ceee644ec05ec98811bc828bc29ce88b
|
|
BLAKE2b-256 checksum How to use checksums |
e025691999a41a2f3d4d68570c15b5c919dd2a804fcabd15f3c19511acae032a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Security for or-gym-inventory 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.