Features

Vehicle activation penalty

A how-to guide for using vehicle activation penalties 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
activation_penaltyNointNAvehicle{"activation_penalty": 1.23}

Vehicle activation penalties are used to apply a cost for using a vehicle. The activation or initialization of a vehicle can be useful if a vehicle isn't permanently in the fleet, but has to be rented, for example. This can also be useful if costs that incur from using a type of vehicle (e.g. truck) are higher than another type (e.g. bike). If this vehicle isn't needed in a solution, then the rental cost can be saved.

The activation_penalty is defined on vehicles and the total cost is added to the objective (value function).

Here is an example defining different costs for the 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": "Gionmachi",
      "location": { "lon": 135.775682, "lat": 35.002457 }
    },
    {
      "id": "Kinkaku-ji",
      "location": { "lon": 135.728898, "lat": 35.039705 }
    },
    {
      "id": "Arashiyama Bamboo Forest",
      "location": { "lon": 135.672009, "lat": 35.017209 }
    }
  ],
  "vehicles": [
    {
      "id": "v1",
      "activation_penalty": 1200
    },
    {
      "id": "v2",
      "start_location": { "lon": 135.672009, "lat": 35.017209 }
    }
  ]
}
Copy

Page last updated