CoolFace
Apppublic

lakshminarayananp/openenv-auxon-inventory-management

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
0likes
App README

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 identifier
  • โ€”current_stock: Units available
  • โ€”demand_rate: Predicted demand for the step
  • โ€”product_price: Current selling price
  • โ€”storage_cost_per_unit: Cost to hold one unit
  • โ€”warehouse_capacity_remaining: Available space
  • โ€”days_left: Time steps remaining in episode
  • โ€”unmet_demand: Stockout quantity from previous step
  • โ€”holding_cost: Total cost for current stock

Action Space

  • โ€”restock(quantity): Increase inventory (at 50% base price cost)
  • โ€”reduce_price(percentage): Increase demand, lower margin
  • โ€”increase_price(percentage): Decrease demand, higher margin
  • โ€”transfer_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:

  1. 1.Easy (Auxon Basics): Low fluctuation, stable demand.
  2. 2.Medium (Seasonal): Higher demand variance.
  3. 3.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

  1. 1.Install dependencies:
bash
   pip install -r requirements.txt
  1. 1.Run the Dashboard:
bash
   python app.py
  1. 1.Open http://localhost:8000 in your browser.

Docker

bash
docker build -t auxon-inventory-rl .
docker run -p 7860:7860 auxon-inventory-rl

Inference Log Format

To run a strict-format inference (for OpenEnv evaluation):

bash
python inference.py

๐Ÿงฉ Technical Stack

  • โ€”Backend: FastAPI, Pydantic, NumPy
  • โ€”Frontend: Vanilla HTML5, CSS3 (Glassmorphic), JavaScript
  • โ€”Visualization: Chart.js
  • โ€”Spec: OpenEnv v1.0