A Graph Attention Network (GAT) to schedule jobs in an ETO manufacturing environment, trained with a Multi-Agent version of the Proximal Policy Optimization (MAPPO) algorithm.
Neumann, Anas (2024). A hyper-graph neural network trained with multi-agent proximal policy optimization to schedule engineer-to-order projects *GitHub repository: https://github.com/AnasNeumann/gns*.
@misc{HGNS,
author = {Anas Neumann},
title = {A hyper-graph neural network trained with multi-Agent proximal policy optimization to schedule engineer-to-order projects},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/AnasNeumann/gns}},
commit = {main}
}
python -m venv ./gns_env
source ./gns_env/bin/activate
pip install --upgrade -r requirements.txt
- CHOOSE EITHER GNS_SOLVER, EXACT_SOLVER, INSTANCE_GENERATOR, or RESULTS_ANALYS (see bellow for the rest)
desactivate
bash _env.sh
python instance_generator.py --train=150 --test=50
bash _env.sh
python exact_solver.py --size=s --id=151 --path=./ --mode=test --time=1
bash _env.sh
- Pre-train on several instances (using MAPPO)
python gns_solver.py --train=true --target=false --mode=test --path=./ --number=1
- Solve on instance (inference mode only)
python gns_solver.py --train=false --target=true --size=s --id=151 --mode=test --path=./ --number=1
- Solve all test instances (inference mode only)
python python gns_solver.py --train=false --target=false --mode=test --path=./ --number=1
- Fine-tune on target instance (using MAPPO)
python gns_solver.py --train=true --target=true --size=s --id=151 --mode=prod --use_pretrain=true --interactive=false --path=./ --number=1
python gns_solver.py --train=true --target=true --size=s --id=151 --mode=prod --use_pretrain=false --interactive=true --path=./ --number=1
- DRAC = Digital Research Alliance of Canada
# job duration, number of CPUs, and memory used are dynamically related to the instance size (no GPU/TPU for exact jobs)
python ./jobs/exact_builder.py --account=x --parent=y --mail=x@mail.com
python ./jobs/gns_builder.py --account=x --parent=y --mail=x@mail.com --time=32 --memory=16 --cpu=1 --number=1
cd jobs/scripts/
bash 0_run_purge.sh
bash 1_run_all.sh train exact_s exact_m exact_l exact_xl exact_xxl exact_xxxl
The main results we analyze are:
- Solution Quality: deviation between GNS and EPSIII per instance size
- Scalability: computing time and memory per instance size and solution type (GNS versus EPSIII)
- Convergence: value loss over iterations as well as policy loss and entroy per agent and over time [GNS only]
python results_analysis.py --path=./ --last=9