Optimization problem "Route not found"

Hi,
I’m currently testing “Optimization” feature.

When I call the endpoint https://api.openrouteservice.org/optimization posting:

{
        "jobs": [
            	{
        "id": 1,
        "service": 1200,
        "amount": [1],
        "location": [45.71862, 8.66267],
        "skills": [1],
        "description": "step 1",
        "time_windows": [[28800,43200],[50400,64800]]
    },	{
        "id": 2,
        "service": 900,
        "amount": [1],
        "location": [45.74524, 8.80744],
        "skills": [1],
        "description": "step 2",
        "time_windows": [[28800,43200]]
    },	{
        "id": 3,
        "service": 900,
        "amount": [1],
        "location": [45.06504, 7.67025],
        "skills": [1],
        "description": "step 3",
        "time_windows": [[28800,43200]]
    }
        ],
        "vehicles": [
            {
                "id": 1,
                "profile": "driving-car",
                "start": [45.693339, 8.607547],
                "end": [45.693534, 8.608040],
                "capacity": [50],
                "skills": [1, 50],
                "max_tasks": 20,
                "time_window": [28800, 82800]
            }
        ]
    }

I get the error:

"{
    "code": 3,
    "error": "Unfound route(s) from location [45.065040;7.670250]"
}"

The problem is the third job:

{
"id": 3,
"service": 900,
"amount": [1],
"location": [45.06504, 7.67025],
"skills": [1],
"description": "step 3",
"time_windows": [[28800,43200]]
} 

Replacing this job with another location, everything goes fine.

The location is in a main street in the city of Torino (Italy)

Thanks for the help

I hope you get my point. I’m sorry if you don’t, but please understand English is not my first language

please use lon, lat instead of lat, lon

1 Like

Sorry, but the problem is “Route not found” for the job #3. If I replace the job with another point (lat,lon) everything goes fine. eg:
{
“id”: 3,
“service”: 900,
“amount”: [1],
“location”: [45.06504, 8.67025], // this point (lat,lon) works fine
“skills”: [1],
“description”: “step3”,
“time_windows”: [[28800,64800]]
}

Thanks

the definition of a location is specified as [longitude, latitude].
I suspect you want to route in Italy and not in Somalia or Ethiopia?
If you input it the other way round, the routes will be generated there, and the points might not be at a road or it will be a point in the middle of the ocean.