1 / 10

進度報告 3

進度報告 3. 指導教授:郭文興老師 學生 : 楊舒智. 本次進度. Code 設定 CASE 0  value CASE 1  active node( 黑點 ) CASE 2  standby node( 白點 ) 數據統計 模擬假設. 設定. Segment : S snum ; snum=1,2,3,…,max. Node : N snum , nnum ; snum=1,2,3,…,max ; nnum=1,2,3,…,max 1 ,…, max 2 ,…, max max.

meryle
Download Presentation

進度報告 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 進度報告3 指導教授:郭文興老師 學生 :楊舒智

  2. 本次進度 • Code • 設定 • CASE0value • CASE1activenode(黑點) • CASE2standbynode(白點) • 數據統計 • 模擬假設

  3. 設定 Segment:Ssnum;snum=1,2,3,…,max Node:Nsnum,nnum;snum=1,2,3,…,max;nnum=1,2,3,…,max1,…, max2,…, maxmax Confirm message received:read & readmax (initial value=0) Received velocity from standby node:Vr Segment velocity:Vsnum Road velocity:Vroad

  4. CASE0 • when node received READY_MESSAGE • read=1 • when node received Vr • readmax=1 • Vroad= [V1, V2 ,V3 ,…, Vmax]//Vroad的陣列 • k=1 • Vroad[k]= V1 • k++ • if k>3 and Vroad[k-1]==0//第4個segment開始的資料可以直接看前一個是不是0 • Vk=0

  5. CASE1 • if readmax==0 //尚未和白點接觸的黑點 • if 1<=snum<=3 and nnum==maxsnum //前三個segment一律傳READY • broadcast READY_MESSAGE in segment • end if • if snum>=4 and nnum==maxsnum //第4個segment開始要判斷節點多寡 • if nnum<Threshold Value • broadcast READY_MESSAGE in segment • else • Vsnum=0 //節點太多直接把速度設定成0 • update Vsnum into Vroad • end if • end if • end if

  6. if readmax==1 //已收到白點速度的黑點 • if snum!=max and nnum==maxsnum //不是最後一個segment的黑點 • if Vr>Vsnum //如果收到的白點速度比較大就替換 • Vsnum=Vr • else • end if • update Vsnum into Vroad • transmission Vroad to last node in next segment • readmax=0 //傳送後將readmax歸零 • end if • if snum==max and nnum==maxsnum //最後一個segment的黑點 • send Vroad to the other road with geocast • readmax=0 //傳送後將readmax歸零 • end if • end if

  7. CASE2 • if nnum!=maxsnum and read==1 //判定為白點,且已收到READY才動作 • send Vr to last node in segment • read=0 //傳送給黑點後,read歸零 • end if

  8. 數據統計 • 每個segment至少要花的傳送次數: • 黑點是否廣播出READY訊息(0或1)+白點是否回應(0或白點節點數量)+黑點傳送Vroad給下個segment的黑點(1)=1或(2+白點節點數量) • 每個黑點收到的訊息數量: • 白點的回應(0或白點節點數量)+上一個segment黑點傳送過來的Vroad(1)=1或(1+白點節點數量) • 每個白點收到的訊息數量: • 黑點傳送出的READY=0或1 • 一條道路需要傳送的總次數: • 每個segment的傳送次數(1或(2+白點節點數量))*segment的數量

  9. 模擬假設 • 環境: • 模擬環境可以假設在一條寬度適中的道路上,根據之前情境的設定將道路分割成數塊。 • 因為要讓演算法的每個判斷式都發生作用,因此設定segment的數量至少要有5個,前三個segment的節點隨機分布,後面的segment一部分節點數量多,另一部份節點數量少。 • 第一個黑點每幾秒重新啟動系統機制的timer,可能需要經由實驗過後取得:利用超過Threshold Value的segment、正常狀況臨界Threshold Value的segment、只有一個黑點的segment…等等情況一起評估,計算每個segment平均必須花費多少時間之後來決定timer的數值。

  10. 變量討論: • Segment 長度:因為兩個黑點之間必須要連線,所以傳輸範圍至少要大於等於2個Segment長度(亦即Segment長度要小於等於1/2傳輸範圍);在這個前提下,segment長度會影響系統的速度數值、傳輸的時間和成功率 • 若segment太大,則每個segment內的節點數量容易達到Threshold Value,導致獲得的速度資料不客觀。 • 若segment太小,則每個segment內的節點數量相對來說較少的機率比較高,有可能導致一個segment內完全沒有節點而傳輸失敗,傳輸成功的時候也會因為黑點的數量較多,系統整體的效率會降低,但整體獲得的速度數值會比大segment獲得的資料較精確。 • Threshold Value:Threshold Value的設定直接影響到segment內處理工作的作法,會影響系統的速度數值、傳輸的時間。 • 若Threshold Value設定太大,則segment內的工作可能都必須要等待白點全部的回應才能繼續運作,傳輸的時間可能會拉長。 • 若Threshold Value設定太小,則segment內的工作可能都直接將速度資料設定為0,造成系統實用性下降。

More Related