How edouard-rabasse/vrp works
Project type and purpose
• This is a hybrid “solver + ML pipeline + visualization” project.
• The Java subsystem (under MSH/) implements VRP solving heuristics and experiments.
File structure
• Top-level directories:
• MSH/ – Java-based VRP solver, configs, experiments, JARs, & data sets.
• config/, configs/, environment.yml, requirements.txt – Hydra/YAML configs for Python.
• src/ – Python ML code: data loaders, models, pipeline, solver_client, visualization.
• bash/, commands/ – helper scripts to run solver, training, plotting.
• Tests cover both solver integration and Python pipeline.
README
• Describes two main workflows:
• training: “python train.py <config> …”
• Core objective: predict modification probability + show location via heatmap / mask.
Main components & interactions
a. VRP Solver Service (Java/M SH)
• Inputs: VRP instance files (TSPLib, custom coords, config XML)
• Outputs: optimal/modifed routes, arc data
• Interfaces: called by Python via solver_client (subprocess invoking JARs or bash scripts)
b. Data Layer (Python src/data, config/data)
• Reads raw routes & modifications; transforms into images/tensors; provides Dataset
c. ML Training Pipeline (train.py → src/train_functions, trainers/)
• Uses config files (Hydra) to instantiate model, optimizer, data loader
• Models: CNN (resnet, vgg), ViT, MFCN, MultiTaskVisualModel
• Losses: classification & localization (heatmap/mask)
d. Scoring & Solver Client (src/pipeline/solver_client.py)
• Optionally computes solver‐based features or gets ground truth from MSH
e. Optimized Pipeline (src/pipeline/optimized_pipeline.py)
• Orchestrates end-to-end: load model, load data, run inference, post-process heatmaps
• Generates and overlays heatmaps/masks onto route images
• Scripts & notebooks to plot ROC, results, batch heatmaps
g. Configuration Management
• Hydra/YAML configs under config/, configs/benchmark.yaml
• Defines model, data, solver, and plotting parameters
h. Orchestration Scripts
• bash/*.sh and commands/*.bat glue the Java solver and Python pipeline
Architectural patterns & design principles
• Separation of concerns: solver vs. ML code vs. visualization
• Config-driven instantiation (Hydra pattern) for easy experiment variation
• Modular ML pipeline: loader → model → scorer → visualizer