itinero / routing

The routing core of itinero.
Apache License 2.0
222 stars 71 forks source link

TSP does not return to start #50

Closed t22dk closed 7 years ago

t22dk commented 7 years ago

It looks like the newest nuget package has a small problem.

When i try to calculate TSP routes, it does not go back to the starting point.

And I can't find any options on the CalculateTSP function. It might be, that you could choose if it should return. This would be a nice feature. But the plain TSP should return to the start node, right ?.

BR Martin.

xivk commented 7 years ago

Hi Martin,

The default on CalculateTSP is the 'Open TSP' version. If you add first and last equal to '0' then it should return back to the first customer.

Check here: https://github.com/itinero/optimization/blob/develop/src/Itinero.Optimization/RouterExtensions.cs#L49

There are three options:

Could you log future issues here?:

https://github.com/itinero/optimization

Please be aware that this code is still moving a lot, meaning things can change fast and are still relatively experimental. I'm expecting to have something more stable with basic documentation in 4 to 8 weeks.

Also, package name has changed to Itinero.Optimization. Closing this issue here, feel free to create new ones in the other repo about this.

t22dk commented 7 years ago

Thanks.

You just changed the default.

Is the nuget packages auto updated?, I cant find the new settings in the latest release ?

I will log it the right place next time :-)

xivk commented 7 years ago

Just to let you know I updated the readme with some more info:

https://github.com/itinero/optimization

Everything you need should be in there.