https://github.com/jolibrain/wheatley
Next-generation scheduling problem solver based on GNNs and Reinforcement Learning
https://github.com/jolibrain/wheatley
graph-neural-networks jssp planning reinforcement-learning scheduling
Last synced: 5 months ago
JSON representation
Next-generation scheduling problem solver based on GNNs and Reinforcement Learning
- Host: GitHub
- URL: https://github.com/jolibrain/wheatley
- Owner: jolibrain
- License: other
- Created: 2023-03-29T07:09:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-10T15:41:25.000Z (7 months ago)
- Last Synced: 2025-05-09T00:08:04.229Z (5 months ago)
- Topics: graph-neural-networks, jssp, planning, reinforcement-learning, scheduling
- Language: Python
- Homepage:
- Size: 19.7 MB
- Stars: 55
- Watchers: 5
- Forks: 18
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Wheatley
A Job-Shop Scheduling problem (JSSP) and Ressource-Constrained Planning Scheduling Problem (RCPSP) solver based on Reinforcement Learning, targeted to solving real-world industrial problems, and more.
This repo contains the official implementation of [Learning to Solve Job Shop Scheduling under Uncertainty](https://arxiv.org/abs/2404.01308), published at [CPAIOR 2024](https://link.springer.com/book/10.1007/978-3-031-60597-0?page=2#toc) ([slides](/docs/cpaior_slides.pdf)).
## Features
- Trains a scheduler for fixed or problems with uncertainty
- Support for training over random problems and generalize
- Support for training over problems with bounded but uncertain durations
- Reads JSSP in Taillard format, extended for uncertain durations
- Web live training metrics reported with [Visdom](https://ai.facebook.com/tools/visdom/)
- Includes schedule visualization as Gantt charts
- Compares to OR-Tools
- Relies on state-of-the art Deep Learning libraries: written with [Pytorch](https://pytorch.org/), and [DGL](https://www.dgl.ai/) for graph neural networks## Installation
- Install pytorch for your hardware [(instructions here)](https://pytorch.org/get-started/locally/)
- Install dgl for your hardware [(instructions here)](https://www.dgl.ai/pages/start.html)
- Install other dependencies: `pip install -r requirements.txt`Note: for windows users, we strongly recommend to use [anaconda](https://www.anaconda.com/)
## How to use
See [JSSP](docs/JSSP.md), [PSP](/docs/PSP.md), [ARGUMENTS](/docs/ARGUMENTS.md) and [ADVICE](/docs/ADVICE.md) for more information.
## Contribute
If you want to contribute to wheatley, make sure to install the pre-commit hooks:
```sh
pre-commit install
```## Technical details
- Wheatley learns how to schedule well and generalize over problems and/or uncertainty. It works from a representation of the schedule state-space directly, as opposed to the state-space of jobs and machines.
- Uses PPO as the main RL algorithm
- Captures schedules in the form of graphs and trains with an underlying Graph Neural Network
- Large number of hyper-parameters, default values are set to the best currently known values
- A small choice of different rewards is implemented.## References
- Wheatley first intended to replicate L2D, a model proposed in this paper:
[Learning to Dispatch for Job Shop Scheduling via Deep Reinforcement Learning](https://arxiv.org/pdf/2010.12367)
- Uses some intuitions and ideas from [A Reinforcement Learning Environment For Job-Shop Scheduling](https://arxiv.org/abs/2104.03760)## Differences with L2D and Other JSSP-RL Implementations
- Rewards are normalized
- Wheatley uses proper batching and parallel environments
- Wheatley uses advanced GNN, such as gatv2 (with edge info) thanks to DGL.
- Wheatley embeds more information into every node of the schedule graph (like propagated time bounds), yielding more informed policies
- Wheatley has support for bounded uncertain durations, including at node and reward levels.## Citing Wheatley (JSSP)
```
@inproceedings{wheatley-jssp,
title={Learning to Solve Job Shop Scheduling under Uncertainty},
author={Guillaume Infantes and St/'ephanie Roussel and Pierre Pereira and Antoine Jacquet and Emmanuel Benazera},
booktitle={21th International Conference on Integration of Constraint Programming, Artificial Intelligence, and Operations Research (CPAIOR)},
year={2024},
}```