TrueWay VRP

免费增值
Verified
通过 TrueWay Team | 已更新 a month ago | Logistics
人气

8.7 / 10

延迟

1,201ms

服务等级

100%

Health Check

N/A

返回所有讨论

constraint

Rapid account: Andytabrizi
andytabrizi
2 years ago

How would I make the optimal solution visit say two locations per week?

Thus I need to

  1. generate a route of locations
  2. have time windows where one cannot visit places (I think list of time windows would work which is supported)
  3. restrict the solution only so many locations per week (say 2) …
  4. have a custom start and end location also …
Rapid account: Trueway
trueway Commented 2 years ago

This is a simplified example from the “Service Visits” tutorial with 3 locations and 1 vehicle:

{
“service_orders”: [
{
“id”: “order-1”,
“location”: {
“lat”: 36.185851,
“lng”: -115.2064059
},
“service_duration”: 300,
“time_windows”: [{“earliest”: 0, “latest”: 86400}, {“earliest”: 172800, “latest”: 604800}],
“optional”: true
},
{
“id”: “order-2”,
“location”: {
“lat”: 36.190831,
“lng”: -115.137368
},
“service_duration”: 300,
“time_windows”: [{“earliest”: 0, “latest”: 86400}, {“earliest”: 172800, “latest”: 604800}],
“optional”: true
},
{
“id”: “order-3”,
“location”: {
“lat”: 36.1692548,
“lng”: -115.1312463
},
“service_duration”: 300,
“time_windows”: [{“earliest”: 0, “latest”: 86400}, {“earliest”: 172800, “latest”: 604800}],
“optional”: true
}
],
“vehicles”: [
{
“id”: “vehicle-1”,
“start”: {
“lat”: 36.159548,
“lng”: -115.3172336
},
“end”: {
“lat”: 36.159548,
“lng”: -115.3172336
},
“max_orders”: 2
}
]
}

If you assume to work during the week, we have an interval from 0 to 604800 (7 days in seconds, for example from Sunday midnight).
Let’s say you can’t visit places on Tuesday. Then you can specify 2 time windows: before Tuesday and after Tuesday:
“time_windows”: [{“earliest”: 0, “latest”: 86400}, {“earliest”: 172800, “latest”: 604800}]

Notice the “max_orders” property, which limits the maximum number of locations(orders) for a vehicle. You can also set the property “optional” to “true” on the order. Then 2 orders will be assigned to the vehicle, and the rest (unassigned) will be returned in the “unassigned_orders” property. Otherwise, we will get “No Solution”, because we need to serve 3 orders, but the car is limited to only 2.

Start and End are set by the “Start” and “End” properties of vehicle.

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论