Add a waypoint before a job

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.

Hey,

I can’t think of a way to model this with VROOM, but there might be a workaround for your problem:

You could model your East job as the starting point and the West job as the end point of your vehicle, and the start/end point of your vehicle as a job location.

This will yield the most optimal route from East via your Starting Point to West, and inserting the best West->East connection, an optimal round trip that includes this connection.

Best regards

Thanks for the prompt reply.

Setting vehicle start and end locations wouldn’t reflect the real world locations of the vehicle but it’s an interesting idea.

I’ve tried playing with the capacity restrictions, using the Delivery, Pickup and Amount values but I’m tripping up over the default behaviour :

It is assumed that all delivery-related amounts for jobs are loaded at vehicle start, while all pickup-related amounts for jobs are brought back at vehicle end.

Do you know if there is any way to change the default capacity behavior?