Skip to main content

Overview

A job without a location takes the location of the stop that precedes it in the route. The inheritance follows route order, not job relations: whichever stop the solver places directly before the job determines where it is performed. A location-less job that ends up first in its trip inherits the shift’s start location. This is useful for scenarios like:
  • Multi-stop visits where subsequent stops are performed at the previous location
  • Follow-up tasks that must be performed where the previous job was done
  • Tasks whose location depends on the execution order
To make a job directly follow a specific other job, and so inherit its location, link them with a DIRECT_SEQUENCE relation.

Example Request

This example demonstrates a location-less job: job2 is placed directly after job1 by a DIRECT_SEQUENCE relation, so it inherits job1’s location.
Resources have no id field — only name, which is also how jobs are referenced elsewhere (e.g. in relations). relations is a top-level array on the request, not a per-job field. capacity lives on the resource itself, not on an individual shift.

Key Points

  1. No Location Specified: job2 has no location field
  2. Relation Constraint: The DIRECT_SEQUENCE relation puts job2 immediately after job1 in the same trip. Without a relation, job2 would inherit the location of whichever stop happens to precede it
  3. Inherited Behavior: Because job2 is scheduled right after job1, it inherits job1’s location. A location-less job placed first in a trip inherits the shift start location
  4. Travel Time: There is no travel between a job and a following location-less job, since they share the same location
  5. Capacity: The resource’s capacity and each job’s load arrays must have matching dimensions

Response Example

Note how the job2 visit shows the same location as the job1 visit and has zero travelTime/distance from the previous visit.

Use Cases

  • Service Continuity: Multiple services at the same customer location
  • Grouped Tasks: Tasks that follow each other at one location
  • Dynamic Locations: Jobs where the location depends on the execution order