登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 软件工程 > 正文

旅行线路规划算法的研究与实现

 2022-11-20 11:11  

论文总字数:26522字

摘 要

由于经济水平的飞速提升,外出游玩的人越来越多,旅游业迅速成为推动我国GDP发展的朝阳产业。现代社会,生活节奏的逐渐加快,大家已经不满足于长时间在一个目的地停留,越来越多的人选择在短时间内游览多个城市。然而面对复杂的城市选择,大多数人很难在这些城市中规划出一条最优路径,尽管如今有许多优秀的导航软件可以帮助旅客规划路线,但大多数的导航软件都存在基于两点之间规划路线的缺陷,不能进行多目的地的旅行线路规划,用户很难通过输入计划访问城市得出一条能够依次游览这些城市的最优路径。因此,科学合理地规划最优路径,使得游客能够节省时间和金钱的花费,得到最佳的旅游体验,具有十分重要的意义。

本论文主要的工作内容如下:

(1)通过对路线规划问题进行系统分析,将旅行线路规划问题抽象成TSP问题并建立数学模型。提出适用于旅行线路规划问题的深度优先搜索算法,实现遍历距离最短的旅行线路和带有车票权值的旅行线路。

(2)结合上述研究工作,设计并实现了旅行线路规划系统,系统简单地包括系统管理和主要功能两大模块,主要采用了深度优先算法,根据用户的旅行城市需求(出发城市和计划访问城市列表),调用百度地图自动测算各城市之间的距离,使用深度优先算法访问距离最短的旅行线路和带有车票权值的旅行线路后给用户选择。除了旅行线路规划功能,系统还能够为用户提供城市介绍、发布旅游新闻公告等多种服务。

论文提出了适用于旅行线路规划问题的深度优先搜索算法,弥补了传统旅游网站在旅行线路规划问题上的不足。通过测试表明,基于深度优先搜索算法进行旅行线路规划,不仅结构简单,易于实现,而且占用内存较少,系统识别的准确率达百分之九十。系统可用,易操作性较好,但是还需要在系统功能的多样性上进一步改进和提高。

关键词:旅行线路规划;深度优先搜索算法;TSP ;最短路径;百度地图

Research and implementation of travel route planning algorithm

Abstract

Due to the rapid improvement of the economic level, more and more people go out to play, tourism has rapidly become a sunrise industry to promote the development of China's GDP. In modern society, with the gradual acceleration of the pace of life, people are not satisfied with staying in a destination for a long time, and more and more people choose to visit multiple cities in a short time.Facing the complex urban choice, however, it is difficult for most people in the city planning out a optimal path, although nowadays there are many excellent navigation software can help travelers planning route, but most of the navigation software defects based on the planning route between two points, cannot undertake more destination tourist route planning, the user is hard to through the input plan to visit the city to draw a visit to the city of the optimal path in turn. Therefore, it is of great significance to plan the optimal path scientifically and reasonably ,so that tourists can save time and money to get the best tourism experience.

The main contents of this paper are as follows:

(1) through systematic analysis of route planning, the route planning problem is abstracted into TSP problem and a mathematical model is established.

A depth-first traversal algorithm is proposed for the problem of travel route planning to realize the travel route with the shortest traversal distance and the travel route with ticket weight.

(2) the combination of the above research work, travel route planning system was designed and implemented, the system including the system management briefly and main function modules, mainly adopts the depth first algorithm, according to the user's city travel demand (departure city and plan to visit the city list), called baidu map automatically calculates the distance between the cities of the access distance using depth-first algorithm with the shortest travel routes and ticket weight after the travel route for the user to select.

In addition to the function of tourism route planning, the system can also provide users with a variety of services such as city introduction and tourism news announcement.This paper proposes a depth-first search algorithm for the problem of travel route planning, which makes up for the deficiency of traditional tourism websites in the problem of travel route planning.The test shows that the travel route planning based on depth-first search algorithm is not only simple in structure and easy to implement, but also occupies less memory, and the accuracy of system recognition is 90%.The system is available and easy to operate, but it still needs to be further improved on the diversity of system functions.

Key words: tourism route planning; Depth-first search algorithm;The TSP;Shortest path;Baidu map

目 录

摘要 I

Abstract II

第一章 绪论 8

1.1 论文工作背景与意义 8

1.2相关研究现状 8

1.3主要工作内容 9

1.4研究的方法 9

1.5论文组织结构 10

第二章 相关技术基础 12

2.1 Java语言 12

2.1.1 Java的简介 12

2.1.2 Java的优势 12

2.1.3 Java的劣势 12

2.2 SSM框架 12

2.2.1 SSM框架简介 12

2.2.2 SSM框架的优势 12

2.2.3 SSM框架的劣势 13

2.3 JSP 13

2.3.1 JSP的简介 13

2.3.2JSP的特点 13

2.4 MySQL数据库 13

2.5 AdminLTE框架 14

2.6 JavaScript 14

2.7百度地图API 14

