SetDispatch code for total-tardiness scheduling on identical, related, and unrelated parallel machines. The policy learns sequential dispatching decisions from MIP reference schedules.
This is the code-only research repository for the full PMS project. Data, checkpoints, raw outputs, and manuscript files are supplied separately and are excluded from Git. This repository is not yet a complete paper-reproduction archive or an accepted IJOC archive.
| Path | Purpose |
|---|---|
src/train_dynamic.py |
Identical-machine policy and training |
src/make_dispatch_labels.py |
Identical non-delay dispatch labels |
src/evaluate_dynamic.py |
Identical-machine decoding |
src/train_dynamic_related.py |
Related-machine pair-policy training |
src/train_dynamic_related_unrelated.py |
Frozen pair-policy training, also used for the legacy unrelated models |
src/make_dispatch_labels_related*.py |
Exact-replay pair labels |
src/evaluate_dynamic_related_unrelated.py |
Frozen pair-policy evaluator |
src/generate_instances*.py |
Identical, related, and unrelated instance generators |
src/pms_heuristic.py |
Identical MDD, ATC, and NDPRTT baselines |
src/related_unrelated_heuristics.py |
Heterogeneous COVERT, ATCR, MON, and EDD baselines and local improvement |
src/related_unrelated_atc_heuristic.py |
Additional heterogeneous ATC baseline |
src/solvers/ |
Time-indexed MIP formulations and CSV solver drivers |
src/wait_action/ |
Later unrelated wait-action trainer, labels, and matching evaluator |
src/train_dynamic_pair_xattn.py, src/eval_pair_xattn.py |
Pair-policy cross-attention ablation |
src/reconstruct_results.py, src/plot_gap_summary.py |
Identical release table and figure reconstruction |
scripts/check_code.py |
Syntax and existing synthetic model/decoder checks |
docs/source_manifest.json |
Source locations and SHA-256 fingerprints |
The three main frozen pair-policy files come from the 11 July 2026 snapshot. The wait-action extension remains separate because its labels and checkpoints are not interchangeable with those of the frozen pipeline. See provenance and scope.
Use Python 3.10 or later in a dedicated environment:
python -m pip install -r requirements.txt
python scripts/check_code.pyFor reference-solution generation, install requirements-solver.txt and configure
Gurobi with a valid license. The frozen CSV solver drivers contain experiment
filenames and solver settings near the top; edit those before running them.
The drivers may write back to the configured input file, so use a working copy.
These dependency lists are not a lockfile for the historical cluster environment.
Run commands from the repository root. Create data/, models/, and results/
as needed; the placeholder directories in this repository already exist.
Training requires solved instance CSVs with the schedule columns expected by the
corresponding label builder. The trainer builds labels when its label cache is
absent. Use a separate label cache for each environment and label mode.
The following Bash example uses paths to files you supply:
export DGSF_TRAIN_CSV=data/train.csv
export DGSF_LABELS_PKL=data/identical_labels.pkl
export DGSF_SAVE_PATH=models/identical.pth
python src/train_dynamic.py
export DGSF_TEST_CSV=data/test.csv
export DGSF_MODEL_PATH=models/identical.pth
export DGSF_OUTPUT_CSV=results/identical.csv
python src/evaluate_dynamic.pyFor related machines, use src/train_dynamic_related.py and
src/evaluate_dynamic_related_unrelated.py, with related data, a fresh label cache,
and the matching checkpoint. For legacy unrelated pair models, use
src/train_dynamic_related_unrelated.py and the same pair evaluator.
For the separate wait-action extension:
export DGSF_TRAIN_CSV=data/unrelated_train.csv
export DGSF_LABELS_PKL=data/unrelated_executable_labels.pkl
export DGSF_SAVE_PATH=models/unrelated_wait.pth
export DGSF_LABEL_MODE=executable_replay
export DGSF_USE_WAIT_ACTION=1
export DGSF_VECTORIZE_FEATURES=1
python src/wait_action/train_dynamic_unrelated.py
export DGSF_TEST_CSV=data/unrelated_test.csv
export DGSF_MODEL_PATH=models/unrelated_wait.pth
export DGSF_OUTPUT_CSV=results/unrelated_wait.csv
python src/wait_action/evaluate_dynamic_related_unrelated.pyOn PowerShell, set variables with $env:DGSF_TRAIN_CSV = 'data/train.csv'
and the equivalent syntax for the other variables, then run the same Python
commands. The legacy DGSF_ variable names are retained for compatibility.
Training overrides include DGSF_EPOCHS, DGSF_BATCH_SIZE, DGSF_LR, and
DGSF_LAM_RANK.
Generators and heuristic scripts retain their original configuration sections; inspect those before running. Historical filenames are documented in the code. The identical reconstruction scripts expect the earlier identical release's file naming and metrics; they are not a combined IJOC result reconstruction.
python scripts/check_code.py --syntax-only
python scripts/check_code.pyThe full check runs the existing synthetic checks for the identical trainer, frozen pair trainer and decoder, and wait-action trainer and decoder on CPU. It does not need research data or a solver license. These checks do not establish paper-level reproducibility, which requires the separately supplied artifacts.
Daniel Zhu and Christos T. Maravelias, Princeton University. MIT license, carried over from the local IJOC repository template.