lakshminarayananp/openenv-auxon-inventory-management
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Auxon Inventory Optimization โ RL Environment
This repository contains a complete, production-ready Reinforcement Learning (RL) environment for optimizing inventory management in an e-commerce context.
๐ฏ Project Goal
The objective is to maximize total profit while balancing stock levels, pricing, and warehouse capacity constraints. The agent must navigate stochastic demand influenced by pricing decisions.
๐ง RL Design
State (Observation)
Each step returns a Observation model:
product_id: Unique identifiercurrent_stock: Units availabledemand_rate: Predicted demand for the stepproduct_price: Current selling pricestorage_cost_per_unit: Cost to hold one unitwarehouse_capacity_remaining: Available spacedays_left: Time steps remaining in episodeunmet_demand: Stockout quantity from previous stepholding_cost: Total cost for current stock
Action Space
restock(quantity): Increase inventory (at 50% base price cost)reduce_price(percentage): Increase demand, lower marginincrease_price(percentage): Decrease demand, higher margintransfer_warehouse(quantity): Move stock (at fixed cost)do_nothing: No change
Reward Function
Reward = Sales_Revenue - Restock_Cost - Storage_Cost - Stockout_Penalty - Overstock_Penalty - Transfer_Cost
๐งช Scenarios & Grading
The environment supports three difficulty levels in scenarios.py:
- Easy (Auxon Basics): Low fluctuation, stable demand.
- Medium (Seasonal): Higher demand variance.
- Hard (Mega Sale Day/Festival): Extreme demand spikes and tight capacity.
Grading: Each scenario calculates a normalized score (0 to 1) based on cumulative profit targets.
๐ Setup & Execution
Local Development
- Install dependencies:
pip install -r requirements.txt- Run the Dashboard:
python app.py- Open
http://localhost:8000in your browser.
Docker
docker build -t auxon-inventory-rl .
docker run -p 7860:7860 auxon-inventory-rlInference Log Format
To run a strict-format inference (for OpenEnv evaluation):
python inference.py๐งฉ Technical Stack
- Backend: FastAPI, Pydantic, NumPy
- Frontend: Vanilla HTML5, CSS3 (Glassmorphic), JavaScript
- Visualization: Chart.js
- Spec: OpenEnv v1.0