2.8本章小结 14

第三章 系统需求分析 15

3.1系统功能需求分析 15

3.1.1系统开发的目的 15

3.1.2 系统的开发要求 15

3.1.3 系统用户角色 15

3.1.4用例说明 16

3.2系统非功能需求分析 17

3.2.1性能需求 17

3.2.2安全性 17

3.2.3可维护性与可扩展性 17

3.2.4易用性 17

3.3本章小结 18

第四章 系统设计 19

4.1系统总体设计 19

4.1.1系统分层结构设计 19

4.1.2系统功能模块结构设计 20

4.1.3系统数据库设计 21

4.2系统详细设计 23

4.2.1用户登录 23

4.2.2旅行线路规划 23

4.2.3添加景点 24

4.2.4收藏景点 25

4.2.5添加公告 26

4.2.6已读公告 26

4.3本章小结 27

第五章 系统实现与测试 28

5.1系统实现工具与环境 28

5.2核心代码分析 28

5.3系统主要运行界面 34

5.3.1旅行线路查询界面 34

5.3.2景点管理界面 35

5.3.3查看界面 36

5.4系统测试 37

5.4.1系统功能测试 37

5.4.2系统非功能测试 40

5.5本章小结 42

第六章 总结与展望 43

6.1总结 43

6.1展望 43

致谢 44

参考文献 45

图目录

图序号

图名称

页码

图3.1

管理员用例

16

图3.2

用户用例图

17

图4.1

系统分层结构图

20

图4.2

系统功能结构图

21

图4.3

用户登录流程图

23

图4.4

路线规划流程图

24

图4.5

收藏景点流程图

25

图4.6

查看景点流程图

25

图4.7

添加公告流程图

26

图4.8

已读公告流程图

27

图5.1

核心代码段(1)

28

图5.2

核心代码段(2)

29

图5.3

核心代码段(3)

29

图5.4

核心代码段(4)

29

图5.5

核心代码段(5)

29

图5.6

核心代码段(6)

30

图5.7

核心代码段(7)

30

图5.8

核心代码段(8)

30

图5.9

核心代码段(9)

31

图5.10

核心代码段(10)

31

图5.11

核心代码段(11)

31

图5.12

核心代码段(12)

32

图5.13

核心代码段(13)

32

图5.14

核心代码段(14)

33

图5.15

核心代码段(15)

33

图5.16

核心代码段(16)

34

图5.17

旅行线路查询界面(1)

34

图5.18

旅行线路查询界面(2)

35

图5.19

景点管理界面

35

图5.20

添加景点界面

35

图5.21

景点信息修改界面

36

图5.22

景点信息删除界面

36

图5.23

查看景点页面

36

图5.24

查看景点介绍界面

37

图5.25

我的收藏界面

37

图5.26

旅行线路查询测试界面

41

表目录

表序号

表名称

页码

表4.1

用户表

21

表4.2

角色表

21-22

表4.3

用户角色关系表

22

表4.4

公告表

22

表4.5

用户公告关系表

22

表4.6

旅游景点表

22

表4.7

用户景点关系表

23

表5.1

测试用例表

37-40

表5.2

城市距离矩阵表

41

表5.3

城市票价矩阵表

41

表5.4

判断最优表

41-42

表5.5

系统运行性能测试表

42

第一章 绪论

1.1 论文工作背景与意义

近年来国内经济迅速发展推动着民众生活水平不断提高,越来越多的人选择在各种节假日出游,我国旅游业较前几年相比也保持着较快的发展,2019年我国在旅游业对GDP的贡献占全国GDP总量的百分之十一 [1-2]。由此看来,旅游业作为第三产业中的朝阳产业,已经成为推动我国经济更好更快发展的重要产业。

随着互联网技术的广泛普及,旅游业也逐渐朝着个性化、定制化、多样化的层面发展。经历了跟团游的刻板和枯燥无味后,越来越多的游客开始偏好于驾车或坐车的自助旅游模式。自助游是现如今最受游客欢迎的旅游方式,自助游以其个性化、快捷、经济的特征获得了广大游客的一致认可。然而游客如果选择自助出行的方式就必然会涉及到路线规划的问题。一个合理的路线规划系统既能帮助用户节省旅行路线规划的时间,又能帮助用户节省出行的经费开支[3-6]。现如今市面上大多数旅行路线规划系统都是基于从起点到终点的单一的路线规划,不能满足游客在短时间内多样化旅游的需求,面对许多旅客短时间内多目的地式的旅游方式十分不友好,用户很难短时间内在复杂的旅游城市中选择适合自己的旅行线路 [7-8]。尽管传统的旅游网站也具备旅游线路规划功能,但大多数都是热门景点旅行线路的简单组合,无法满足用户的个性化需求。而且,推荐给用户的旅行线路规划大多是和旅游地商家合作的广告,结果大多不够真实,充满商业气息[9-10]

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

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

企业微信

Copyright © 2010-2022 毕业论文网 站点地图