Hi all ,
I am new to NS-2(im using ns-2.28 an ns.2.30).I am trying to include Ricean
propagation model
with the following steps:
1-Copy the two files under ns-src(prop-ricean.cc,prop-ricean.h) into my NS
source directory
2-edit Makefile.in in my NS source directory and i added the
mobile/prop_ricean.o \ to OBJ_CC
3-Run configure
4. make clean
5. make
but when I am trying to test the Ricean propagation model using the following
code I got the
following error:
num_nodes is set 10
invalid command name "Propagation/Ricean"
while executing
"Propagation/Ricean create _o13 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $propType_"
(procedure "_o3" line 29)
(Simulator node-config line 29)
invoked from within
Here is the code portion related to the error:
/**************************************************************
set val(chan) Channel/WirelessChannel ;#Channel Type
set prop [new Propagation/Ricean]
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(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) 1000
set val(y) 1000
# 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 works 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
# Initialize Global Variables
#Create simulator instance
set ns_ [new Simulator]
set tracefd [open hybridrice2.tr w]
#simulator object ns_ to writes all sim data into this tr file
$ns_ trace-all $tracefd
set namtrace [open hybridrice2.nam w]
$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
set god_ [create-god $val(nn)]
set chan_1_ [new $val(chan)]
# configure node, please note the change below.
$ns_ node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-propInstance $prop \
-antType $val(ant) \
-phyType $val(netif) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace OFF \
-channel $chan_1_
#$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) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \
-macTrace ON \
-movementTrace OFF \
-channel $chan_1_
set prop_inst [$ns_ set propInstance_]
$prop_inst MaxVelocity 2.5 ;
$prop_inst RiceanK 6 ;
$prop_inst LoadRiceFile "rice_table.txt" ;
How can I solve such error
Please if u can help me
thank you
Ibrahim Khider Eltahir Khider
Communication Software and Switch Technology Research Center
Dept of Electronic and Information Systems
Huazhong University of Science and Technology
,P.R.China-Wuhan-430074
Mobile: 0086-27-63452269
Home Tel: 0086-27-87540211
---------------------------------
Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.