共享单车负载均衡和调度方法的设计与实现毕业论文
2022-09-18 17:19:41
论文总字数:32587字
摘 要
互联网在近几年中以一种超乎寻常的速度发展着,促进社会进入了现代信息化社会,并且随着信息化的实现产生了许多新兴产业,共享单车在近几年中突然在国内外兴起,走进了人们的生活之中,给人们生活出行带来了极大的方便。在现在的路边存在着两种类型的单车,一种是随意停放的共享单车,另一种是有固定停放点和相应刷卡的有桩的共享公共单车。无桩共享单车主要有ofo和摩拜等,它们具备了一个非常大的优势,就是可以不定点停放,这对作为使用者的我们有着非常大的好处,完全不用去刻意去寻找停靠点,我们可以就近停车,就近取车。而有桩单车就是我们各个城市通过固定点办理的城市公共自行车卡,它最大的问题就是需要寻找附近的停放点取车和停车,而我们所要停放的点与我们的目的地还是存在着一定的距离。
在车辆停放过程中有桩车辆和无桩车辆随着时间的发展,许多问题就显现出来了,有桩车辆会常常出现一个点的车辆出现过多而无法停放致使用户必须寻找其他停放点进行停放,由于各个停放点间存在着一定距离,给用户带来了极大的不便。但是于此同时又存在着另一种极端的现象,许多停放点的车辆由于大量人员的取车已经存在一种空的状态,但是附近还有许多用户急需用车,因此需要花费大量时间去其他停放点找车。为此本次设计着眼于有桩共享单车的调度问题设计出相对合理的单车调度方案,较为有效实现共享单车资源的平衡利用。
本论文主要站在共享单车调度员的角度,实现区域内站点单车数量的调度问题,从而实现共享单车的负载平衡。本毕设系统是在Microsoft Visual Studio 2010中运行的,采用的是B/S架构,前台使用的语言和技术有Html5、Css、JavaScript、Ajax等,后台使用的是C#语言,数据库使用的是Microsoft SQL Server 2008 R2。
该系统所研究的调度问题属于TSP问题,而TSP问题又是一个组合优化问题,本设计中采用改进的贪心算法进行求解。求解过程中并不从整体上获得最优解,而是将问题划分为若干个子问题,去求解每个子问题最优解,然后将这些若干个最优解组合起来,从而得到该问题的解。
本设计通过建立坐标系模拟仿真出单车站点分布,普通用户和调度员对站点单车进行借还操作,后台数据库实时记录站点单车数量情况,结合改进版的贪心算法,最终求解出最优的单车调度路线。值得注意的是,在调度过程中,需要注意一些变量因素是否满足调度需求。例如,调度车在前往下一个需要调度的站点时,需要获取下一站点现存单车数量、单车信号量、调度车上的单车数量是否足够满足下一个调度点,如果调度车调度的下一跳有两个相同需求的站点,这时就需要比较这两个站点与调度车所在站点的距离,选出最短距离进行调度。诸如此类的关注点还需要结合实际情况进行考虑。
关键词:负载平衡与调度;C#;SQL Server;B/S架构;JavaScript;TSP问题;贪心算法
Design and Implementation of Shared Bicycle Load Balancing and Scheduling Method
Abstract
In recent years, the Internet has developed at an extraordinary speed and has promoted the society into a modern information-based society. With the realization of information, many emerging industries have emerged. Sharing bikes have suddenly been at home and abroad in recent years. It has risen into the lives of people and brought great convenience to people's lives. There are two types of bicycles on the roadside, one is a free-standing shared bicycle, and the other is a shared public bicycle with fixed parking points and corresponding swipe cards. There are mainly non-piles bicycles, including ofo and Mobike. They have a very big advantage, that is, they can be parked indefinitely. This has great benefits for us as users. We do not have to deliberately search for stops. You can park near you and pick up your car nearby. A pile of bicycles is a city public bicycle card handled by our cities through fixed points. The biggest problem is that we need to find parking spots nearby to pick up and park cars. The points we have to park and our destinations still exist. distance.
In the process of parking the vehicle, piled vehicles and pile-free vehicles develop with time, many problems have emerged, piled vehicles will often have one point of the vehicle appearing too much and unable to park so that the user must find other parking spots for parking. Due to the existence of a certain distance between the parking spots, the user is greatly inconvenienced. However, at the same time, there is another extreme phenomenon. Many vehicles at parking spots have an empty state due to the collection of a large number of people. However, many users in the vicinity are in urgent need of vehicles. Therefore, it takes a lot of time to go to other places. Park to find a car. For this reason, this design focuses on the scheduling problem of piled shared bicycles and designs a relatively reasonable bicycle scheduling scheme, which effectively balances the use of shared bicycle resources.
This dissertation mainly stands in the perspective of the shared bicycle dispatcher, and realizes the scheduling problem of the number of bicycles in the area, so as to realize the load balancing of the shared bicycles. This complete system is running in Microsoft Visual Studio 2010. It uses the B/S architecture. The languages and technologies used in the front desk are Html5, Css, JavaScript, and Ajax. The background uses the C# language. The database uses Microsoft. SQL Server 2008 R2.
The scheduling problem studied by this system belongs to the TSP problem, and the TSP problem is also a combinatorial optimization problem. In this design, an improved greedy algorithm is used to solve the problem. In the solution process, the optimal solution is not obtained as a whole. Instead, the problem is divided into several sub-problems. The optimal solution of each sub-problem is solved. Then these several optimal solutions are combined to obtain the solution of the problem.
In this design, the distribution of bicycle stations was simulated through the establishment of a coordinate system simulation. Ordinary users and dispatchers performed operations on site bikes. The back-end database recorded the number of site bicycles in real time. Combined with the improved version of the greedy algorithm, the optimal bicycle scheduling was finally solved. route. It is worth noting that during the scheduling process, it is necessary to pay attention to whether some variable factors meet the scheduling requirements. For example, when the dispatcher vehicle goes to the next site that needs scheduling, it needs to obtain whether the number of existing bicycles at the next site, the signal volume of bicycles, and the number of bicycles on the dispatcher vehicle are sufficient to meet the next scheduling point. If the next hops of the dispatcher scheduling are Two sites with the same requirements need to compare the distance between the two sites and the site where the dispatcher is located, and select the shortest distance for scheduling. Concerns such as this also need to consider the actual situation.
Keywords: load balancing and scheduling; C#; SQL Server; B/S architecture; JavaScript; TSP problem; greedy algorithm
目 录
第一章 前 言 1
1.1 课题背景与研究意义 1
1.2 研究现状 1
1.2.1国外车辆调度的理论研究 1
1.2.2国内车辆调度的理论研究 2
1.3 研究方法 3
1.4 论文的结构 4
第二章 需求分析与可行性分析 5
2.1需求分析 5
2.1.1 系统开发目的 5
2.1.2 系统功能需求分析 5
2.1.3 系统界面需求分析 5
2.1.4 性能需求分析 5
2.2可行性分析 6
2.2.1 概述 6
2.2.2 技术可行性 6
2.2.3 经济可行性 6
2.2.4 社会需求可行性 6
2.2.5 操作可行性 7
第三章 系统的概要设计和分析 8
3.1系统开发环境及相关技术 8
3.1.1系统开发环境 8
3.1.2 开发语言 8
3.1.3 开发技术 9
3.1.4 Microsoft Visual Studio 2010 9
3.1.5 Microsoft SQL Server 2008 R2 9
3.2系统功能结构设计 10
3.3 系统功能模块设计 10
(1) 用户登录模块 10
(2) 单车调度模块 10
3.4 数据流程分析 10
3.5 系统数据库设计 11
3.5.1 数据库概念结构设计 11
3.5.2 数据库设计 14
3.5.3 数据表详细设计 14
剩余内容已隐藏,请支付后下载全文,论文总字数:32587字
课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找。