LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-26-2016, 06:27 AM   #1
mudyalawi
LQ Newbie
 
Registered: Oct 2016
Posts: 1

Rep: Reputation: Disabled
Lte in ns2.35 under ubuntu 14.04


I got this error when I run my codes under LTE environment in ns2.35 please help be to resolve this error. thank you



set ns_ [new Simulator]

set val(x) 8000.00 ;# X dimension of the topography
set val(y) 1000.00;# Y dimension of the topography

# Predefine tracing
set nf [open t-down-th.nam w]
$ns_ namtrace-all $nf
set f [open t-down-th.tr w]
$ns_ trace-all $f
set opt(nn) 5
set val(sc) "speed5.txt"


#set up color flow
$ns_ color 1 Blue

# Define the LTE topology
# UE(i) <--> eNB <--> aGW <--> server
# Other configuration parameters see ~ns/tcl/lib/ns-default.tcl

# step 1: define the nodes, the order is fixed!!


set eNB [$ns_ node];#node id is 0
set aGW [$ns_ node];#node id is 1
set server [$ns_ node];#node id is 2
$eNB set X_ 4000.0
$eNB set Y_ 500.0
$eNB set Z_ 0.0

for { set i 0} {$i<$opt(nn)} {incr i} {
set node_($i) [$ns_ node];#node id is > 2
}

puts "speed.txt"
source $val(sc)

# step 2: define the links to connect the nodes
for { set i 0} {$i<$opt(nn)} {incr i} {
$ns_ simplex-link $node_($i) $eNB 500Mb 2ms LTEQueue/ULAirQueue
$ns_ simplex-link $eNB $node_($i) 1000Mb 2ms LTEQueue/DLAirQueue
}

$ns_ simplex-link $eNB $aGW 5000Mb 10ms LTEQueue/ULS1Queue
$ns_ simplex-link $aGW $eNB 5000Mb 10ms LTEQueue/DLS1Queue


# The bandwidth between aGW and server is not the bottleneck.
$ns_ duplex-link $server $aGW 1Gb 2ms DropTail

# step 3.4 define the background traffic
# no parameters to be configured by FTP
# we can configue TCP and TCPSink parameters here.
set tcp1 [new Agent/TCP/Linux]
$tcp1 set timestamps_ true
$tcp1 set fid_ 1
$ns_ attach-agent $server $tcp1
set sink1 [new Agent/TCPSink/Sack1]
$ns_ attach-agent $node_(1) $sink1
$ns_ connect $sink1 $tcp1
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1
$ftp1 set type_ FTP

set tcp2 [new Agent/TCP/Linux]
$tcp2 set timestamps_ true
$tcp2 set fid_ 1
$ns_ attach-agent $server $tcp2
set sink2 [new Agent/TCPSink/Sack1]
$ns_ attach-agent $node_(2) $sink2
$ns_ connect $sink2 $tcp2
set ftp2 [new Application/FTP]
$ftp2 attach-agent $tcp2
$ftp2 set type_ FTP

set tcp3 [new Agent/TCP/Linux]
$tcp3 set timestamps_ true
$tcp3 set fid_ 1
$ns_ attach-agent $server $tcp3
set sink3 [new Agent/TCPSink/Sack1]
$ns_ attach-agent $node_(3) $sink3
$ns_ connect $sink3 $tcp3
set ftp3 [new Application/FTP]
$ftp3 attach-agent $tcp3
$ftp3 set type_ FTP

set tcp4 [new Agent/TCP/Linux]
$tcp4 set timestamps_ true
$tcp4 set fid_ 1
$ns_ attach-agent $server $tcp4
set sink4 [new Agent/TCPSink/Sack1]
$ns_ attach-agent $node_(4) $sink4
$ns_ connect $sink4 $tcp4
set ftp4 [new Application/FTP]
$ftp4 attach-agent $tcp4
$ftp4 set type_ FTP


#loss module
set loss_module1 [new ErrorModel]
$loss_module1 set rate_ 0.02
$loss_module1 ranvar [new RandomVariable/Uniform]
$loss_module1 drop-target [new Agent/Null]
$ns_ lossmodel $loss_module1 $eNB $node_(1)

set loss_module2 [new ErrorModel]
$loss_module2 set rate_ 0.02
$loss_module2 ranvar [new RandomVariable/Uniform]
$loss_module2 drop-target [new Agent/Null]
$ns_ lossmodel $loss_module2 $eNB $node_(2)

set loss_module3 [new ErrorModel]
$loss_module3 set rate_ 0.02
$loss_module3 ranvar [new RandomVariable/Uniform]
$loss_module3 drop-target [new Agent/Null]
$ns_ lossmodel $loss_module3 $eNB $node_(3)

set loss_module4 [new ErrorModel]
$loss_module4 set rate_ 0.02
$loss_module4 ranvar [new RandomVariable/Uniform]
$loss_module4 drop-target [new Agent/Null]
$ns_ lossmodel $loss_module4 $eNB $node_(4)


set loss_module6 [new ErrorModel]
$loss_module6 set rate_ 0.0002
$loss_module6 ranvar [new RandomVariable/Uniform]
$loss_module6 drop-target [new Agent/Null]
$ns_ lossmodel $loss_module6 $aGW $eNB

set loss_module7 [new ErrorModel]
$loss_module7 set rate_ 0.00002
$loss_module7 ranvar [new RandomVariable/Uniform]
$loss_module7 drop-target [new Agent/Null]
$ns_ lossmodel $loss_module7 $server $aGW

$ns_ at 0 "$tcp1 select_ca bic"
$ns_ at 0 "$tcp2 select_ca bic"
$ns_ at 0 "$tcp3 select_ca bic"
$ns_ at 0 "$tcp4 select_ca bic"

$ns_ at 1.0 "$ftp1 start"
$ns_ at 30 "$ftp1 stop"
$ns_ at 2.0 "$ftp2 start"
$ns_ at 30 "$ftp2 stop"
$ns_ at 3.0 "$ftp3 start"
$ns_ at 30 "$ftp3 stop"
$ns_ at 4.0 "$ftp4 start"
$ns_ at 30 "$ftp4 stop"



# finish tracing
$ns_ at 30 "finish"
proc finish {} {
#global ns_ f log
global ns_ nf f
$ns_ flush-trace
close $f
close $nf
puts "running nam..."
exec nam t-down-th.nam &
exit 0
}

# Finally, start the simulation.
$ns_ run

---------------------------------------------------

error

cmd select_ca bic
cmd select_ca bic
cmd select_ca bic
cmd select_ca bic
ns: _o22 setdest 6999.402400971616 400.000001 0.6:
(_o22 cmd line 1)
invoked from within
"_o22 cmd setdest 6999.402400971616 400.000001 0.6"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o22" line 2)
(SplitObject unknown line 2)
invoked from within

Last edited by mudyalawi; 10-26-2016 at 06:28 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extensions Wimax et LTE sous ns2.33 ou ns2.31 nassou19891 Linux - General 58 10-21-2014 10:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration