How sobihansurendran/lgs works
This repository implements Latent Guided Sampling for TSP and CVRP. The principal workflow is to configure and train a problem-specific latent-space model, or run inference on saved instances using provided pretrained weights; the README describes LGS inference as using MCMC and stochastic approximation. Sampled trainer and environment code establishes some internal calls, while inference wiring and most test-script behavior were not sampled, so those links are omitted or marked unverified.
Main entry points: TSP/test.py TSP inference · CVRP/test.py CVRP inference · TSP/train.py TSP trainer · CVRP/train.py CVRP trainer
Components 22
TSP runtime
- TSP train command
TSP/run_train.py - TSP trainer
TSP/train.py - TSP latent model
TSP/model.py - TSP environment
TSP/env.py - TSP instances
TSP/problem.py - TSP inference command
TSP/run_test.py - TSP inference
TSP/test.py
CVRP runtime
- CVRP train command
CVRP/run_train.py - CVRP trainer
CVRP/train.py - CVRP latent model
CVRP/model.py - CVRP environment
CVRP/env.py - CVRP instances
CVRP/problem.py - CVRP inference command
CVRP/run_test.py - CVRP inference
CVRP/test.py
Problem assets
- TSP saved instances
TSP/data - TSP pretrained weights
TSP/model/TSP_100_LGS_Net.pt - CVRP saved instances
CVRP/data - CVRP pretrained weights
CVRP/model/CVRP_100_LGS_Net.pt
Learning method
- LGS sampling
- MCMC
- Stochastic approximation
Other components
- Engineer
Connections 24
- Engineer → TSP train command: runs training
README.md - Engineer → TSP inference command: runs inference
README.md - Engineer → CVRP train command: runs training
- Engineer → CVRP inference command: runs inference
- TSP train command → TSP trainer: calls
TSP/run_train.py - TSP trainer → TSP latent model: creates
TSP/train.py - TSP trainer → TSP environment: creates
TSP/train.py - TSP environment → TSP instances: generates instances
TSP/env.py - CVRP train command → CVRP trainer: calls
CVRP/run_train.py - CVRP trainer → CVRP latent model: creates
CVRP/train.py - CVRP trainer → CVRP environment: creates
CVRP/train.py - CVRP environment → CVRP instances: generates instances
CVRP/env.py - TSP inference command → TSP inference: dispatches
- CVRP inference command → CVRP inference: dispatches
- TSP inference → TSP latent model: uses for inference
- CVRP inference → CVRP latent model: uses for inference
- TSP inference → TSP saved instances: loads instances
- CVRP inference → CVRP saved instances: loads instances
- TSP inference → TSP pretrained weights: loads weights
- CVRP inference → CVRP pretrained weights: loads weights
- TSP inference → LGS sampling: runs sampling
- CVRP inference → LGS sampling: runs sampling
- LGS sampling → MCMC: uses
README.md - LGS sampling → Stochastic approximation: uses
README.md