Leverage skills and driver breaks

Introduction

Try Example

In this example, we will be looking at a query which includes breaks and skills parameters. Skills can represent user defined attributes which might be required for assigning jobs like an inter-state driver license or transportation certificate. Breaks describe any breaks like a lunch or restroom break with its time period.

job object: skills, setup

  • skills: Describes the skills needed for this job. It is a positive integer array. Each integer can represent specific skills defined internally like a special driving license or a transportation certificate. Here, we have a job that requires skills of 1 and 2.

  • setup: Describe the time needed for the setup of a job such as the preparation of necessary equipment. The time unit is in seconds. Here, we have a job that needs 60 seconds to do the setup.

vehicle object: breaks, skills

  • breaks: Describes the breaks the worker should take. It is an array of break objects as defined below

  • Each break object contains the following properties

    - id: A required field for a break object to uniquely identify the break. In this example we have a break object with id 1.

    - time_window: Indicates the period that a vehicle will be on a break. The value type used is the UNIX timestamp. Here, we have a driver who will take a break between 1662105600 [GMT: Friday, September 2, 2022, 8:00:00 AM] and 1662148800 [GMT: Friday, September 2, 2022, 8:00:00 PM].

    - service: Optional field for a break object. It describes how long is the break. Its time unit is in seconds. The default value is 0. Here, we have a driver who will have a break for 120 seconds.

  • skills: Describes the skills such as driving licenses and transportation certificates the driver has. It is a positive integer array. Here, we have a driver with skills 1, 2, and 3. Internally, the values could represent skills representative of your use case.

Request Example

1{
2 "jobs": "[...]",
3 "locations":"{...}",
4 "depots": "[...]",
5 "options":"{...}",
6 "vehicles": "[...]",
7}

Result

docs-image