How are waypoints managed with a not feasible tour?

Hi,
I am currently using the Tour API (RouteXL 200 License) and I am struggling to resolve a problem with time restrictions.

I have multiple waypoints with different time slots (restrictions) and I have to guarantee (only for some waypoints) that the time of ready/due restrictions is respected. Essentially I have to prioritize some waypoints than other.

When the API returns “feasible:false” it’s like the restrictions are ignored and some of the waypoints are put far away the time limit.

How the API manages the tour when some restrictions cannot be respected?
How can I say that some restrictions are more important than other?

I attach an example:

  • The first address is my starting point, I don’t have the need to come back there so I don’t repeat this address at the end
  • The waypoints with 0 - 840 can be moved freely during the day
  • The waypoints with different restrictions must be reached within that limits

Input:

    [
  {
    "address": "VIA ARCADE 8  31050 POVEGLIANO TREVISO ITALIA",
    "lat": "45,76137",
    "lng": "12,20447",
    "restrictions": {}
  },
  {
    "address": "VIA VITTORIO VENETO 133  31030 CARBONERA TREVISO ITALIA",
    "lat": "45,68214",
    "lng": "12,27692",
    "servicetime": 45,
    "restrictions": {
      "ready": 0,
      "due": 840
    }
  },
  {
    "address": "VIA CAVOUR 87  31027 SPRESIANO TREVISO ITALIA",
    "lat": "45,7838",
    "lng": "12,2568",
    "servicetime": 45,
    "restrictions": {
      "ready": 0,
      "due": 840
    }
  },
  {
    "address": "via brigata emilia 5 PERO (31030 ) - (  ) 31030 BREDA DI PIAVE TREVISO ITALIA",
    "lat": "45,70293",
    "lng": "12,34391",
    "servicetime": 45,
    "restrictions": {
      "ready": 0,
      "due": 840
    }
  },
  {
    "address": "VIA SAN GIACOMO 16  31030 BREDA DI PIAVE TREVISO ITALIA",
    "lat": "45,71329",
    "lng": "12,32967",
    "servicetime": 45,
    "restrictions": {
      "ready": 0,
      "due": 840
    }
  },
  {
    "address": "VIA SAN PIO X 4  31030 BREDA DI PIAVE TREVISO ITALIA",
    "lat": "45,72239",
    "lng": "12,33244",
    "servicetime": 45,
    "restrictions": {
      "ready": 0,
      "due": 840
    }
  },
  {
    "address": "VIALE FELISSENT 53  31100 TREVISO TREVISO ITALIA",
    "lat": "45,69289",
    "lng": "12,25875",
    "servicetime": 45,
    "restrictions": {
      "ready": 120,
      "due": 210
    }
  },
  {
    "address": "VIA GORIZIA Varago  3  31020 VILLORBA TREVISO ITALIA",
    "lat": "45,73547",
    "lng": "12,30984",
    "servicetime": 45,
    "restrictions": {
      "ready": 240,
      "due": 330
    }
  }
]

Output:

    {
  "id": "45B61HDc",
  "count": 8,
  "feasible": false,
  "route": {
    "0": {
      "name": "VIA ARCADE 8  31050 POVEGLIANO TREVISO ITALIA",
      "arrival": 0,
      "distance": 0
    },
    "1": {
      "name": "VIA CAVOUR 87  31027 SPRESIANO TREVISO ITALIA",
      "arrival": 8,
      "distance": 7.5
    },
    "2": {
      "name": "VIA VITTORIO VENETO 133  31030 CARBONERA TREVISO ITALIA",
      "arrival": 69,
      "distance": 22.3
    },
    "3": {
      "name": "VIALE FELISSENT 53  31100 TREVISO TREVISO ITALIA",
      "arrival": 118,
      "distance": 26.5
    },
    "4": {
      "name": "via brigata emilia 5 PERO (31030 ) - (  ) 31030 BREDA DI PIAVE TREVISO ITALIA",
      "arrival": 178,
      "distance": 37.2
    },
    "5": {
      "name": "VIA SAN GIACOMO 16  31030 BREDA DI PIAVE TREVISO ITALIA",
      "arrival": 227,
      "distance": 39.3
    },
    "6": {
      "name": "VIA SAN PIO X 4  31030 BREDA DI PIAVE TREVISO ITALIA",
      "arrival": 274,
      "distance": 40.7
    },
    "7": {
      "name": "VIA GORIZIA Varago  3  31020 VILLORBA TREVISO ITALIA",
      "arrival": 322,
      "distance": 43.5
    }
  }
}

If a route is infeasible, the outcome is rather unpredictable. The algorithm will try to minimize time windows penalties over travel time, so the route may be very random. We advise against using infeasible routes.

But be aware that the API always sets the last location in the input array as final arrival point. If you do not repeat the starting point at the end, the last item will be the end point automatically.

Thank you.

I am aware that the last item will be automatically the end point and I am ok with this.

How are the time restrictions affected by the “servicetime” property? I have done some tests and I have obtained an infeasible route even when it looks feasible. The servicetime must be considered when I calculate the time windows?

The time window should include the service time. The algorithm tries to arrive at the stop after the ready time, and leave the stop before the due time. The service should be ready and done. E.g.

ready time <= arrival time + service time = departure time <= due time

1 Like