Skip to content

Optimize walking distance#7

Merged
tvwenger merged 3 commits into
tvwenger:masterfrom
mvinni:optim-final-walk-pub
Sep 4, 2016
Merged

Optimize walking distance#7
tvwenger merged 3 commits into
tvwenger:masterfrom
mvinni:optim-final-walk-pub

Conversation

@mvinni

@mvinni mvinni commented Mar 20, 2016

Copy link
Copy Markdown
Contributor

This is a variation of the pull request #2.

Since improveEdgeOrder is called several times in a loop, I put the new code in a new function, improveEdgeOrderMore, that is only called once on the final plan. This doesn't affect the running time of the program as much, but also may give slightly poorer results (the triangulation chosen with the improveEdgeOrder metric may not be the one giving the best result with improveEdgeOrderMore).

This still seems to make the path much shorter no matter what the triangulation actually is, so no harm there (perhaps the attempts loop could optimize on something else besides the path length again?).

mvinni added 3 commits March 20, 2016 23:26
Records edge dependencies and uses that information
to reorder edges in the edge sequence as long as the path
length is reduced.

This version calls the new method only on the final
plan, since it is slightly slower than the original
'improveEdgeOrder'.
Childless "exterior" triangles can be completed in any order.
If the triangle has children, make sure to complete the edge
opposite of the final vertex early (not as the last edge).
Otherwise the greedy optimizer might move the completion of
that edge last, causing two (or more) triangles to be
constructed at the same side of the edge at the same time.

This usually shaves off some additional percents of the
total route length.
- Improve speed of path length calculation using numpy operations
- Ignore numerical inaccuracy "improvement" in path length
- path length improvement: don't test some hopeless moves
@tvwenger tvwenger merged commit f18098c into tvwenger:master Sep 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants