mhahsler / TSP

Traveling Salesperson Problem - R package
63 stars 13 forks source link

Large data - `Error: vector memory exhausted (limit reached?)` Suggestion? #6

Closed amrrs closed 5 years ago

amrrs commented 5 years ago

Hi,

I've about 200K cities / rows and I'm running into this issue always. Any suggestions what can i do?

Thanks!

mhahsler commented 5 years ago

A 200k x 200k distance matrix will not fit into memory. You would need

> 200e3*(200e3-1)/2 * 4 / 2^30
[1] 74.50543

GB. If you have the data (coordinates of the cities) and Euclidean distance makes sense, then you can create an ETSP and use Concorde or Linkern to solve it. See ? ETSP