Hi to everybody

I'm looking for a solution to a problem I heard would be resolvable with the Dijkstra algoritm, but I am not really sure it would be the real solution.
My problem is the following:
  1. I got a list of 764 ocurrencies (Variables: Code, County_name, Lon, Lat);
  2. an another matrix with the distances between pairwise of 32 nodes
  3. The geodesic distance between pairwise of any singular origin/destination (764) and the nodes
I need to perform the calculation tha allow me to find the minimum distance between all the pairwise of the 764 ocurrencies passing by the two of the 32 nearest nodes
I'm working on it for a very lasting time, and also if I can conceptualise that in my mind, I'm looking to a good solution that could allow to me to manage all the new 500k+ and I think the Dijkstra algoritm would be a good solution, but I can't find anything in the search help repository of Stata.

Thanks a lot.