我正在使用Routific进行路由优化。但我得到了意想不到的结果。见下面的json
{
"visits": {
"order_1": {
"location": {
"name": "sanjay park",
"lat": 18.56873,
"lng": 73.90603
},
"start": "9:00",
"end": "12:00",
"duration": 10,
"priority": "high"
},
"order_2": {
"location": {
"name": "lohgon",
"lat": 18.59113,
"lng": 73.91882
},
"start": "9:00",
"end": "12:00",
"duration": 10,
"priority": "low"
},
"order_3": {
"location": {
"name": "kudachi",
"lat": 16.62638,
"lng": 74.85656
},
"start": "9:30",
"end": "17:00",
"duration": 10
}
},
"fleet": {
"vehicle_1": {
"start_location": {
"id": "depot",
"name": "vidhyanager",
"lat": 18.57997,
"lng": 73.89432
},
"end_location": {
"id": "depot",
"name": "vidhyanager",
"lat": 18.57997,
"lng": 73.89432
},
"shift_start": "8:00",
"shift_end": "23:00"
}
}
}
在上面的json中,我将"sanjay park"
指定为高优先级,将“lohgaon”指定为低优先级,但获取它仅优先于"lohgaon"
位置。
见下面的输出
{
"status": "success",
"total_travel_time": 452.23334,
"total_idle_time": 0,
"num_unserved": 0,
"unserved": null,
"solution": {
"vehicle_1": [
{
"location_id": "depot",
"location_name": "vidhyanager",
"arrival_time": "08:54"
},
{
"location_id": "order_2",
"location_name": "lohgon",
"arrival_time": "09:00",
"finish_time": "09:10"
},
{
"location_id": "order_1",
"location_name": "sanjay park",
"arrival_time": "09:15",
"finish_time": "09:25"
},
{
"location_id": "order_3",
"location_name": "kudachi",
"arrival_time": "13:32",
"finish_time": "13:42"
},
{
"location_id": "depot",
"location_name": "vidhyanager",
"arrival_time": "16:56"
}
]
}
}
请欣赏您对此的评论
答案 0 :(得分:0)
这是文档所述的内容:
priority
可让您将某些访问优先于其他访问。在某些情况下,您访问的次数超过了您可以提供的次数,导致一些人无法访问。但是,如果您想确保优先级高的访问优先,请使用此参数并将其设置为“高”。
因此,它用于确保提供高优先级订单。在您的情况下,所有订单都已提供,因此此参数不执行任何操作。如果您希望在当天早些时候提供sanjay park
,则应使用时间窗口约束。