Overview
A job without alocation 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
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.
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
DIRECT_SEQUENCErelation putsjob2immediately afterjob1in the same trip. Without a relation,job2would inherit the location of whichever stop happens to precede it - Inherited Behavior: Because
job2is scheduled right afterjob1, it inheritsjob1’s location. A location-less job placed first in a trip inherits the shift start location - Travel Time: There is no travel between a job and a following location-less job, since they share the same 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 follow each other at one location
- Dynamic Locations: Jobs where the location depends on the execution order