This feature is configurable via .json
input, but it is targeted to be used with code customization. It is available for both the Marketplace app and Platform. You can find a list of all available features here.
This how-to guide assumes you already completed the get started with vehicle routing tutorial.
Field name | Required | Data type | SI Unit | Defined on | Example | Configurable via defaults |
---|---|---|---|---|---|---|
custom_data | No | any | NA | input | {"custom_data": {"foo": "bar"}} | ➖ |
custom_data | No | any | NA | vehicle | {"custom_data": {"foo": "bar"}} | ➖ |
custom_data | No | any | NA | stop | {"custom_data": {"foo": "bar"}} | ➖ |
You can define custom_data
on the input, vehicle, and stop. This is useful when you want to add custom data that can be used for internal tracking or defining a custom objective or custom constraint. There is no restriction on the data type of the custom_data
, for it allows you to add fields outside of the features that are offered out of the box.
When adding custom_data
to the stop and/or vehicle, it will be marshaled to the output stop and output vehicle, respectively. This makes it easier to add metadata to the entities that is preserved once the solution is obtained. In the case of stops, the data is added regardless of the stop being planned or not.
Here is an example input defining custom data for stops and vehicles. A sample output obtained after solving the problem is also shown.