Combining Due and after

When I use due and after together, I receive a remark ‘Infeasible: location 4 not after: 2’.
Why is this? I don’t want a pickup address after a delivery address.

Below the JSON:
[
{
“name”: “start”,
“lat”: “52.695526”,
“lng”: “6.206941”,
“servicetime”: “5”
},
{
“name”: “32314”,
“lat”: “51.451611”,
“lng”: “5.468747”,
“servicetime”: “5”
},
{
“name”: “32315”,
“lat”: “51.605838”,
“lng”: “5.447339”,
“servicetime”: “5”
},
{
“name”: “32316”,
“lat”: “51.732667”,
“lng”: “5.321061”,
“servicetime”: “5”,
“restrictions”: {
“after”: “2”
}
},
{
“name”: “32317”,
“lat”: “52.077127”,
“lng”: “4.624873”,
“servicetime”: “5”,
“restrictions”: {
“due”: 117,
“after”: “2”
}
},
{
“name”: “32320”,
“lat”: “51.568961”,
“lng”: “4.467841”,
“servicetime”: “5”,
“restrictions”: {
“after”: “2”
}
},
{
“name”: “32318”,
“lat”: “51.779198”,
“lng”: “4.644691”,
“servicetime”: “5”,
“restrictions”: {
“after”: “2”
}
},
{
“name”: “32319”,
“lat”: “51.771919”,
“lng”: “4.645164”,
“servicetime”: “5”,
“restrictions”: {
“after”: “2”
}
},
{
“name”: “32321”,
“lat”: “51.977872”,
“lng”: “4.456858”,
“servicetime”: “5”,
“restrictions”: {
“after”: “2”
}
},
{
“name”: “32322”,
“lat”: “52.04898”,
“lng”: “4.350365”,
“servicetime”: “5”,
“restrictions”: {
“after”: “2”
}
},
{
“name”: “32323”,
“lat”: “52.025622”,
“lng”: “4.217885”,
“servicetime”: “5”,
“restrictions”: {
“after”: “2”
}
},
{
“name”: “32324”,
“lat”: “52.06827”,
“lng”: “4.328879”,
“servicetime”: “5”,
“restrictions”: {
“after”: “2”
}
},
{
“name”: “32325”,
“lat”: “52.20064”,
“lng”: “4.4315708”,
“servicetime”: “5”,
“restrictions”: {
“after”: “1”
}
},
{
“name”: “end”,
“lat”: “52.695526”,
“lng”: “6.206941”,
“servicetime”: “5”
}
]

The route is infeasible because #4 can not be visted after #2 AND not later than t=117. In other words, the total duration from start to #2 to #4 takes more than 117 minutes.

In this case he algorithm has chosen to satisfy the time restriction, leaving the route infeasible on the order restriction.

BTW, you can import JSON input on the website to check it out.

Hi, thanks for the response.
Is there a way to make the order restriction dominant? Maybe by placing it first in the restrictions array or something?

Of course it’s important that the drivers arrives on time, but it’s even more important that he arrives with the package in the car. If the delivery address is planned before the pickup, he has a bigger problem.

Thanks for any suggestions.

Unfortunately you can not prioritize one restriction over the other. We’d suggest to check the feasibility of the result, and if not feasible to relax time restrictions to the extent you’d accept it to be late.