Routing data

In order to solve real life VRP, you need to provide routing information, such as distances and durations between all locations in the problem. Getting this data is not a part of the solver, you need to use some external service to get it. Once received, it has to be passed within VRP definition in specific routing matrix format.

When no routing matrix information supplied, the solver uses haversine distance approximation. See more information about such behavior here.

Location format

Location can be represented as one of two types:

  • location as geocoodinate
                "location": {
                  "lat": 52.52599,
                  "lng": 13.45413
                },
  • location as index reference in routing matrix
                "location": {
                  "index": 0
                },

Please note, that you cannot mix these types in one problem definition. Also routing approximation cannot be used with location indices.

Related errors