Optimization uses only one vehicle

Hello, i am new to OpenRouteService, and i need some help.

This is what i use as input inside OpenRouteService Optimization

{
    "vehicles": [
        {
            "id": 2,
            "profile": "driving-car",
            "start": [
                26.126626402556922812436823733150959014892578125,
                44.412537412127818470253259874880313873291015625
            ],
            "end": [
                26.126626402556922812436823733150959014892578125,
                44.412537412127818470253259874880313873291015625
            ],
            "max_tasks": 5
        },
        {
            "id": 3,
            "profile": "driving-car",
            "start": [
                26.126626402556922812436823733150959014892578125,
                44.412537412127818470253259874880313873291015625
            ],
            "end": [
                26.126626402556922812436823733150959014892578125,
                44.412537412127818470253259874880313873291015625
            ],
            "max_tasks": 5
        },
        {
            "id": 4,
            "profile": "driving-car",
            "start": [
                26.126626402556922812436823733150959014892578125,
                44.412537412127818470253259874880313873291015625
            ],
            "end": [
                26.126626402556922812436823733150959014892578125,
                44.412537412127818470253259874880313873291015625
            ],
            "max_tasks": 5
        }
    ],
    "shipments": [
        {
            "pickup": {
                "id": 15,
                "location": [
                    26.142200455069545483866022550500929355621337890625,
                    44.39001705726214908054316765628755092620849609375
                ]
            },
            "delivery": {
                "id": 2,
                "location": [
                    26.123599756400000870826261234469711780548095703125,
                    44.44581781000000120229742606170475482940673828125
                ],
                "time_window": [
                    1684210800,
                    1684212900
                ]
            }
        },
        {
            "pickup": {
                "id": 16,
                "location": [
                    26.083859000000000349928086507134139537811279296875,
                    44.39845100000000144291334436275064945220947265625
                ]
            },
            "delivery": {
                "id": 3,
                "location": [
                    26.09461174409999983936359058134257793426513671875,
                    44.44228353596999880892326473258435726165771484375
                ],
                "time_window": [
                    1684210800,
                    1684212900
                ]
            }
        },
        {
            "pickup": {
                "id": 14,
                "location": [
                    26.136912815272808074951171875,
                    44.3873810672184418990582344122231006622314453125
                ],
                "time_window": [
                    1684249200,
                    1684249500
                ]
            },
            "delivery": {
                "id": 1,
                "location": [
                    26.11898898999999829584339749999344348907470703125,
                    44.38631605500000176789399120025336742401123046875
                ]
            }
        },
        {
            "pickup": {
                "id": 26,
                "location": [
                    26.02675617968750287900547846220433712005615234375,
                    44.43601863979606747534489841200411319732666015625
                ]
            },
            "delivery": {
                "id": 5,
                "location": [
                    26.120406627209998617900055251084268093109130859375,
                    44.39212754270000260703454841859638690948486328125
                ],
                "time_window": [
                    1684218000,
                    1684220100
                ]
            }
        },
        {
            "pickup": {
                "id": 2,
                "location": [
                    26.123599756400000870826261234469711780548095703125,
                    44.44581781000000120229742606170475482940673828125
                ],
                "time_window": [
                    1684234800,
                    1684235100
                ]
            },
            "delivery": {
                "id": 15,
                "location": [
                    26.142200455069545483866022550500929355621337890625,
                    44.39001705726214908054316765628755092620849609375
                ]
            }
        },
        {
            "pickup": {
                "id": 3,
                "location": [
                    26.09461174409999983936359058134257793426513671875,
                    44.44228353596999880892326473258435726165771484375
                ],
                "time_window": [
                    1684234800,
                    1684235100
                ]
            },
            "delivery": {
                "id": 16,
                "location": [
                    26.083859000000000349928086507134139537811279296875,
                    44.39845100000000144291334436275064945220947265625
                ]
            }
        },
        {
            "pickup": {
                "id": 14,
                "location": [
                    26.136912815272808074951171875,
                    44.3873810672184418990582344122231006622314453125
                ]
            },
            "delivery": {
                "id": 1,
                "location": [
                    26.11898898999999829584339749999344348907470703125,
                    44.38631605500000176789399120025336742401123046875
                ],
                "time_window": [
                    1684225200,
                    1684227300
                ]
            }
        },
        {
            "pickup": {
                "id": 5,
                "location": [
                    26.120406627209998617900055251084268093109130859375,
                    44.39212754270000260703454841859638690948486328125
                ],
                "time_window": [
                    1684242000,
                    1684242300
                ]
            },
            "delivery": {
                "id": 26,
                "location": [
                    26.02675617968750287900547846220433712005615234375,
                    44.43601863979606747534489841200411319732666015625
                ]
            }
        }
    ],
    "options": {
        "g": true
    }
}

The problem is that it only uses one vehicle instead of all three. Any idea how to fix it?

Hi @OvidiuFi,

first of all, take a look at this (because that amount of digits is way beyond good and evil).
If that doesn’t already improve things, it might be an issue with the vroom version.
I’m not sure right now which version we run (@adam , @sascha, @takb any of you know or could to take a look?).

You could also take this over to the vroom repository and ask if something else might be missing in the request.

Best regards

1 Like