http://en.wikipedia.org/wiki/Traveling_purchaser_problem
This should be the exact problem Theo is getting into now.
Snuble, this problem has already been implemented in the .NET client. That point of the .NET was to get a working prototype, and that was successful. At this point, it's just a matter of porting the code while adding additional features such as login/logout, user preferences, etc.