Skip to content

YujiaoHu/RouteMaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

RouteMaker

Used to solve MDMTSP-CFA, MDMTSP-CFD, SDMTSP

SDMTSP: Single-depot multiple traveling salesman problem, agents must start and end traveling at the depot

MDMTSP: Dedicated multi-depot MTSP, agent must start traveling at their dedicated depots.

MDMTSP-CFD: one MDMTSP variation, in which agents start and commence travels from their dedicated depots

MDMTSP-CFA: one MDMTSP variation, in which agents start traveling from any locations.

Dependencies

  • Python >= 3.10
  • Numpy
  • Google OR-Tools
  • PyTorch >= 2.1.2
  • tqdm
  • TensorboardX

Training

cd partition-git

Training RouteMaker for MDMTSP-CFA

Model will be saved at ../savemodel

python train.py --problem cfa

Training RouteMaker for MDMTSP-CFD

python train.py --problem cfd

Training RouteMaker for SDMTSP

python train.py --problem sdmtsp

Testing

cd partition-git

Testing RouteMaker tailored for MDMTSP-CFA on testset with 10 agents and 100 locations.

Code will automatically load the learned model under ../savemodel/

python eval.py --problem cfa --anum 10 --cnum 100

Testing RouteMaker tailored for MDMTSP-CFD on testset with 20 agents and 200 locations.

python eval.py --problem cfd --anum 20 --cnum 200

Testing RouteMaker tailored for SDMSTP on testset with 20 agents and 200 locations.

python eval.py --problem sdmtsp --anum 20 --cnum 200

Troubleshooting

  • The number of depots and current positions are not included in the total number of locations.
  • Before running the code, use ulimit -n 99999 to enable high parallel processing.
  • The three pretrained RouteMaker for MDMTSP-CFA, MDMTSP-CFD, SDMTSP can be downloaded from https://pan.baidu.com/s/1Tc935Verqe0HW5NGfhQZgw?pwd=fkjf with extract password: fkjf
  • In the very rare event that RouteMaker fails to converge, please delete the faulty model and retrain a new one.

About

Used to solve MDMTSP-CFA, MDMTSP-CFD, SDMTSP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages