Job relations
In this example we will show you how to use job relations. Job relations are defined on jobs. They can be used to express different links between jobs:
SEQUENCE
: the jobs need to be visited in the given orderDIRECT_SEQUENCE
: the jobs need to be visited in the given order, one after the otherSAME_TRIP
: the jobs need to be visited in the same trip, the sequence does not matterSAME_TIME
: the jobs need to be visited at the same time, the assigned resource will be differentPICKUP_AND_DELIVERY
: the jobs need to be in the same trip and the pickup needs to happen before the dropoff. (special case of job relation)SAME_RESOURCE
: the jobs need to be visited by the same resource (could be another day)
Sequence relation
Direct Sequence relation
Same time relation
If there are Jobs that need multiple resources assigned to it, you should duplicate those jobs and add the requirement that they should start at the same time.
Pickup and delivery relation
A very specific case of a SAME_TRIP
relation in combination with a SEQUENCE
relation that requires first to do the pickup and then the delivery.
The shortcut is the PICKUP_AND_DELIVERY
job relation for maximum two jobs, the first is the pickup, the second is the delivery.
Same trip relation
If the sequence is independent but they need to be done in the same tour or trip or day, then you can use a SAME_TRIP
relation.
Same resource relation
If a job needs to be done by the same resource throughout the planning period, then set the SAME_RESOURCE
relation.