See an example model attached. It finds a simple path from s to t, whose length is closest to the desired length. The idea to eliminate subtours is the same as in tsp.mod. However I think there must be a more elegant formulation.
For your instance I obtained the following solution:
Optimal path has length 1121
From node To node Distance
2 6 120
3 5 37
6 3 208
5 7 36
7 9 41
9 11 182
11 12 224
12 17 187
17 16 86
Andrew Makhorin
path.mod
Description: Binary data
_______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
