LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-24-2017, 07:57 AM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641

Re #15.

The examples that will run with a contemporary 64bits OS are :

DSR-50nodes-2013.tcl
kal.tcl
wireless-mitf.tcl
wireless1-5.tcl
wireless1.tcl
wireless-simple-mac.tcl


Segmentation fault : All examples were OK with an older 32bits OS. No ``Segmentation fault´´.


-

Last edited by knudfl; 04-24-2017 at 10:34 AM.
 
1 members found this post helpful.
Old 04-26-2017, 01:13 AM   #17
israk
LQ Newbie
 
Registered: Apr 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
I am very thankful to you #knudfl
But what is the problem of my pc .I can't run anyone of these code you gave me .
When i tried to run following error appear:
Code:
sabin@sabin-desktop:~/Downloads/dsr-ex_04.17$ ns DSR-50nodes-2013.tcl
num_nodes is set 50
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
i: 0
INITIALIZE THE LIST xListHead
i: 1
i: 2
i: 3
i: 4
i: 5
i: 6
i: 7
i: 8
i: 9
i: 10
i: 11
i: 12
i: 13
i: 14
i: 15
i: 16
i: 17
i: 18
i: 19
i: 20
i: 21
i: 22
i: 23
i: 24
i: 25
i: 26
i: 27
i: 28
i: 29
i: 30
i: 31
i: 32
i: 33
i: 34
i: 35
i: 36
i: 37
i: 38
i: 39
i: 40
i: 41
i: 42
i: 43
i: 44
i: 45
i: 46
i: 47
i: 48
i: 49
Loading connection pattern...
couldn't read file "./cbr-25-conf": no such file or directory
    while executing
"source.orig ./cbr-25-conf"
    ("uplevel" body line 1)
    invoked from within
"uplevel source.orig[list $fileName]"
    invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
    (procedure "source" line 8)
    invoked from within
"source $val(cp)"
    (file "DSR-50nodes-2013.tcl" line 95)
Code:
sabin@sabin-desktop:~/Downloads/dsr-ex_04.17$ ns kal.tcl
num_nodes is set 100
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
loading connection pattern...
couldn't read file "./sak1": no such file or directory
    while executing
"source.orig ./sak1"
    ("uplevel" body line 1)
    invoked from within
"uplevel source.orig[list $fileName]"
    invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
    (procedure "source" line 8)
    invoked from within
"source $val(cp)"
    (file "kal.tcl" line 113)
sabin@sabin-desktop:~/Downloads/dsr-ex_04.17$
Please help me....i tried my best but i couldn't solve

Last edited by israk; 04-26-2017 at 09:12 AM.
 
Old 04-26-2017, 06:24 AM   #18
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #17 : Please edit to [code] tags : Your two blocks of code/output.

Quote:
sabin@sabin-desktop:~/Downloads/dsr-ex_04.17$ ns DSR-50nodes-2013.tcl
num_nodes is set 50
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
i: 0
INITIALIZE THE LIST xListHead
i: 1
i: 2
i: 3
.
..... ./cbr-25-conf": no such file or directory
Quote:
couldn't read file "./sak1": no such file or directory
tar xvf dsr-examples-04.17.tar.gz : You get a folder dsr-ex_04.17/ with 16 files.
cd dsr-ex_04.17/ && ns DSR-50nodes-2013.tcl : Is OK unless you removed the traffic/scenario files :
cbr-25-conf
cbr-3-test
sak
sak1
scen-25-conf1
scen-3-test

-

Last edited by knudfl; 04-26-2017 at 10:19 AM.
 
Old 04-26-2017, 09:57 AM   #19
israk
LQ Newbie
 
Registered: Apr 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank you ....
But after this tar xvf dsr-examples-04.2015.tar.gz command i get a fodler name"dsr-ex" with 13 files:
cbr-3-test , cbr-25-conf, dsr.tcl, DSR-50nodes-2013.tcl, kal.tcl, sak, sak1, scen-3-test, scen-25-conf1, wireless1.tcl, wireless1-5.tcl, wrls-dsr.tcl, wrls-dsr5.tcl
And after ns DSR-50nodes-2013.tcl i get following output:
Code:
sabin@sabin-desktop:~/Documents/dsr-ex$ ns DSR-50nodes-2013.tcl
num_nodes is set 50
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
i: 0
INITIALIZE THE LIST xListHead
i: 1
i: 2
i: 3
i: 4
i: 5
i: 6
i: 7
i: 8
i: 9
i: 10
i: 11
i: 12
i: 13
i: 14
i: 15
i: 16
i: 17
i: 18
i: 19
i: 20
i: 21
i: 22
i: 23
i: 24
i: 25
i: 26
i: 27
i: 28
i: 29
i: 30
i: 31
i: 32
i: 33
i: 34
i: 35
i: 36
i: 37
i: 38
i: 39
i: 40
i: 41
i: 42
i: 43
i: 44
i: 45
i: 46
i: 47
i: 48
i: 49
Loading connection pattern...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...
sabin@sabin-desktop:~/Documents/dsr-ex$
After this i get total 15 files .

