90 likes | 288 Views
進度報告 4. 指導教授:郭文興老師 學生 : 楊舒智. 本次進度. 加入其中有 segment 裡面沒有節點的情況 模擬環境追加. 設定. 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. Confirm message received : read & readmax (initial value=0).
E N D
進度報告4 指導教授:郭文興老師 學生 :楊舒智
本次進度 • 加入其中有segment裡面沒有節點的情況 • 模擬環境追加
設定 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 Segment velocitywhenthereisnotanynodesinasegment:Vfree
設定 Systemstarttimer : Timerini=1~5 Vroad= [V1,V2,V3,…, Vmax] Vsnum=MAX[Vr1,Vr2,Vr3,…,Vr(max-1)]
CASE0(每5秒重複檢查的部份) • if (Timerini>=5) • Timerini=0 • if (nnum==maxsnum) • if (node does not receive any Vroad data) • V1 ~ Vsnum-1 = Vfree • if (nnum>Threshold Value) • Vsnum=0 • update Vsnum into Vroad • else • broadcast READY_MESSAGE in segment • endif • end if • end if • end if
CASE1(已經收到前面黑點的資料) • if(nodereceivedVroadfromprevioussegment) • if (nnum==maxsnum) • if(Vsnum-1doesnothavedata) • Vsnum-1=Vfree • if (nnum>Threshold Value) • Vsnum=0 • update Vsnum into Vroad • else • broadcast READY_MESSAGE in segment • endif • endif • endif • endif
CASE2(白點) • if(noderecreivedaREADY_MESSAGE) • if (nnum!=maxsnum && 在同一個sugment) • send Vr to last node in segment • end if
CASE3(收到白點的回傳之後) • if(nodereceivedVr[1~(nnum-1)]completely) • if (nnum==maxsnum&&同segment) • Vsnum=MAX[Vr1,Vr2, Vr3,…,Vr(max-1)] • update Vsnum into Vroad • if(snum!=max) • transmission Vroadto forward segment • else • send Vroad to the other road by geocast • end if • end if • endif
模擬假設 1.環境選擇在類似一般市區的道路上,有雙向的道路和十字路口。 2.每個十字路口設有紅綠燈,車輛遵守紅綠燈的號誌行駛。 3.節點一開始以亂數的方式分布在道路中,並且依照周圍的節點密度來適度調整自己的行車速度。 4.節點離開和節點進入的時間經由紅綠燈管制,但是節點進出的數量並不一定會相等。 5.先以上述的設定做出系統本身的性能評價,再經由適當的調整segment長度和ThresholdValue等等的參數來跑看看後續的模擬。 道路長度:2000m 道路寬度:7m 最大速限:70km/hr 道路最大節點密度: 4車/10m 節點傳輸範圍:250m