GraphHopper.com | Forum | GitHub | Maps | Blog

Minimize vehicles explicitly - beta release


#1

We completely revised the way users can define objectives. Currently, you specify objectives by specifying an algorithm object in your json request. We improved this and made it much more intuitive. For example:

"algorithm": {
   "problem_type": "min",
   "objective": "completion_time"
}

becomes

"objectives": [
   {
      "type": "min",
      "value": "completion_time"
   }
]

This way you can also specify multiple objectives such as minimizing vehicles first, and completion_time second. You would specify it like this:

"objectives": [
   {
      "type": "min",
      "value": "vehicles"
   },
   {
      "type": "min",
      "value": "completion_time"
   }
]

Please note that minimizing vehicles is still beta.


Optimize all services and shipments by one vehicle within vehicle's working hours
#2

This feature is now part of the official documentation.