It doesn't display nam windows and Nam console windows..I cant identify where is the error..please help me
 
Old 04-26-2017, 10:31 AM   #20
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #10

Sorry for the typo in #18. Has been edited to 'tar xvf dsr-examples-04.17.tar.gz ...'
https://drive.google.com/file/d/0B7S...ew?usp=sharing See #14.

Quote:
doesn't display nam window
Generally about simulation files :
Some files have a line 'exec nam file &', others don't.
Some have '# exec nam file &' : Uncomment the line, and test if nam will run the file.
Or run it manually : $ nam file.nam ..... if a nam output was created.

-
 
1 members found this post helpful.
Old 04-26-2017, 10:40 AM   #21
israk
LQ Newbie
 
Registered: Apr 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
i also tried to run following code but it gives error
Code:
set val(chan)           Channel/WirelessChannel    ;# channel type 
set val(prop)           Propagation/TwoRayGround   ;# radio-propagation model 
set val(netif)          Phy/WirelessPhy            ;# network interface type 
set val(mac)            Mac/802_11                 ;# MAC type 
#set val(ifq)            Queue/DropTail/PriQueue    ;# interface queue type 
#set val(ifq)            CMUPriQueue    ;    #This is the change for DSR       
set val(ll)             LL                         ;# link layer type 
set val(ant)            Antenna/OmniAntenna        ;# antenna model 
set val(ifqlen)         50                         ;# max packet in ifq 
set val(nn)             10                          ;# number of mobilenodes 
set val(rp)             DSR                     ;# routing protocol 
set val(x)              500   			   ;# X dimension of topography 
set val(y)              500   			   ;# Y dimension of topography   
set val(stop)		200			   ;# time of simulation end 

#this is the change for DSR
if { $val(rp) == "DSR" } {
set val(ifq) CMUPriQueue
} else {
set val(ifq) Queue/DropTail/PriQueue
}
#================================================================================
Queue set limit_  50


LL set mindelay_		50us
LL set delay_			25us
LL set bandwidth_		0	;# not used
LL set off_prune_		0	;# not used
LL set off_CtrMcast_		0	;# not used

Agent/Null set sport_		0
Agent/Null set dport_		0

Agent/CBR set sport_		0
Agent/CBR set dport_		0

Agent/TCPSink set sport_	0
Agent/TCPSink set dport_	0

Agent/TCP set sport_		0
Agent/TCP set dport_		0
Agent/TCP set packetSize_	512

Queue/DropTail/PriQueue set Prefer_Routing_Protocols    1

# unity gain, omni-directional antennas
# set up the antennas to be centered in the node and 1.5 meters above it
Antenna/OmniAntenna set X_ 0
Antenna/OmniAntenna set Y_ 0
Antenna/OmniAntenna set Z_ 1.5
Antenna/OmniAntenna set Gt_ 1.0
Antenna/OmniAntenna set Gr_ 1.0

# Initialize the SharedMedia interface with parameters to make
# it work like the 914MHz Lucent WaveLAN DSSS radio interface
Phy/WirelessPhy set CPThresh_ 10.0
Phy/WirelessPhy set CSThresh_ 1.559e-11
Phy/WirelessPhy set RXThresh_ 3.652e-10
Phy/WirelessPhy set Rb_ 2*1e6
Phy/WirelessPhy set Pt_ 0.2818
Phy/WirelessPhy set freq_ 914e+6 
Phy/WirelessPhy set L_ 1.0
#==================================================================================

set ns [new Simulator] 
$ns use-newtrace
set tracefd [open dsr.tr w] 
   
 
$ns trace-all $tracefd 
#$ns namtrace-all-wireless $namtrace $val(x) $val(y) 
 
 set nf [open out6.nam w]
