pgRouting/pgrouting — pull request #49 by 715elvi (2011-11-18 17:19:20+00:00)
Title: TSP with fixed source & destination

Extending TSP solver to support the case where both the source and
destination nodes are specified.

I'm not sure if this case is covered somewhere already, but I didn't see a way to do it. I needed to solve TSP for multiple locations between a fixed start and end point. My solution is fairly trivial, I simply added new seed (tspd_seed) and score (tspd_score) functions to tsp_solver to handle the case where a destination is specified. There is probably a cleaner way to do this, but my C programming skills are limited.