Can an optimisation request model a situation where the vehicle has to travel to a specific location before a job?
We have a requirement for some jobs to be preceded by a travelling to a specific waypoint immediately before the job, without other jobs being scheduled between the two locations. for example, to pick up an engineer to assist on a job (we don’t want to drag the assisting engineer round with us all day on other jobs)
Have tried modelling this as a Shipment with a pickup and delivery where the pickup is the location that must precede the job and the delivery is the actual job - this does make sure the pickup is scheduled earlier than the delivery but will allow other jobs to be done between the pickup and delivery.
If I have jobs at compass points:
N
W C E
S
but must make sure the West job must precede the East job with no jobs between, order of the other jobs can be optimised but West and East must be together eg: N > (W > E) > C > S.
{
"jobs": [
{
"id": 1,
"location": [
-1.47055127219153,
53.4164125891698
],
"description": "north"
},
{
"id": 2,
"location": [
-1.470085,
53.3811290000678
],
"description": "central"
},
{
"id": 5,
"location": [
-1.46842328186653,
53.3498244399211
],
"description": "south"
}
],
"shipments": [
{
"amount": [
1
],
"pickup": {
"id": 3,
"location": [
-1.54223767395638,
53.3836259420499
],
"description": "west"
},
"delivery": {
"id": 4,
"location": [
-1.4114317047181,
53.3852641211438
],
"description": "east"
}
}
],
"vehicles": [
{
"id": 1,
"profile": "driving-car",
"start": [
-1.470551,
53.416413
],
"end": [
-1.470551,
53.416413
],
"time_window": [
1695024000,
1695060000
],
"capacity": [
1
]
}
]
}
then the Central and South jobs are always scheduled between the West and East jobs.