reuslt is left
This commit is contained in:
parent
ef1095438e
commit
7c2fca755d
|
@ -18,6 +18,8 @@
|
|||
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}线路规划}{5}}
|
||||
\newlabel{linedis}{{2.3}{6}}
|
||||
\newlabel{linedis}{{2.3}{6}}
|
||||
\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces 利用欧几里得距离得到的结果}}{6}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {3}实验过程}{7}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}站点规划}{6}}
|
||||
\newlabel{sdis}{{2.4}{6}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {3}实验结果}{7}}
|
||||
\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces 利用欧几里得距离得到的结果}}{7}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {4}实验总结}{7}}
|
||||
|
|
29
report.log
29
report.log
|
@ -1,4 +1,4 @@
|
|||
This is XeTeX, Version 3.14159265-2.6-0.99991 (TeX Live 2014/W32TeX) (preloaded format=xelatex 2016.5.31) 7 JUL 2016 19:03
|
||||
This is XeTeX, Version 3.14159265-2.6-0.99991 (TeX Live 2014/W32TeX) (preloaded format=xelatex 2016.5.31) 7 JUL 2016 19:21
|
||||
entering extended mode
|
||||
restricted \write18 enabled.
|
||||
%&-line parsing enabled.
|
||||
|
@ -1092,6 +1092,9 @@ Package: xeCJK-listings 2014/05/13 v3.2.12 xeCJK patch file for listings
|
|||
|
||||
LaTeX Warning: Label `knn' multiply defined.
|
||||
|
||||
|
||||
LaTeX Warning: Label `linedis' multiply defined.
|
||||
|
||||
)
|
||||
\openout1 = `report.aux'.
|
||||
|
||||
|
@ -1257,19 +1260,19 @@ File: btn_path.jpg Graphic file (type QTm)
|
|||
File: sp.jpg Graphic file (type QTm)
|
||||
<use "sp.jpg" > [4]
|
||||
File: line_dis.jpg Graphic file (type QTm)
|
||||
<use "line_dis.jpg" >
|
||||
|
||||
LaTeX Warning: `!h' float specifier changed to `!ht'.
|
||||
|
||||
<use "line_dis.jpg" > [5]
|
||||
File: min_dis.jpg Graphic file (type QTm)
|
||||
|
||||
<use "min_dis.jpg" >
|
||||
File: sdis.jpg Graphic file (type QTm)
|
||||
<use "sdis.jpg" >
|
||||
LaTeX Font Info: External font `cmex10' loaded for size
|
||||
(Font) <12> on input line 164.
|
||||
(Font) <12> on input line 177.
|
||||
LaTeX Font Info: External font `cmex10' loaded for size
|
||||
(Font) <8> on input line 164.
|
||||
(Font) <8> on input line 177.
|
||||
LaTeX Font Info: External font `cmex10' loaded for size
|
||||
(Font) <6> on input line 164.
|
||||
[5] [6] [7] (./report.aux)
|
||||
(Font) <6> on input line 177.
|
||||
[6] [7] (./report.aux)
|
||||
|
||||
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
|
||||
|
||||
|
@ -1278,10 +1281,10 @@ LaTeX Warning: There were multiply-defined labels.
|
|||
|
||||
)
|
||||
Here is how much of TeX's memory you used:
|
||||
19594 strings out of 493734
|
||||
392981 string characters out of 6144398
|
||||
462378 words of memory out of 5000000
|
||||
22769 multiletter control sequences out of 15000+600000
|
||||
19597 strings out of 493734
|
||||
393003 string characters out of 6144398
|
||||
450398 words of memory out of 5000000
|
||||
22771 multiletter control sequences out of 15000+600000
|
||||
7481 words of font info for 50 fonts, out of 8000000 for 9000
|
||||
1328 hyphenation exceptions out of 8191
|
||||
52i,11n,58p,10438b,514s stack positions out of 5000i,500n,10000p,200000b,80000s
|
||||
|
|
BIN
report.pdf
BIN
report.pdf
Binary file not shown.
Binary file not shown.
16
report.tex
16
report.tex
|
@ -157,12 +157,26 @@
|
|||
\includegraphics[width=8cm]{min_dis.jpg}
|
||||
\label{linedis}
|
||||
\end{figure}
|
||||
|
||||
|
||||
path(p)表示从起始节点到当前节点的路径,min\_dis(a,p)指p到路径a上最短距离。通过这种方式后,效果比之前的要好了一些,但是对于一些地点它还是会处理的不好,比如对于位于底部的博餐来说,如果距离函数用的还是直线距离,那么当算法走到位于其左上角的丁字路口时,无论是直走还是右拐,其值不变,但是对于其他值来说右拐似乎更好,因此路径就会被诱导的右拐了,即使博餐的人群量再大,在这个路口也不会直走。因此我就想着如何规避这个陷阱 ,最后决定用A*算法算出的最短路径来代替直线距离,这样的h(n)更能反映真实的距离。这样一来这个算法有点贪心算法的性质,并且直观上讲起效率有点低下。在这里我进行了优化,利用动态规划后的思想对地点到路径节点的最短路径值进行缓存,这样的做法大大的提高了效率,实验对比会在实验结果中给出。
|
||||
|
||||
|
||||
\subsection{站点规划}
|
||||
为更有效的运行该线路,可以在上一节得到的线路中,对其设置一些校车停靠点,
|
||||
为更有效的运行该线路,可以在上一节得到的线路中,对其设置一些校车停靠点,这个问题相对来说比较好解决些。其目标就是要让各地点的人到停靠点的距离越小越好。同样这个问题也要考虑人群量的影响。我的解决思路是利用深度优先遍历取最优值。比如想要设置8个站点,除去图书馆和北门外,两个子问题得到的线路各自应该有3个站点。在该子路线中按照深度优先的策略对每三个节点进行测试,计算各个地点到该规划站点的距离,其计算公式为:\\
|
||||
\begin{figure}[h!]
|
||||
\centering
|
||||
\includegraphics[width=8cm]{sdis.jpg}
|
||||
\label{sdis}
|
||||
\end{figure}
|
||||
|
||||
stops是规划得到的停靠点集合,min_sdis(stops,p)用来计算p到stops中每个站点的最短路径的最小值。因为在线路规划中最短路径值都已经缓存过了,因此这里的计算速度还可以。因为我一开始设计的站点数k是可以动态设计的,因此这部分的难点在于如何高效率动态地遍历出所有k个节点的组合,多层for循环是不现实的,因为k是变化的,我用了一个类似数值逐位求余的思想组合的,代码效果还可以。
|
||||
|
||||
\section{实验结果}
|
||||
数据渲染效果已经在前面有所展示了,下面的章节从剩余的三个方面给出实验结果。
|
||||
|
||||
\subsection{最短路径}
|
||||
|
||||
\begin{table}[!h]
|
||||
\renewcommand\arraystretch{1.1}
|
||||
\centering
|
||||
|
|
Loading…
Reference in New Issue