freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

無線自組織網(wǎng)絡aodv協(xié)議仿真研究-資料下載頁

2024-11-16 18:33本頁面

【導讀】在深入研究AODV協(xié)議的基礎上,以家庭廚房智能家電AdHoc網(wǎng)絡為應用背景,建立網(wǎng)絡仿真模型,并在NS2網(wǎng)絡仿真平臺上設計針對AODV協(xié)議的相關仿真實驗。深入分析仿真結果及關鍵網(wǎng)絡參數(shù),驗證其性能是否滿足于家庭廚房智能家電AdHoc網(wǎng)絡要求。自組織網(wǎng)絡技術是移動AdHoc研究的一個非常重要的部分。目前,一些研究機構提出了許多的路由算法,但是這些算法都各有優(yōu)缺點。它是一種通信范圍大約在10m左右的小型局域網(wǎng)。分析AODV協(xié)議與DSDV協(xié)議的優(yōu)缺點,驗證在智能家居系統(tǒng)這一特點環(huán)境下,按需路由協(xié)議AODV的可行性。3.指導教師意見:學生的調研是否充分?

  

【正文】 ameters setup===================================set val(chan) Channel/WirelessChannel 。 channel typeset val(prop) Propagation/TwoRayGround 。 radiopropagation modelset val(netif) Phy/WirelessPhy 。 network interface typeset val(mac) Mac/802_11 。 MAC typeset val(ifq) Queue/DropTail/PriQueue 。 interface queue typeset val(ll) LL 。 link layer typeset val(ant) Antenna/OmniAntenna 。 antenna modelset val(ifqlen) 50 。 max packet in ifqset val(nn) 11 。 number of mobilenodesset val(rp) DSDV 。 routing protocolset val(x) 500 。 X dimension of topographyset val(y) 400 。 Y dimension of topographyset val(stop) 。 time of simulation end=================================== Initialization ===================================Create a ns simulatorset ns [new Simulator]Setup topography objectset topo [new Topography]$topo load_flatgrid $val(x) $val(y)creategod $val(nn)Open the NS trace fileset tracefile [open w]$ns traceall $tracefileOpen the NAM trace fileset namfile [open w]$ns namtraceall $namfile$ns namtraceallwireless $namfile $val(x) $val(y)set chan [new $val(chan)]。Create wireless channel=================================== Mobile node parameter setup===================================$ns nodeconfig adhocRouting $val(rp) \ llType $val(ll) \ macType $val(mac) \ ifqType $val(ifq) \ ifqLen $val(ifqlen) \ antType $val(ant) \ propType $val(prop) \ phyType $val(netif) \ channel $chan \ topoInstance $topo \ agentTrace ON \ routerTrace ON \ macTrace OFF \ movementTrace OFF=================================== Nodes Definition ===================================Create 11 nodesset n0 [$ns node]$n0 set X_ 9$n0 set Y_ 295$n0 set Z_ $ns initial_node_pos $n0 20set n1 [$ns node]$n1 set X_ 7$n1 set Y_ 8$n1 set Z_ $ns initial_node_pos $n1 20set n2 [$ns node]$n2 set X_ 384$n2 set Y_ 17$n2 set Z_ $ns initial_node_pos $n2 20set n3 [$ns node]$n3 set X_ 392$n3 set Y_ 290$n3 set Z_ $ns initial_node_pos $n3 20set n4 [$ns node]$n4 set X_ 253$n4 set Y_ 261$n4 set Z_ $ns initial_node_pos $n4 20set n5 [$ns node]$n5 set X_ 11$n5 set Y_ 157$n5 set Z_ $ns initial_node_pos $n5 20set n6 [$ns node]$n6 set X_ 191$n6 set Y_ 9$n6 set Z_ $ns initial_node_pos $n6 20set n7 [$ns node]$n7 set X_ 389$n7 set Y_ 169$n7 set Z_ $ns initial_node_pos $n7 20set n8 [$ns node]$n8 set X_ 53$n8 set Y_ 224$n8 set Z_ $ns initial_node_pos $n8 20set n9 [$ns node]$n9 set X_ 220$n9 set Y_ 150$n9 set Z_ $ns initial_node_pos $n9 20set n10 [$ns node]$n10 set X_ 282$n10 set Y_ 64$n10 set Z_ $ns initial_node_pos $n10 20=================================== Generate movement ===================================$ns at 5 $n9 setdest 270 150 5 $ns at 20 $n9 setdest 220 150 5 =================================== Agents Definition ===================================Setup a UDP connectionset udp0 [new Agent/UDP]$ns attachagent $n9 $udp0set null1 [new Agent/Null]$ns attachagent $n1 $null1$ns connect $udp0 $null1$udp0 set packetSize_ 50Setup a UDP connectionset udp2 [new Agent/UDP]$ns attachagent $n0 $udp2set null3 [new Agent/Null]$ns attachagent $n3 $null3$ns connect $udp2 $null3$udp2 set packetSize_ 50=================================== Applications Definition ===================================Setup a CBR Application over UDP connectionset cbr0 [new Application/Traffic/CBR]$cbr0 attachagent $udp0$cbr0 set packetSize_ 50$cbr0 set rate_ $cbr0 set random_ null$ns at $cbr0 start$ns at $cbr0 stopSetup a CBR Application over UDP connectionset cbr1 [new Application/Traffic/CBR]$cbr1 attachagent $udp2$cbr1 set packetSize_ 50$cbr1 set rate_ $cbr1 set random_ null$ns at $cbr1 start$ns at $cbr1 stop=================================== Termination ===================================Define a 39。finish39。 procedureproc finish {} { global ns tracefile namfile $ns flushtrace close $tracefile close $namfile exit 0}for {set i 0} {$i $val(nn) } { incr i } { $ns at $val(stop) \$n$i reset}$ns at $val(stop) $ns namendwireless $val(stop)$ns at $val(stop) finish$ns at $val(stop) puts \done\ 。 $ns halt$ns run部分awk程序:BEGIN{程序初始化,設置一變量以記錄目前系統(tǒng)中最高處理封包的ID及已經傳送及接收到的封包個數(shù) highest_packet_id=0。 sends=0。 receives=0。 routing_packets=0。 first_received_time=0。 first=0。}{ action = $1。 time = $2。 packet_id = $6。 trace = $4。 type = $7。 if(action==s || action== r || action==f ) { 記錄傳送出的封包個數(shù) if(action==samp。amp。trace==AGTamp。amp。type==cbr) {sends++。} 記錄目前系統(tǒng)中最高處理封包的ID if(packet_id highest_packet_id) {highest_packet_id = packet_id。} 記錄封包的傳送時間 if(start_time[packet_id] == 0) {start_time[packet_id] = time。} 記錄接收到的封包個數(shù)及封包的接收時間 if (action ==r amp。amp。 trace== AGT amp。amp。 type== cbr) { if(first==0){ first_received_time= time。 first=1。 } receives++。 end_time[packet_id] = time。 } else end_time[packet_id] = 1。 }}END{ 計算有效封包的端點到端點延遲時間 for (packet_id = 0。 packet_id = highest_packet_id 。 packet_id++)
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1