GarimaDahuja/openenv-manufacturing-rl
Manufacturing Process Optimization (OpenEnv RL)
Overview
This project implements a reinforcement learning environment for manufacturing process optimization using OpenEnv. The environment simulates a factory where jobs must be assigned to machines efficiently to minimize delays and maximize utilization.
Motivation
Efficient scheduling is essential in manufacturing systems. This environment models real-world constraints such as machine availability, job priorities, and machine breakdowns, enabling the development of intelligent scheduling strategies.
Observation Space
The state includes:
- machines: list of machines with id, status (idle, busy, broken), remaining_time, breakdown probability
- jobqueue: list of jobs with id, processingtime, and priority
- current_time: current timestep
Action Space
An action consists of:
- machine_id: selected machine
- job_id: selected job
The agent assigns a job to a machine.
Tasks
Three tasks are defined:
- Minimize Idle Time (Easy) Score = 1 - (idle machines / total machines)
- Optimize Completion Time (Medium) Score = optimaltime / actualtime
- Handle Machine Failures (Hard) Score = working machines / total machines
The overall score is the average of all three tasks.
Reward Function
The reward provides:
- positive reward for job completion
- penalty for idle machines
- penalty for delay based on time
Rewards are normalized between 0 and 1.
Setup
Install dependencies:
pip install -r requirements.txtSet environment variable:
set HF_TOKEN=dummyRun inference:
python inference.pyDocker
Build:
docker build -t openenv-rl .Run:
docker run openenv-rlBaseline Performance
Typical results using the baseline agent:
- Task 1: 1.0
- Task 2: 1.0
- Task 3: 1.0
- Overall: 1.0
Scores may vary due to randomness.
Project Structure
env/
env.py
models.py
tasks.py
openenv.yaml
agent.py
inference.py
test_env.py
requirements.txt
Dockerfile
README.md