Skip to main content
added 132 characters in body
Source Link
FelixIP
  • 23.3k
  • 3
  • 31
  • 62

Graph shows road network and my aim is to create 9000 loop route. For that we can explore all nodes that 'slightly' further away than 4500 m. So pick one and find best route to it from START:

enter image description here

Backup and temporarily remove edges of that route from the graph and recalculate best route between same 2 nodes:

enter image description here

Merge new route with backup to store first computed option (9800 m total, so 4000 m threshold was too high!):

enter image description here

Restore edges, repeat with next candidate. Note if your START-FINISH node is dangling, removing edges won't work. So simply increase weight of travelled edges significantly (this is what I called make edges very heavy).

See also Creating laps... post

Graph shows road network and my aim is to create 9000 loop route. For that we can explore all nodes that 'slightly' further away than 4500 m. So pick one and find best route to it from START:

enter image description here

Backup and temporarily remove edges of that route from the graph and recalculate best route between same 2 nodes:

enter image description here

Merge new route with backup to store first computed option (9800 m total, so 4000 m threshold was too high!):

enter image description here

Restore edges, repeat with next candidate. Note if your START-FINISH node is dangling, removing edges won't work. So simply increase weight of travelled edges significantly (this is what I called make edges very heavy).

Graph shows road network and my aim is to create 9000 loop route. For that we can explore all nodes that 'slightly' further away than 4500 m. So pick one and find best route to it from START:

enter image description here

Backup and temporarily remove edges of that route from the graph and recalculate best route between same 2 nodes:

enter image description here

Merge new route with backup to store first computed option (9800 m total, so 4000 m threshold was too high!):

enter image description here

Restore edges, repeat with next candidate. Note if your START-FINISH node is dangling, removing edges won't work. So simply increase weight of travelled edges significantly (this is what I called make edges very heavy).

See also Creating laps... post

Source Link
FelixIP
  • 23.3k
  • 3
  • 31
  • 62

Graph shows road network and my aim is to create 9000 loop route. For that we can explore all nodes that 'slightly' further away than 4500 m. So pick one and find best route to it from START:

enter image description here

Backup and temporarily remove edges of that route from the graph and recalculate best route between same 2 nodes:

enter image description here

Merge new route with backup to store first computed option (9800 m total, so 4000 m threshold was too high!):

enter image description here

Restore edges, repeat with next candidate. Note if your START-FINISH node is dangling, removing edges won't work. So simply increase weight of travelled edges significantly (this is what I called make edges very heavy).