我正在尝试运行以下代码,其中我将LTE网络与fastbroadcast结合起来
所有补丁https://drive.google.com/drive/folders/0B7S255p3kFXNZ2lWZDBRSW40Q00?usp=sharing
如何修补快速广播soulution for Patch Fastbroadcast in ns2.35
source 802.11p.tcl
# ======================================================================
# Define options
# ======================================================================
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/Nakagami ;# radio-propagation model
set val(netif) Phy/WirelessPhyExt ;# network interface type
set val(mac) Mac/802_11Ext ;# MAC type
set val(ifq) Queue/LTEQueue/DLAirQueue; ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 100 ;# max packet in ifq
set val(nn) 38 ;# number of mobilenodes
set val(rp) AODV ;# routing rotocol (not used: broadcast transmissions)
set val(x) 1903; #x dimension of the topography
set val(y) 882; #y dimension of the topography
set val(stop) 3607.0; #simulation time
set val(start) 1
set val(mobility) "mobility.tcl"
set val(eNB) 1
# ======================================================================
# Main Program
# ======================================================================
set ns_ [new Simulator]
$ns_ node-config -addressType hierarchical
AddrParams set domain_num_ 4
lappend clusterNbr 2 2 1 1
AddrParams set cluster_num_ $clusterNbr
lappend eilastlevel 8 2 6 8 7 7
AddrParams set nodes_num_ $eilastlevel
$ns_ use-newtrace
#Initialize Global Variables
set tracefd [open UDP_Noise.tr w]
$ns_ trace-all $tracefd
set namtrace [open UDP_Noise.nam w]
$ns_ namtrace-all $namtrace
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
#set up topography object
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
#create God
create-god [expr $val(nn)+$val(eNB)]
set server [$ns_ node 0.0.1]
set aGW [$ns_ node 0.0.4]
#create $val(nn) cars
set chan_1_ [new $val(chan)]
$ns_ node-config -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_1_ \
-topoInstance $topo \
-agentTrace OFF \
-routerTrace OFF \
-macTrace OFF \
-movementTrace OFF
$ns_ node-config -wiredRouting ON
set eNB(0) [$ns_ node 1.0.0]
$eNB(0) random-motion 0
$eNB(0) set X_ 1500.0
$eNB(0) set Y_ 600.0
$eNB(0) set Z_ 0.0
$ns_ at 0.00 "$eNB(0) setdest 1500 600 0"
for {set i 0} {$i < $val(nn)} {incr i} {
set node_($i) [$ns_ node 1.0.[expr $i + 1]]
$node_($i) base-station [AddrParams addr2id [ $eNB(0) node-addr]]
$node_($i) random-motion 0
}
$ns_ simplex-link $eNB(0) $aGW 1000Mb 2ms LTEQueue/ULS1Queue
$ns_ simplex-link $aGW $eNB(0) 1000Mb 2ms LTEQueue/DLS1Queue
# The bandwidth between aGW and server is not the bottleneck.
$ns_ duplex-link $aGW $server 5000Mb 2ms DropTail
$ns_ duplex-link-op $server $aGW orient down
$ns_ duplex-link-op $aGW $eNB(0) orient left-down
source $val(mobility)
for {set i 0} {$i < $val(nn)} {incr i} {
set udp($i) [new Agent/Broadcastbase]
set null($i) [new Agent/Null]
$ns_ attach-agent $server $udp($i)
$ns_ attach-agent $node_($i) $null($i)
$udp($i) set fid_ 0
$ns_ connect $udp($i) $null($i)
set cbr($i) [new Application/BroadcastbaseApp]
$cbr($i) attach-agent $udp($i)
$cbr($i) set packetSize_ 200
$cbr($i) set interval_ 0.2
$ns_ at $val(start) "$cbr($i) start"
$ns_ at $val(stop) "$cbr($i) stop"
}
#finish procedure
proc finish {} {
global ns_ tracefd namtrace
$ns_ flush-trace
close $tracefd
close $namtrace
exec nam UDP_Noise.nam &
exit 0
}
#reset nodes
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at $val(stop) "$node_($i) reset";
}
$ns_ at $val(stop) "finish"
$ns_ at [expr $val(stop) + 0.01] "$ns_ halt"
$ns_ run
但是通过它的实现创建了以下错误:
num_nodes is set 39
INITIALIZE THE LIST xListHead
Segmentation fault (core dumped)
请解决它帮助我