Skip to main content

Overview

Some jobs may not have explicit locations but need to inherit them from related jobs. This is useful for scenarios like:
  • Pickup and delivery where delivery inherits pickup location
  • Multi-stop visits where subsequent stops inherit the previous location
  • Tasks that must be performed at the same location as another job

Example Request

This example demonstrates jobs with inherited locations where Job 2 will inherit its location from Job 1.
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 SAME_TRIP relation ensures both jobs are served by the same resource (and hence the same trip)
  3. Inherited Behavior: When job2 is scheduled after job1, it inherits job1’s location
  4. Travel Time: No travel time is calculated between jobs at the same inherited 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 must be performed together at one location
  • Dynamic Locations: Jobs where the location depends on the execution order