So I have a set of points in a city (say houses or residences) and I want to find the shortest distance between these points and a set of candidate points for a store. I am looking for the best store locations that will minimize the distance to all of the houses in the set. So I will iteratively move the candidate store points and then recompute the distances between each store and house (again using Djikstra's algorithm). Because of the sheer volume of calculations, I cannot keep hitting the database for each iteration of the optimization algorithm.
I have used pgrouting many times and this would work, however it would be too slow because of the large number of points and the fact that it has to search the disk each time.
Is there a tool where I an load some small Open Street Maps city map in memory and then calculate the shortest routes in memory? I would need something fast, so preferably in C or python? But any language is okay as long as it works.