Replenishment environment for OR and RL algorithms
Folder | Description |
---|---|
ReplenishmentEnv | Replenishment env source code. |
ReplenishmentEnv\config | Config for building the env. |
ReplenishmentEnv\data | Csv based data for skus, including sku_list, info and other dynamic data |
ReplenishmentEnv\env | Kernel simulator for env |
ReplenishmentEnv\utility | Utility simulator for env and wrapper |
ReplenishmentEnv\wrapper | Wrapper for env(Not implement yet)c |
Example | Show case of replenishment env. |
- Download code
git clone https://github.com/zhangchuheng123/ReplenishmentRL.git
- Build and install
python setup.py install
- Run example
import random
from ReplenishmentEnv import make_env
env = make_env("sku58")
env.reset()
for i in range(10):
action_list = [int(random.random() * 10) for i in range(58)]
states, rewards, done, infos = env.step(action_list)
print(infos["balance"])
- Download code
git clone https://github.com/zhangchuheng123/ReplenishmentRL.git
-
Build the environment
Only python >= 3.8.0 is tested.
- Build by conda
conda create -n ReplenishmentEnv python=3.8.0 -f requirements.txt
- Build by pip
pip install -r requirements.txt
-
Run example
python Example\random_actions.py
- Prepare the data including sku_list, info and dynamic data.
- Prepare the env config following the instruction in Demo.yml
- Prepare the special or current wrapper
- Register in ReplenishmentEnv\init.py file