mapbox / node-or-tools

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

How to minimize number of vehicles and enforce routes to maximize usage #67

Closed educunarro closed 5 years ago

educunarro commented 5 years ago

Hi,

I'am trying to minimize the number of vehicles while enforcing to maximize their usage. A vehicle can make a route of maximum 7 hours (I calculate "distance" base on time). To do this I use the following lines of code:

image

However, for what I saw it is apply as a maximum but not as a maximizer. Our idea is that if the algorithm finds 2 routes, then 1 route should be almost 7 hours lenght and the other only the necessary.

Thanks for you time,

Regards,