Features

Vehicle start/end location

A how-to guide for using vehicle starting and ending locations with vehicle routing.

  • This feature is configurable via .json input, without the need for code customization.
  • Available for both the Marketplace app and Platform. You can find a list of all available features here.
Field nameRequiredData typeSI UnitDefined onExampleConfigurable via defaults
start_locationNolocationNAvehicle{"start_location": {"lon": 1.23, "lat": 4.56}}
end_locationNolocationNAvehicle{"end_location": {"lon": 1.23, "lat": 4.56}}

Traditional vehicle routing problems require a depot where a route starts and ends. On the other hand, open vehicle routing problems (OVRP) do not specify an ending location for a vehicle, for example. You can specify the start_location and end_location on a vehicle.

These features are independent of each other, so you could solve vehicle routing problems by configuring the same start_location and end_location, or OVRPs by omitting one or both.

Here is an example input defining an assortment of locations for vehicles. A sample output obtained after solving the problem is also shown.

{
  "defaults": {
    "vehicles": {
      "speed": 20
    }
  },
  "stops": [
    {
      "id": "Fushimi Inari Taisha",
      "location": { "lon": 135.772695, "lat": 34.967146 }
    },
    {
      "id": "Kiyomizu-dera",
      "location": { "lon": 135.78506, "lat": 34.994857 }
    },
    {
      "id": "Nijō Castle",
      "location": { "lon": 135.748134, "lat": 35.014239 }
    },
    {
      "id": "Kyoto Imperial Palace",
      "location": { "lon": 135.762057, "lat": 35.025431 }
    },
    {
      "id": "Kinkaku-ji",
      "location": { "lon": 135.728898, "lat": 35.039705 }
    },
    {
      "id": "Arashiyama Bamboo Forest",
      "location": { "lon": 135.672009, "lat": 35.017209 }
    }
  ],
  "vehicles": [
    {
      "id": "v1"
    },
    {
      "id": "v2",
      "start_location": {
        "lon": 135.772695,
        "lat": 34.967146
      }
    },
    {
      "id": "v3",
      "end_location": {
        "lon": 135.762057,
        "lat": 35.025431
      }
    },
    {
      "id": "v4",
      "start_location": {
        "lon": 135.775683,
        "lat": 35.002458
      },
      "end_location": {
        "lon": 135.775683,
        "lat": 35.002458
      }
    }
  ]
}
Copy

Page last updated