外卖系统中派单算法的设计与实现

 2022-10-14 04:10

论文总字数:20440字

摘 要

在互联网和物流行业高速发展的现在,外卖派送的重要性也愈发明显。随着人们的生活越来越忙碌,越来越多的人选择外卖作为他们的用餐方式。对于社会来说,也因此有了更多的外卖员的就业岗位。然而,在外卖派送中,仅靠人力来选择合适的派送员和派送路线显而易见是不够的,人力有穷时,仅靠人力会带来大量的资源和时间的浪费。对于按照单数为收入基准的外卖派送员和忙于工作的人们,明显是不利的。本文主要在有限的材料的基础上,对于外卖派送的外卖员的选择的算法进行了理想化的讨论。本系统能够对已有的数据进行分析,利用现有的数据,生成一个合适的函数,而后利用此函数,对将来的派送的时间进行预测,由此可以将外卖尽可能快的送达。同时,本系统中还能通过计算外卖准时送达的成功率,来评判某位外卖员的优先级。以此来保证,外卖派送的准确性,提高用户的实际体验。

本论文主要完成的有外卖派送算法的设计与实现,对于派送的时间预测函数的生成,使用了线性回归的算法,利用得到的函数,得到外卖派送时间,同时将外卖派送的成功率纳入考虑,由此得到目前优先级最高的派送员,将订单自动分配给该派送员。数据预测初期的数据集来自饿了么和美团提供的距离和时间数据。由于只是算法设计,具体的地图路线不在考虑中。本文设计了一个100*100的地图,所有的位置均会在其中随机生成。利用这个100*100的坐标轴地图,我们可以清楚的得到位置之间的距离以供函数进行时间的预测。

在系统中的线性回归算法对时间进行预测时,需要考虑的主要因素有距离和时间这两点,而时间和距离明显呈正相关,简化只有,可以说,使用线性回归算法对数据集进行预测无疑是最佳的。而且同时利用外卖派送员的优先级算法,使得外卖派送更加可靠。结合这些情况,本文提出了一个方案,该方案有着低复杂度,自动化程度高,已于编程和维护扩展的优点。本毕设利用简化后的参数,根据实际情况,提出一个外卖派送的算法,用以给外卖派送员和外卖公司之间进行提示。

关键词:外卖派送;优先级;线性回归

Design and Implementation of Takeaway Delivery Algorithm

Abstract

Nowadays, with the rapid development of the Internet and logistics industry, the importance of take-away delivery has become more and more obvious. As people's lives get more and more busy, more and more people choose to take out food as their way of dining. For the society, there are therefore more jobs for the foreigners. However, in the delivery of delivery, it is obviously not enough to select the appropriate dispatcher and delivery route by manpower. When the manpower is poor, manpower alone will bring a lot of resources and time waste. It is obviously unfavorable for take-aways and busy people who are on a singular basis for income. Based on the limited materials, this paper makes an ideal discussion on the algorithm of the selection of the delivery of the delivery. The system can analyze the existing data, use the existing data, generate a suitable function, and then use this function to predict the delivery time in the future, so that the take-out can be delivered as quickly as possible. At the same time, the system can also judge the priority of a foreign seller by calculating the success rate of delivery on time. In this way, the accuracy of the delivery of the take-out is guaranteed, and the actual experience of the user is improved.
This paper mainly completes the design and implementation of the take-out delivery algorithm. For the generation of the dispatched time prediction function, the linear regression algorithm is used. The obtained function is used to obtain the take-out delivery time, and the success rate of the take-out delivery is taken into consideration. This gives the current highest priority dispatcher and automatically assigns the order to the dispatcher. The data set at the beginning of the data prediction comes from the distance and time data provided by Hunger and Meituan. Because of the algorithm design, the specific map route is not considered. This article designed a 100*100 map where all locations are randomly generated. Using this 100*100 axis map, we can clearly get the distance between the positions for the function to predict the time.

When the linear regression algorithm in the system predicts the time, the main factors to be considered are distance and time. The time and distance are obviously positively correlated. Simplification is only. It can be said that the linear regression algorithm is used to predict the data set. It is the best. At the same time, the take-away delivery staff's priority algorithm makes the delivery of the delivery more reliable. Combining these situations, this paper proposes a solution with low complexity, high degree of automation, and the advantages of programming and maintenance extension. This design uses a simplified parameter and proposes a take-out delivery algorithm based on the actual situation to provide a reminder between the dispatcher and the company.

Keywords: Takeaway delivery; priority; linear regression

目 录

摘要 I

Abstract II

第一章 引言 1

1.1 开发背景和意义 1

1.2 研究现状 1

1.3 研究的方法 2

二章 可行性分析与需求分析 4

2.1可行性分析 4

2.1.1 技术可行性 4

2.1.2 经济可行性 4

2.1.3 社会可行性 4

2.1.4 操作可行性 4

2.2需求分析 5

2.2.1系统开发的目的 5

2.2.2 系统的开发要求 5

2.2.3系统的主要功能 5

2.2.4系统ER图设计 6

2.2.5系统角色分析 9

2.2.6用例说明 9

2.3本章小结 10

第三章 系统概要设计 11

3.1系统开发环境 11

3.2总体结构设计 11

3.3功能模块设计 11

3.4 数据流程分析 12

3.5系统数据库设计 14

3.5.1 数据库概念结构设计 14

3.5.2 数据库逻辑设计 14

3.5.3 数据表详细设计 14

3.6本章小结 16

第四章 系统详细设计与实现 16

4.1 系统功能模块说明 16

4.1.1 系统页面功能 16

4.1.2 算法功能 16

4.2模块功能设计 17

4.2.1 系统页面设计 17

4.2.3 表格显示所有订单的状态 18

4.2.4 订单插入 19

4.2.5显示所有派送员的位置和优先级 19

4.2.6 从数据库获取数据 20

4.2.7 获取下一个派送的订单 21

4.2.8 计算距离,分配派送员 22

4.2.9 线性预测算法实现 22

第五章 功能测试 24

5.1 系统测试 24

5.2 功能测试 24

5.2.1 登录功能测试 24

5.2.2派送功能测试 25

5.2.3派送员位置和优先级显示测试 26

5.2.4拟合预测画图功能显示 27

5.3性能测试 27

总结 28

致谢 29

参考文献 30

第一章 引言

1.1 开发背景和意义

随着愈发忙碌的都市生活和互联网的普及,日常生活中,越来越多的人们选择外卖作为他们获取食物的手段。大街小巷,随时可以见到外卖派送员和拿外卖的人。以往,人们选择在家或者店铺中用餐,但是这种用餐方式不仅费时而且费力,在店铺用餐更是价格不菲,难以成为人们日常的用餐方式。而外卖的出现改变了这一现状,人们可以轻而易举的在公司或者家中订到多样,美味的外卖,这给了他们更多的时间集中于他们本身的事务而无需为食物烦心。外卖作为一种随着物流的发达而兴起的行业,如今正是处于上升期。

在目前的外卖软件中,大部分时候是由外卖派送员对派单进行选择,或者由店铺选择某些外卖员进行派单。这种方式在外卖派送的高峰期由于人力选择的失误和不准确性,会导致大量的派送资源被浪费,导致派送的效率地下。另外,大部分外卖派送软件对于失误的派单员都会进行金钱方面的处罚,这对于一直稳定偶尔一次失误的派送员不利,同时也不能有效的提升用户的体验。随着用户和外卖派送员越来越多,提升用户体验和派送员的派单效率是社会和大众关注的问题[1]。

剩余内容已隐藏,请支付后下载全文,论文总字数:20440字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;