Relation is a mechanism to lock jobs to specific vehicles. List of relations is a part of plan schema and each relation has the following properties:

  • type (required): one of three relation types: tour, fixed, or sequence. See description below.
  • vehicleId (required): a specific vehicle id
  • jobs (required): list of job ids including reserved: departure, arrival, break and reload
  • shiftIndex (optional): a vehicle shift index. If not specified, a first, zero indexed, shift assumed

You can use more than one relation per vehicle.

Any type

A any relation is used to lock specific jobs to certain vehicle in any order:

        "type": "any",
        "jobs": [
        "vehicleId": "vehicle_1"

Sequence type

A sequence relation is used to lock specific jobs to certain vehicle in fixed order allowing insertion of new jobs in between.

Strict type

In contrast to sequence relation, strict locks jobs to certain vehicle without ability to insert new jobs in between:

        "type": "strict",
        "jobs": [
        "vehicleId": "vehicle_1"

In this example, new jobs can be inserted only after job with id job1.

Important notes

Please consider the following notes:

  • jobs specified in sequence and strict are not checked for constraint violations. This might lead to non-feasible solutions (e.g. routes with capacity or time window violation).

  • relation with jobs which have multiple pickups or deliveries are not yet supported

Related errors


Please refer to complete example to see how to specify problem with relations.