$ns namtrace-all-wireless $nf $val(x) $val(y) 

#$ns namtrace-all $nf

proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec nam out6.nam 
exit 0
}
 
# set up topography object 
set topo [new Topography] 
 
$topo load_flatgrid $val(x) $val(y) 
 
set god_ [create-god $val(nn)] 
 


$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) \
			 -channelType $val(chan) \
			 -topoInstance $topo \
			 -agentTrace ON \
			 -routerTrace ON \
			 -macTrace OFF \
			 -movementTrace ON

			  
	for {set i 0} {$i < $val(nn) } { incr i } { 
		set node_($i) [$ns node]	 
	} 
 
# Provide initial location of mobilenodes 
#
# nodes: 10, pause: 2.00, max speed: 10.00, max x: 500.00, max y: 500.00
#
$node_(0) set X_ 230.458099147138
$node_(0) set Y_ 199.978104581927
$node_(0) set Z_ 0.000000000000
$node_(1) set X_ 249.761442525866
$node_(1) set Y_ 329.181336325062
$node_(1) set Z_ 0.000000000000
$node_(2) set X_ 354.684092284714
$node_(2) set Y_ 314.083348454287
$node_(2) set Z_ 0.000000000000
$node_(3) set X_ 31.274134527198
$node_(3) set Y_ 416.891035673519
$node_(3) set Z_ 0.000000000000
$node_(4) set X_ 201.659846921742
$node_(4) set Y_ 335.060794067719
$node_(4) set Z_ 0.000000000000
$node_(5) set X_ 441.872011266970
$node_(5) set Y_ 153.838035184497
$node_(5) set Z_ 0.000000000000
$node_(6) set X_ 125.845499610497
$node_(6) set Y_ 9.518591216734
$node_(6) set Z_ 0.000000000000
$node_(7) set X_ 455.849914885308
$node_(7) set Y_ 425.143852580786
$node_(7) set Z_ 0.000000000000
$node_(8) set X_ 107.906715349433
$node_(8) set Y_ 366.497006554012
$node_(8) set Z_ 0.000000000000
$node_(9) set X_ 372.772820651705
$node_(9) set Y_ 291.999735807987
$node_(9) set Z_ 0.000000000000
$god_ set-dist 0 1 1
$god_ set-dist 0 2 1
$god_ set-dist 0 3 2
$god_ set-dist 0 4 1
$god_ set-dist 0 5 1
$god_ set-dist 0 6 1
$god_ set-dist 0 7 2
$god_ set-dist 0 8 1
$god_ set-dist 0 9 1
$god_ set-dist 1 2 1
$god_ set-dist 1 3 1
$god_ set-dist 1 4 1
$god_ set-dist 1 5 2
$god_ set-dist 1 6 2
$god_ set-dist 1 7 1
$god_ set-dist 1 8 1
$god_ set-dist 1 9 1
$god_ set-dist 2 3 2
$god_ set-dist 2 4 1
$god_ set-dist 2 5 1
$god_ set-dist 2 6 2
$god_ set-dist 2 7 1
$god_ set-dist 2 8 2
$god_ set-dist 2 9 1
$god_ set-dist 3 4 1
$god_ set-dist 3 5 3
$god_ set-dist 3 6 3
$god_ set-dist 3 7 2
$god_ set-dist 3 8 1
$god_ set-dist 3 9 2
$god_ set-dist 4 5 2
$god_ set-dist 4 6 2
$god_ set-dist 4 7 2
$god_ set-dist 4 8 1
$god_ set-dist 4 9 1
$god_ set-dist 5 6 2
$god_ set-dist 5 7 2
$god_ set-dist 5 8 2
$god_ set-dist 5 9 1
$god_ set-dist 6 7 3
$god_ set-dist 6 8 2
$god_ set-dist 6 9 2
$god_ set-dist 7 8 2
$god_ set-dist 7 9 1
$god_ set-dist 8 9 2
$ns_ at 2.000000000000 "$node_(0) setdest 113.561924924348 380.474029490398 5.012234894686"
$ns_ at 2.000000000000 "$node_(1) setdest 226.942668600025 416.193239523143 8.239808486281"
$ns_ at 2.000000000000 "$node_(2) setdest 45.863534915171 398.899570100734 8.246285918920"
$ns_ at 2.000000000000 "$node_(3) setdest 296.143683976933 438.900817835557 8.967255229407"
$ns_ at 2.000000000000 "$node_(4) setdest 66.994012551092 278.791597459617 0.761636918974"
$ns_ at 2.000000000000 "$node_(5) setdest 430.400494724350 75.410724078638 9.732857268405"
$ns_ at 2.000000000000 "$node_(6) setdest 347.964190965647 316.394400971484 4.362064233820"
$ns_ at 2.000000000000 "$node_(7) setdest 245.368757177308 425.216835910711 3.176385346029"
$ns_ at 2.000000000000 "$node_(8) setdest 259.416390899245 263.317134759846 1.440425191449"
$ns_ at 2.000000000000 "$node_(9) setdest 77.252354488822 49.861937382092 1.346166296863"
$ns_ at 2.238600454126 "$god_ set-dist 2 8 1"
$ns_ at 6.407773518113 "$god_ set-dist 0 3 1"
$ns_ at 6.407773518113 "$god_ set-dist 3 5 2"
$ns_ at 6.407773518113 "$god_ set-dist 3 6 2"
$ns_ at 7.003427216796 "$god_ set-dist 2 5 2"
$ns_ at 7.435975009945 "$god_ set-dist 0 5 2"
$ns_ at 7.435975009945 "$god_ set-dist 3 5 3"
$ns_ at 7.435975009945 "$god_ set-dist 5 6 3"
$ns_ at 7.435975009945 "$god_ set-dist 5 8 3"
$ns_ at 7.455869251739 "$god_ set-dist 2 3 1"
$ns_ at 10.143737743753 "$node_(5) setdest 430.400494724350 75.410724078638 0.000000000000"
$ns_ at 10.899610693580 "$god_ set-dist 4 7 1"
$ns_ at 12.143737743753 "$node_(5) setdest 365.267898416082 162.012025760138 3.758699484591"
$ns_ at 12.917032083302 "$node_(1) setdest 226.942668600025 416.193239523143 0.000000000000"
$ns_ at 13.820198054819 "$god_ set-dist 5 8 2"
$ns_ at 13.820198054819 "$god_ set-dist 8 9 1"
$ns_ at 14.917032083302 "$node_(1) setdest 154.140740647277 174.968923766524 8.677142366032"
$ns_ at 15.973245097143 "$god_ set-dist 3 5 2"
$ns_ at 15.973245097143 "$god_ set-dist 3 9 1"
$ns_ at 16.413435143119 "$god_ set-dist 3 7 1"
$ns_ at 18.381350487206 "$god_ set-dist 5 6 1"
$ns_ at 21.804264291933 "$god_ set-dist 4 6 1"
$ns_ at 21.804264291933 "$god_ set-dist 6 7 2"
$ns_ at 24.079807344719 "$god_ set-dist 6 9 1"
$ns_ at 24.363326273085 "$god_ set-dist 1 6 1"
$ns_ at 25.172852210015 "$god_ set-dist 0 7 1"
$ns_ at 27.381095890208 "$god_ set-dist 7 8 1"
$ns_ at 27.953683799626 "$god_ set-dist 6 8 1"
$ns_ at 31.193283148042 "$god_ set-dist 1 5 1"
$ns_ at 31.639219521928 "$node_(3) setdest 296.143683976933 438.900817835557 0.000000000000"
$ns_ at 31.703855308475 "$god_ set-dist 2 9 2"
$ns_ at 32.315825316726 "$god_ set-dist 2 7 2"
$ns_ at 33.639219521928 "$node_(3) setdest 488.496969013328 245.729238635786 5.692964169229"
$ns_ at 35.426922185176 "$god_ set-dist 1 7 2"
$ns_ at 38.276329613589 "$god_ set-dist 2 3 2"
$ns_ at 38.784437342397 "$god_ set-dist 1 3 2"
$ns_ at 40.836397184144 "$node_(2) setdest 45.863534915171 398.899570100734 0.000000000000"
$ns_ at 40.973043461046 "$node_(5) setdest 365.267898416082 162.012025760138 0.000000000000"
$ns_ at 41.073600214663 "$god_ set-dist 3 5 1"
$ns_ at 42.836397184144 "$node_(2) setdest 240.698943162658 94.742856735018 9.960592922709"
$ns_ at 42.973043461046 "$node_(5) setdest 191.825072257690 417.829360209523 1.964677858318"
$ns_ at 43.551282473529 "$god_ set-dist 4 5 1"
$ns_ at 43.955487787410 "$node_(1) setdest 154.140740647277 174.968923766524 0.000000000000"
$ns_ at 44.584299641389 "$god_ set-dist 0 6 2"
$ns_ at 44.903616965502 "$node_(0) setdest 113.561924924348 380.474029490398 0.000000000000"
$ns_ at 45.453041721346 "$god_ set-dist 0 6 1"
$ns_ at 45.751740111792 "$god_ set-dist 3 6 1"
$ns_ at 45.955487787410 "$node_(1) setdest 20.418763218239 434.846110746262 8.651826840262"
$ns_ at 46.903616965502 "$node_(0) setdest 276.104678150679 270.942272817714 5.977054404381"
$ns_ at 47.359162927842 "$god_ set-dist 2 7 1"
$ns_ at 48.008451365368 "$god_ set-dist 2 6 1"
$ns_ at 48.968456467505 "$god_ set-dist 5 8 1"
$ns_ at 50.446950143240 "$god_ set-dist 6 7 1"
$ns_ at 50.474551767468 "$god_ set-dist 2 9 1"
$ns_ at 54.509369876780 "$god_ set-dist 1 7 1"
$ns_ at 56.586128792946 "$god_ set-dist 0 5 1"
$ns_ at 56.692178592167 "$god_ set-dist 2 5 1"
$ns_ at 56.803541764673 "$god_ set-dist 1 5 2"
$ns_ at 56.994062712831 "$god_ set-dist 5 7 1"
$ns_ at 61.853959710748 "$god_ set-dist 3 4 2"
$ns_ at 66.190770307152 "$god_ set-dist 1 9 2"
$ns_ at 68.065809892613 "$god_ set-dist 1 6 2"
$ns_ at 68.264368907395 "$node_(7) setdest 245.368757177308 425.216835910711 0.000000000000"
$ns_ at 68.602475930167 "$god_ set-dist 2 7 2"
$ns_ at 68.662775662111 "$god_ set-dist 3 8 2"
$ns_ at 70.264368907395 "$node_(7) setdest 200.410813718440 11.636943188609 6.923182273754"
$ns_ at 71.030042351737 "$god_ set-dist 1 2 2"
$ns_ at 74.541172195941 "$god_ set-dist 3 7 2"
$ns_ at 75.678908552504 "$god_ set-dist 0 1 2"
$ns_ at 75.678908552504 "$god_ set-dist 1 3 3"
$ns_ at 79.100230162000 "$node_(2) setdest 240.698943162658 94.742856735018 0.000000000000"
$ns_ at 79.696266416500 "$node_(0) setdest 276.104678150679 270.942272817714 0.000000000000"
$ns_ at 79.735995105771 "$node_(1) setdest 20.418763218239 434.846110746262 0.000000000000"
$ns_ at 81.100230162000 "$node_(2) setdest 384.921049364744 52.810063349198 5.283278585161"
$ns_ at 81.524267062779 "$node_(3) setdest 488.496969013328 245.729238635786 0.000000000000"
$ns_ at 81.696266416500 "$node_(0) setdest 258.497594335931 227.391816861345 9.456737166504"
$ns_ at 81.735995105771 "$node_(1) setdest 371.382772514507 20.446494862640 8.880333657635"
$ns_ at 82.227291269643 "$god_ set-dist 2 7 1"
$ns_ at 83.524267062779 "$node_(3) setdest 106.746579800567 7.390865017031 9.072763695646"
$ns_ at 84.799691924606 "$god_ set-dist 2 4 2"
$ns_ at 86.007347749395 "$god_ set-dist 1 3 2"
$ns_ at 86.007347749395 "$god_ set-dist 3 7 1"
$ns_ at 86.077668463964 "$god_ set-dist 2 3 1"
$ns_ at 86.663625634036 "$node_(0) setdest 258.497594335931 227.391816861345 0.000000000000"
$ns_ at 88.589683708940 "$god_ set-dist 3 8 1"
$ns_ at 88.663625634036 "$node_(0) setdest 228.164706485872 325.408836287688 7.524668370637"
$ns_ at 88.845682456311 "$node_(6) setdest 347.964190965647 316.394400971484 0.000000000000"
$ns_ at 89.007036426795 "$god_ set-dist 0 1 1"
$ns_ at 90.845682456311 "$node_(6) setdest 349.301343354089 158.466272861926 6.059078937464"
$ns_ at 91.981342722274 "$god_ set-dist 1 9 1"
$ns_ at 93.282189453789 "$god_ set-dist 1 5 1"
$ns_ at 96.279396756836 "$god_ set-dist 1 6 1"
$ns_ at 98.783925047944 "$god_ set-dist 0 2 2"
$ns_ at 101.251929662959 "$god_ set-dist 2 8 2"
$ns_ at 102.193088967194 "$god_ set-dist 1 3 1"
$ns_ at 102.299205590466 "$node_(0) setdest 228.164706485872 325.408836287688 0.000000000000"
$ns_ at 104.299205590466 "$node_(0) setdest 53.352551906679 183.071466763240 7.639719429207"
$ns_ at 106.245005462422 "$god_ set-dist 3 4 1"
$ns_ at 109.528497785644 "$node_(2) setdest 384.921049364744 52.810063349198 0.000000000000"
$ns_ at 111.324553936857 "$god_ set-dist 4 6 2"
$ns_ at 111.528497785644 "$node_(2) setdest 226.544921896733 403.524189007709 1.040146757465"
$ns_ at 113.001012877590 "$god_ set-dist 1 2 1"
$ns_ at 116.911325496558 "$node_(6) setdest 349.301343354089 158.466272861926 0.000000000000"
$ns_ at 118.911325496558 "$node_(6) setdest 416.505866132961 426.982145363532 5.732529627244"
$ns_ at 119.365114344371 "$god_ set-dist 2 8 1"
$ns_ at 121.781999508119 "$god_ set-dist 3 4 2"
$ns_ at 122.331871539839 "$god_ set-dist 2 5 2"
$ns_ at 122.427605729452 "$god_ set-dist 4 7 2"
$ns_ at 122.580929732787 "$god_ set-dist 3 5 2"
$ns_ at 124.163472273148 "$god_ set-dist 5 7 2"
$ns_ at 124.223348806923 "$god_ set-dist 0 6 2"
$ns_ at 125.861178527021 "$god_ set-dist 3 6 2"
$ns_ at 126.945433605630 "$god_ set-dist 3 8 2"
$ns_ at 128.307932367730 "$god_ set-dist 1 4 2"
$ns_ at 128.780529893172 "$god_ set-dist 6 7 2"
$ns_ at 129.105331893930 "$god_ set-dist 7 8 2"
$ns_ at 129.258594800506 "$node_(8) setdest 259.416390899245 263.317134759846 0.000000000000"
$ns_ at 129.901499377481 "$god_ set-dist 2 3 2"
$ns_ at 130.354694785179 "$node_(7) setdest 200.410813718440 11.636943188609 0.000000000000"
$ns_ at 130.825441879314 "$god_ set-dist 0 1 2"
$ns_ at 131.258594800506 "$node_(8) setdest 258.191758930657 232.405501264228 8.769708891422"
$ns_ at 132.246883069141 "$god_ set-dist 7 8 1"
$ns_ at 132.354694785179 "$node_(7) setdest 12.398316659697 493.011444585021 4.810270173600"
$ns_ at 133.127985983024 "$node_(3) setdest 106.746579800567 7.390865017031 0.000000000000"
$ns_ at 133.806987963031 "$node_(0) setdest 53.352551906680 183.071466763240 0.000000000000"
$ns_ at 134.786178509905 "$node_(8) setdest 258.191758930657 232.405501264228 0.000000000000"
$ns_ at 135.127985983024 "$node_(3) setdest 331.086138348541 217.131377468660 7.784960858820"
$ns_ at 135.425991083044 "$god_ set-dist 1 5 2"
$ns_ at 135.806987963031 "$node_(0) setdest 490.958411623572 362.808600409000 4.256760735392"
$ns_ at 136.786178509905 "$node_(8) setdest 215.614653855527 193.185174880204 4.459505055001"
$ns_ at 137.516017444030 "$god_ set-dist 3 8 1"
$ns_ at 138.946838571606 "$god_ set-dist 2 3 1"
$ns_ at 141.098092877777 "$god_ set-dist 1 6 2"
$ns_ at 142.454273210092 "$god_ set-dist 4 7 1"
$ns_ at 142.827796380296 "$god_ set-dist 3 4 1"
$ns_ at 142.887922220640 "$node_(1) setdest 371.382772514507 20.446494862640 0.000000000000"
$ns_ at 144.887922220640 "$node_(1) setdest 381.059656096718 454.046276267996 6.678949601301"
$ns_ at 149.767036437453 "$node_(8) setdest 215.614653855527 193.185174880204 0.000000000000"
$ns_ at 151.155848699284 "$god_ set-dist 3 5 1"
$ns_ at 151.409332184412 "$god_ set-dist 2 6 2"
$ns_ at 151.584676013452 "$god_ set-dist 6 9 2"
$ns_ at 151.767036437453 "$node_(8) setdest 229.063588926854 204.514778577507 0.662407362317"
$ns_ at 152.935420312189 "$god_ set-dist 5 7 1"
$ns_ at 156.070021061078 "$god_ set-dist 1 6 3"
$ns_ at 156.070021061078 "$god_ set-dist 2 6 3"
$ns_ at 156.070021061078 "$god_ set-dist 6 8 2"
$ns_ at 159.383231001941 "$god_ set-dist 0 1 1"
$ns_ at 159.537531635641 "$god_ set-dist 0 2 1"
$ns_ at 165.263265529924 "$god_ set-dist 1 5 1"
$ns_ at 165.263265529924 "$god_ set-dist 1 6 2"
$ns_ at 167.196843150832 "$node_(6) setdest 416.505866132961 426.982145363532 0.000000000000"
$ns_ at 168.851692650539 "$god_ set-dist 1 6 1"
$ns_ at 168.851692650539 "$god_ set-dist 2 6 2"
$ns_ at 169.196843150832 "$node_(6) setdest 390.723844121806 229.212053044724 3.654852407102"
$ns_ at 170.612446016674 "$god_ set-dist 3 6 1"
$ns_ at 172.453310574311 "$god_ set-dist 3 4 2"
$ns_ at 174.577703464411 "$node_(3) setdest 331.086138348541 217.131377468660 0.000000000000"
$ns_ at 174.613150573494 "$god_ set-dist 1 7 2"
$ns_ at 175.508348841760 "$god_ set-dist 2 7 2"
$ns_ at 176.577703464411 "$node_(3) setdest 446.812037713105 316.221474035193 4.722531836547"
$ns_ at 176.583942776355 "$god_ set-dist 0 6 1"
$ns_ at 178.314211268978 "$node_(8) setdest 229.063588926854 204.514778577507 0.000000000000"
$ns_ at 180.314211268978 "$node_(8) setdest 492.646238992554 412.146709912111 7.819444208044"
$ns_ at 181.031477100407 "$god_ set-dist 6 8 1"
$ns_ at 181.559969010225 "$god_ set-dist 5 9 2"
$ns_ at 184.429318277099 "$god_ set-dist 3 7 2"
$ns_ at 185.426889354599 "$god_ set-dist 1 9 2"
$ns_ at 185.764710729980 "$god_ set-dist 2 6 1"
$ns_ at 191.886491445872 "$god_ set-dist 3 9 2"
$ns_ at 193.625421989055 "$node_(4) setdest 66.994012551092 278.791597459617 0.000000000000"
$ns_ at 194.620865596447 "$god_ set-dist 4 8 2"
$ns_ at 195.625421989055 "$node_(4) setdest 152.643541281544 230.996835522200 0.369531248431"
$ns_ at 197.661807402845 "$god_ set-dist 7 8 2"
$ns_ at 197.798048786103 "$god_ set-dist 3 5 2"
$ns_ at 199.328978694236 "$god_ set-dist 1 2 2"
$ns_ at 199.489145410220 "$god_ set-dist 8 9 2"
#
# Destination Unreachables: 0
#
# Route Changes: 120
#
# Link Changes: 106
#
# Node | Route Changes | Link Changes
#    0 |            14 |           14
#    1 |            30 |           26
#    2 |            29 |           27
#    3 |            36 |           30
#    4 |            14 |           14
#    5 |            27 |           21
#    6 |            32 |           25
#    7 |            26 |           25
#    8 |            20 |           18
#    9 |            12 |           12
#
 
 
 
# Generation of movements 
#$ns at 10.0 "$node_(0) setdest 250.0 250.0 10.0" 
#$ns at 15.0 "$node_(1) setdest 45.0 285.0 10.0" 
#$ns at 110.0 "$node_(0) setdest 480.0 300.0 10.0"  
#$ns at 70.0 "$node_(3) setdest 180.0 30.0 10.0"  
 
# Set a TCP connection between node_(0) and node_(1) 
#
# nodes: 10, max conn: 10, send rate: 0.0, seed: 0
#
#
# 0 connecting to 1 at time 150.95099582846788
#
set tcp_(0) [$ns_ create-connection  TCP $node_(0) TCPSink $node_(1) 0]
$tcp_(0) set window_ 32
$tcp_(0) set packetSize_ 512
set ftp_(0) [$tcp_(0) attach-source FTP]
$ns_ at 150.95099582846788 "$ftp_(0) start"
#
# 1 connecting to 2 at time 55.757610404751084
#
set tcp_(1) [$ns_ create-connection  TCP $node_(1) TCPSink $node_(2) 0]
$tcp_(1) set window_ 32
$tcp_(1) set packetSize_ 512
set ftp_(1) [$tcp_(1) attach-source FTP]
$ns_ at 55.757610404751084 "$ftp_(1) start"
#
# 2 connecting to 3 at time 137.75441297225393
#
set tcp_(2) [$ns_ create-connection  TCP $node_(2) TCPSink $node_(3) 0]
$tcp_(2) set window_ 32
$tcp_(2) set packetSize_ 512
set ftp_(2) [$tcp_(2) attach-source FTP]
$ns_ at 137.75441297225393 "$ftp_(2) start"
#
# 4 connecting to 5 at time 11.758482294044683
#
set tcp_(3) [$ns_ create-connection  TCP $node_(4) TCPSink $node_(5) 0]
$tcp_(3) set window_ 32
$tcp_(3) set packetSize_ 512
set ftp_(3) [$tcp_(3) attach-source FTP]
$ns_ at 11.758482294044683 "$ftp_(3) start"
#
# 4 connecting to 6 at time 155.6568584570926
#
set tcp_(4) [$ns_ create-connection  TCP $node_(4) TCPSink $node_(6) 0]
$tcp_(4) set window_ 32
$tcp_(4) set packetSize_ 512
set ftp_(4) [$tcp_(4) attach-source FTP]
$ns_ at 155.6568584570926 "$ftp_(4) start"
#
# 7 connecting to 8 at time 57.100370422518054
#
set tcp_(5) [$ns_ create-connection  TCP $node_(7) TCPSink $node_(8) 0]
$tcp_(5) set window_ 32
$tcp_(5) set packetSize_ 512
set ftp_(5) [$tcp_(5) attach-source FTP]
$ns_ at 57.100370422518054 "$ftp_(5) start"
#
#Total sources/connections: 5/6
#

for {set i 0} {$i < 9 } { incr i } { 
    $ns at $val(stop) "$ftp_($i) stop"; 
}
#$ns at $val(stop) "$ftp stop" 

$ns at 201.0 "finish"

# Telling nodes when the simulation ends 
 
 
# ending nam and the simulation  
#$ns at $val(stop) "$ns nam-end-wireless $val(stop)" 
#$ns at $val(stop) "stop" 
#$ns at 150.01 "puts \"end simulation\" ; $ns halt" 

 
#Call the finish procedure after 5 seconds of simulation time 
$ns run
error is:
Code:
sabin@sabin-desktop:~/D$ ns DSR10.tcl
num_nodes is set 10
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
can't read "ns_": no such variable
    while executing
"$ns_ at 2.000000000000 "$node_(0) setdest 113.561924924348 380.474029490398 5.012234894686""
    (file "DSR10.tcl" line 195)
please help me
 
Old 04-26-2017, 10:57 AM   #22
israk
LQ Newbie
 
Registered: Apr 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
i am very grateful to you
Thank you very much # knudfl
i can run DSR-50nodes-2013.tcl
 
Old 04-26-2017, 12:30 PM   #23
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #21

I assume it can be ignored. Already answered in some above post.
 
  


Reply

Tags
dsdv, dsr, ns2



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
problem while run dymo tcl file on ns-2.34 in ubuntu15.10 israk Linux - Newbie 7 04-04-2017 08:37 AM
problem while run dymo tcl file on ns-2.34 in ubuntu15.10 israk Linux - Newbie 1 04-02-2017 02:20 PM
LEACH and dsdv in tcl file linuxUser123linux Linux - Software 1 03-05-2014 12:05 AM

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

All times are GMT -5. The time now is 12:52 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
Open Source Consulting | Domain Registration