Set break after driving hours

Hello everybody

I am trying to set up an optimization problem in which the involved vehicle should take a compulsory break after a certain amount of driving time from the beginning of its trip.

Up to now I worked out the following input:

URL
https://api.openrouteservice.org/optimization

INPUT

{
    "shipments": [
        {
            "amount": [
                1870
            ],
            "delivery": {
                "id": 1,
                "location": [
                    11.083682183384, 44.89350717845324
                ],
                "time_windows":[
                    [1689228000, 1689256800]
                ]
            },
            "pickup": {
                "id": 99,
                "location": [
                    7.9263242,
                    45.4402217
                ]
            }
        },
        {
            "amount": [
                1530
            ],
            "delivery": {
                "id": 2,
                "location": [
                    11.175665468031378, 44.71463000890594
                ],
                "time_windows":[
                    [1689228000 ,1689258600]
                ]
            },
            "pickup": {
                "id": 99,
                "location": [
                    7.9263242,
                    45.4402217
                ]
            }
        }
    ],
    "vehicles": [
        {
            "id": 1,
            "profile": "driving-hgv",
            "start": [
                7.9263242,
                45.4402217
            ],
            "end": [
                7.9263242,
                45.4402217
            ],
            "capacity": [
                30000
            ],
            "time_window": [
                1688529600,
                1688580000
            ],
            "breaks": [
                {
                  "id": 1,
                  "service": 32400,
                  "description": "should be 9 hours break after 9 hours of driving",
                  "time_windows": [
                    [
                      1600423200,
                      1600425000
                    ]
                  ]
                }
            ]
        }
    ]
}

I declared breaks in vehicles section, as per documentation, but up to now I figured out only how to declare a break duration (“service” parameters if I am not wrong).
Is there any way to declare a break after a certain amount of driving hours?

Many greetings and thanks!

Hi @precisePenguin77,

please take this question over to vroom which is the service we use for optimization. The linked issue goes in a similar direction. Please search issues before creating a new one :slight_smile:

Best regards