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.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
- No Location Specified:
job2has nolocationfield - Relation Constraint: The
SAME_TRIPrelation ensures both jobs are served by the same resource (and hence the same trip) - Inherited Behavior: When
job2is scheduled afterjob1, it inheritsjob1’s location - Travel Time: No travel time is calculated between jobs at the same inherited location
- Capacity: The resource’s
capacityand each job’sloadarrays must have matching dimensions
Response Example
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