mapbox / node-or-tools

Node.js bindings for or-tools vehicle routing problems
MIT License
147 stars 48 forks source link

RouteLocks is for establish starting points in order, or to assign points to route to visit optimized? #60

Open carlosen14 opened 6 years ago

carlosen14 commented 6 years ago

I am working with routeLocks to assign some points to a certain route and to visit them along with others remain, in a optimized way. But instead it just makes the VRP to push them in first place to visit starting the route without analyze if those points are optimized.

As you can see in the image red route start from point depot, goes to point 1, next it goes back to point 2, and goes to point 3 which is close to point 1. With routeLock I expected to assign those points to certain route and visit them optimized. As you can see the route is not optimized, it goes far away, and then comes close to depot, then goes far away close to the first point and come back to depot, the traveling time is the highest possible. geojson io 2

Expected result.. geojson io 4 Or this.. geojson io 3

Any help? Did I understand wrong? Is Node-or-tools capable to solve this and assign points to a route and visit them in a optimized way?