GraphHopper.com | Forum | GitHub | Maps | Blog

New specification of optimization objectives

announcements

#1

Currently, the optimization objective can be defined as follows:

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

We changed the way objectives can be defined to:

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

This change has two main reasons: First, there will be the option to define multiple objectives soon and, second, we find it is much more intuitive to set the optimization goals this way.

Note that you can still use the old specification. It is just deprecated and not recommended anymore since in future (and for future versions) we will rely on the new specification.

The documentation and full specification can be found here.