• 沒有找到結果。

5.2 控制點選擇問題效能評估

5.2.3 實驗 1A 結果與分析

solution 所求得的 edge coverage、mean MCD、max MCD ,三者比較。

圖 5-1︰CPSP-Coverage—NPF vs. NPF2 vs. Optimal solution (Edge Coverage)

圖 5-2︰CPSP-Coverage—NPF vs. NPF2 vs. Optimal solution (Mean MCD)

Graph1 Graph2 Graph3 Graph4 Graph5

NPF 36 78 104 115 125

NPF2 37 78 104 117 126

Optimal 37 78 104 118 131

0

Graph1 Graph2 Graph3 Graph4 Graph5

NPF 1.7 1.57 1.48 1.51 1.54

NPF2 1.69 1.57 1.48 1.5 1.53

Optimal 1.69 1.57 1.48 1.49 1.51

1.35

圖 5-3︰CPSP-Coverage—NPF vs. NPF2 vs. Optimal solution (Max MCD )

由圖 5-1 可知,在 Graph 1 中 NPF 演算法所求的 edge coverage 比 NPF2 及 optimal solution 均少一個 edge,而 NPF2 所求出的 edge 與 optimal solution 相同,在 Graph 4 中,NPF2 比 optimal solution 所求 edge 數少一個 edge,NPF 則又比 NPF2 少兩個 edge,

在 Graph5 中,NPF2 比 optimal 少 5 個 edge,而 NPF 又比 NPF2 演算法所求的 edge 少 一個 edge。可看出以 NPF2 選擇出的控制點在 edge coverage 表現較佳。且因為 NPF、

NPF2 演算法會優先選擇 node potential 及 trail hit count 加權後較高的候選控制點,不 能保證所得到的 profit 最高,因此,在某些情況下就會造成 NPF 及 NPF2 演算法的 edge coverage 效率低於 optimal solution。

由圖 5-2 可知,在 Graph 1 中 NPF 演算法所求的 mean MCD 比 optimal solution 高 0.01 個 edge,NPF2 演算法所求與 optimal solution 相同。在 Graph 4 中,NPF 比 optimal solution 高 0.02 個 edge,NPF2 比 optimal solution 高 0.01 個 edge。在 Graph 5 中,NPF 演算法所求的 mean MCD 比 optimal solution 高 0.03 個 edge,NPF2 演算法所求比 optimal solution 高 0.02 個 edge。在此 Graph 中,NPF2 所選的候選點比 NPF 所挑選的候選點

Graph1 Graph2 Graph3 Graph4 Graph5

NPF 2 2 2 2 3

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

57

在所有 trail 上出現比例相對較高,故 NPF2 比 NPF 較容易找到距離行動節點較近的控 制點,因此,在此情況下就會形成 NPF2 所求的 mean MCD 效率優於 NPF 演算法。而 在 max MCD 三者數據均相同。

圖 5-4、圖 5-5 為 CPSP-Utility 的實驗結果,分別列出 NPF-U 演算法與 NPF-U2 演算法及 optimal solution 所求得的 weighted edge coverage、mean weighted MCD,而 由於 max weighted MCD 所求相同,故不以圖表列出。

圖 5-4︰CPSP-Utility—NPF-U vs. NPF-U2 vs. Optimal solution (Weighted Edge Coverage )

Graph1 Graph2 Graph3 Graph4 Graph5

NPF-U 79 197 274 297 328

NPF-U2 79 199 274 295 335

Optimal 79 199 274 299 348

0 50 100 150 200 250 300 350 400

Weighted Edge Coverage

圖 5-5︰CPSP-Utility—NPF-U vs. NPF-U2 vs. Optimal solution (Mean Weighted MCD)

由圖 5-4 可知,在 Graph 2、Graph 4 及 Graph 5 中,NPF-U 演算法所求的 weighted edge coverage 分別比 optimal solution 少 2 個、2 個及 20 個 weighted edge,原因同上,

也是因為 NPF-U 演算法的控制點選擇機制所導致。而在 Graph 4 及 Graph 5 中,NPF-U2 分別比 optimal solution 少 4 個及 13 個 weighted edge,使用 NPF-U2 演算法所挑選出來 的點比 NPF-U 的 weighted edge 較多,這也是因為 NPF-U2 演算的設計原則挑選出來 的候選點,在所有 trail 上出現的比例較 NPF-U 來的高。

而由圖 5-5 可知,在 Graph 2、4、5 中,NPF-U 演算法所求的 mean weighted MCD 比 optimal solution 多 0.01、0.02、0.04 個 weighted edge,這是由於在此 Graph 中,optimal solution 演算法所選的候選控制點在所有 trail 上出現的比例較 NPF-U 所選的來得高,

故所求的 mean weighted MCD 效率低於 optimal solution。相同的,在 Graph 5 中 NPF-U2 演算法所求的 mean weighted MCD 比 optimal solution 多 0.01、0.02 個 mean weighted MCD,原因同 NPF。由圖 5-6 可看出,NPF-U 演算法的 mean weighted MCD 效能略低 於 NPF-U2。

Graph1 Graph2 Graph3 Graph4 Graph5

NPF-U 3.23 3.17 3.03 3 3.03

NPF-U2 3.23 3.16 3.03 2.99 3.01

Optimal 3.23 3.16 3.03 2.98 2.99

2.85

Mean Weighted MCD

圖 5-6、圖 5-7 為 CPSP-Utility-Flow 的實驗結果,列出 NPF-PF 演算法與 optimal solution 所求得的 populated edge coverage、mean weighted MCD。

圖 5-6︰CPSP-Utility-Flow—NPF-PF vs. Optimal solution (Populated Edge Coverage)

圖 5-7︰CPSP-Utility-Flow—NPF-PF vs. Optimal solution (Mean Populated MCD)

由圖 5-6 可知,在 Graph 1、2、3、4 及 5 中 NPF-PF 演算法所求的 populated edge

Graph1 Graph2 Graph3 Graph4 Graph5

NPF-PF 750 759 774 791 804

Optimal 753 768 780 802 814

700

Populated Edge Coverage

Graph1 Graph2 Graph3 Graph4 Graph5

NPF-PF 25.58 29.79 30.56 41.15 43.1

Optimal 20.5 26.78 30.5 36.81 36.68

0

Mean Populated MCD

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

60

coverage 比 optimal solution 各少 3、9、6、11 及 10 個 populated edge,因為 NPF-PF 演算法會優先選擇 unselected edge weight/node cost 加權 trail potential 再乘上 flow potential 較高的候選控制點,如同 0-1 knapsack problem,這樣做也不能保證所得到的 profit 最高,因此 NPF-PF 演算法的 populated edge coverage 效率低於 optimal solution。

且每段路徑上的 flow 為 1~5,若遇到兩條 trail 相交則 flow 可能是 2~10,因此數據相 差較其他評估指標較多。

由圖 5-7 可知,在 Graph 1、2、3、4 及 5 中,NPF-PF 演算法所求的 mean populated MCD 比 optimal solution 高 5.08、3.01、0.06、4.34 及 6.42 個 populated edge,且 mean populated MCD 需乘上在這個路段上的 flow,因此 mean populated MCD 相較於其他 評估指標為高,下節將此演算法與其他演算法一同評估大型問題,可看出各啟發式演 算法之效能比較。