r10-0.tcl
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:1k
- # Generated by sgb2ns, created by Polly Huang
- # GRAPH (#nodes #edges id uu vv ww xx yy zz):
- # 10 28 geo(0,{10,10,3,0.200,0.000,0.000}) 10
- set graph_type random
- proc create-nodes {nsns node} {
- upvar $node n
- upvar $nsns ns
- global verbose
- if {$verbose} {
- puts "creating nodes..."
- }
- for {set i 0} {$i < 10} {incr i} {
- set n($i) [$ns node]
- }
- return 10
- }
- proc create-links {nsns node linkBW} {
- upvar $node n
- upvar $nsns ns
- global verbose
- # EDGES (from-node to-node length a b):
- if {$verbose} {
- puts -nonewline "Creating links 0..."
- flush stdout
- }
- $ns duplex-link $n(0) $n(9) $linkBW 4ms DropTail
- $ns duplex-link $n(0) $n(4) $linkBW 6ms DropTail
- $ns duplex-link $n(0) $n(2) $linkBW 4ms DropTail
- $ns duplex-link $n(1) $n(8) $linkBW 7ms DropTail
- $ns duplex-link $n(2) $n(6) $linkBW 7ms DropTail
- $ns duplex-link $n(3) $n(9) $linkBW 2ms DropTail
- $ns duplex-link $n(3) $n(8) $linkBW 7ms DropTail
- $ns duplex-link $n(3) $n(5) $linkBW 7ms DropTail
- $ns duplex-link $n(4) $n(7) $linkBW 7ms DropTail
- $ns duplex-link $n(4) $n(6) $linkBW 4ms DropTail
- if {$verbose} { puts -nonewline "10..."; flush stdout }
- $ns duplex-link $n(5) $n(9) $linkBW 7ms DropTail
- $ns duplex-link $n(5) $n(7) $linkBW 4ms DropTail
- $ns duplex-link $n(7) $n(9) $linkBW 6ms DropTail
- $ns duplex-link $n(8) $n(9) $linkBW 7ms DropTail
- if {$verbose} {
- puts -nonewline "14..."
- flush stdout
- puts "starting"
- }
- return 14
- }