Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Solving Travelling Salesman Problem with Graph Neural Networks.

License

Notifications You must be signed in to change notification settings

Junner1st/GNN-TSP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solving TSP with Graph Neural Networks

Data

來自政府資料開放平台的鄉鎮市區界線(TWD97經緯度)

Environment Creation

conda env create -f environment.yml

Usage

邊界 poly 計算與繪製

python src/graphic.py

會產生 adjacency_record.txt 以及 graph_all_towns.png 與 graph_main_island.png

adjacency_record.txt 有鄰接矩陣以及各縣市與台灣的 polygon

DP algorithm on TSP

要跑台北市

python src/TSP/tsp.py --county 臺北市 --output outs/tsp_taipei_dp.png

不建議跑台中市或大於 25 個節點以上的縣市,因為可能會導致你的機器崩潰(我有 125GB RAM 都壞了)。

GNN algorithm on TSP

python src/TSP/gnn_tsp.py --county 臺北市 --output outs/tsp_taipei_dp.png

Tested Environment

OS:

  • Pop!_OS 22.04 LTS

Devices:

  • AMD Ryzen™ 5 5500U with 4.66GB memory and 11.6GB swap
  • AMD Ryzen™ 9 9950X with 125GB memory and 20GB swap

About

Solving Travelling Salesman Problem with Graph Neural Networks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages