Hi guys,
I wasn't sure if this had been done before, a quick search only yielded people saying how difficult it was, so I thought I'd knock up a quick script to solve the "Travelling Salesman" problem.
Simply, you enter a list of systems into the script, and it will calculate the fastest route (in lightyears) from your initial starting point and going through all the stops.
It's pretty quick and dirty, and unfortunately the larger file which includes ALL systems in the universe has a tendency of crashing Chrome due to its size. I'll work on some sort of batch processing. (Note that Microsoft Edge seems to handle it quite well - I just threw the 600mb json file at it plus 50 random systems and it did it in less than 30 seconds! (<<Picture link))
This was thrown together to give me a hand with Sothis runs so I didn't accidentally go the slightly more inefficient route.
https://github.com/Makeshift/EDSalesmanSolver
Future plans for this, if demand allows it, is to put the data into a database to speed up system lookup so I can host it properly on my website, general UI improvements and other fun things. I understand this might be quite niche, but it could be handy for explorers and especially traders.
Cheers guys!
I wasn't sure if this had been done before, a quick search only yielded people saying how difficult it was, so I thought I'd knock up a quick script to solve the "Travelling Salesman" problem.
Simply, you enter a list of systems into the script, and it will calculate the fastest route (in lightyears) from your initial starting point and going through all the stops.
It's pretty quick and dirty, and unfortunately the larger file which includes ALL systems in the universe has a tendency of crashing Chrome due to its size. I'll work on some sort of batch processing. (Note that Microsoft Edge seems to handle it quite well - I just threw the 600mb json file at it plus 50 random systems and it did it in less than 30 seconds! (<<Picture link))
This was thrown together to give me a hand with Sothis runs so I didn't accidentally go the slightly more inefficient route.
https://github.com/Makeshift/EDSalesmanSolver
Future plans for this, if demand allows it, is to put the data into a database to speed up system lookup so I can host it properly on my website, general UI improvements and other fun things. I understand this might be quite niche, but it could be handy for explorers and especially traders.
Cheers guys!