多行程优化API [英] Multi-Itinerary Optimization API

查看:87
本文介绍了多行程优化API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要了解有关Multi-的更多细节行程优化API。


比方说,我有一个销售人员,工作时间为上午8点到下午5点,午休时间为下午1点到2点之间的1小时。并有15个工作岗位参观。
我想为这位销售人员生成优化路线。因此,根据MIO API博客,销售人员的转变将分为两部分,分别为上午8点至下午1点和下午2点至下午5点。但是,MIO API也期待下午1点的位置,这是第一班的结束
和下午2点,这是另一个班次的开始。由于我必须动态安排这15个工作,那么我们如何知道1< sup> st< / sup>的结束位置。移位,即下午1点的位置和第2班的开始位置,即下午2点的位置。我是
,期望第一班的结束位置和第二班的开始位置应该动态设置/考虑。


此外,MIO API为每个代理/销售人员生成路线,但它提供只有纬度和经度才能访问下一个,而不是要访问的行程的名称或索引
。 


那么有没有办法在API的销售人员的生成路线中添加客户名称,这样就更容易了我要检查一下,从开始位置开始,销售
的人需要去记录X和记录X,他需要去记录Y.  


谢谢!

解决方案

嗨Yogesh, 


感谢您对MIO API的关注。通过一个代理和多个班次,每个班次的起点和终点位置是可选的。以下是如何定义轮班的示例: 


{

 " agents":[{

   " name":" Salesperson",
   " shifting":[{

    ;  " startTime":" 2019-05-10T08:00:00",&b $ b     " startLocation":{

      " latitude":47.60897,

      " longitude": - 122.340914

     },

     " endTime":" 2019-05- 10T13:00:00" b
     

     

    },{

     " startTime":" 2019-05-10T14:00:00",
     

     " endT ime":" 2019-05-10T17:00:00",
     " endLocation":{

       " latitude":47.739236,

      " longitude":-122.339974

     }

    }

   ]

  }

 ],

 " itineraryItems":[{

    ;"name":"CaféTrelfth","
   " openingTime":"2019-01-24T08:00:00",
   " closingTime":" 2019-01-24T20:00:00",&
   " dwellTime":" 01:30 :00.00",

   " priority":1,

   " location":{

    " latitude":47.615006,

    &quo t;经度":-122.348236
$
   }

  },{

     ;" name" ;:"Granny Food Truck","
   " openingTime":" 2019-01-24T11:00:00",&
   " closingTime":" 2019-01-24T14:30:00",&b $ b   " dwellTime":" 01: 30:00.00",

   " priority":1,

   " location":{

    " latitude":47.664440,

    " longitude":-122.372138

   }


...






API输出现在包括行程项目名称。 


谢谢!




Hi,

I need to know more details regarding Multi-Itinerary Optimization API.

Let say, I have a sales person who works from 8.00 am to 5.00 pm with lunch break of 1 hours between 1.00 pm to 2.00 pm. And have 15 jobs to visit. And i want to generate optimize route for this sales person. So as per MIO API blog, sales persons shift will be divided in 2 part as 8.00 am - 1.00 pm and from 2.00 pm - 5.00 pm. But, MIO API is also expecting the location of 1.00 pm which is end of 1st shift and 2.00 pm which is start of another shift. As i have to schedule these 15 jobs dynamically, then how do we know the end location of 1<sup>st</sup> shift i.e. location at 1.00 pm and start location of 2nd shift i.e. location at 2.00 pm. I was expecting that the end location of 1st shift and start location of 2nd shift should be set/considered dynamically.

Also, MIO API generate routes for each agents/sales person, but it is providing only Latitude and Longitude to visit next, not the name or index of the Itinerary to visit. 

So is there any way to add Names of client in this generated routes for the sales person in API, so that it will be easier for me to check that, from start location, sales person need to go to record X and from records X, he need to go to record Y.  

Thank You!

解决方案

Hi Yogesh, 

Thanks for your interest in the MIO API. With one agent and multiple shifts, the start and end locations of each shift are optional. Below is an example how you can define the shifts: 

{
 "agents": [{
   "name": "Salesperson",
   "shifts": [{
     "startTime": "2019-05-10T08:00:00",
     "startLocation": {
      "latitude": 47.60897,
      "longitude": -122.340914
     },
     "endTime": "2019-05-10T13:00:00"
     
     
    }, {
     "startTime": "2019-05-10T14:00:00",
     
     "endTime": "2019-05-10T17:00:00",
     "endLocation": {
      "latitude": 47.739236,
      "longitude": -122.339974
     }
    }
   ]
  }
 ],
 "itineraryItems": [{
   "name": "Café Twelfth",
   "openingTime": "2019-01-24T08:00:00",
   "closingTime": "2019-01-24T20:00:00",
   "dwellTime": "01:30:00.00",
   "priority": 1,
   "location": {
    "latitude": 47.615006,
    "longitude": -122.348236
   }
  }, {
   "name": "Granny Food Truck",
   "openingTime": "2019-01-24T11:00:00",
   "closingTime": "2019-01-24T14:30:00",
   "dwellTime": "01:30:00.00",
   "priority": 1,
   "location": {
    "latitude": 47.664440,
    "longitude": -122.372138
   }


The API output now includes the itinerary item names. 

Thank you!



这篇关于多行程优化API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