By enabling energy model in node configuration of a wireless node, we get more accurate results.By default node configuration, the energy on node is infinite i.e there is no energy log will be carried out.
NODE CONFIGURATION WITHOUT ENERGY MODEL
$ns node-config -addressType hierarchical \
-adhocRouting AODV \
-llType LL \
-macType Mac/802_11 \
-ifqType Queue/DropTail/PriQueue \
-ifqLen 50 \
-antType Antenna/OmniAntenna \
-propType Propagation/TwoRayGround \
-phyType Phy/WirelessPhy \
-topologyInstance $topo \
-channel Channel/WirelessChannel \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace OFF
NODE CONFIGURATION WITH ENERGY MODEL
$ns node-config -addressType hierarchical \
-adhocRouting AODV \
-llType LL \
-macType Mac/802_11 \
-ifqType Queue/DropTail/PriQueue \
-ifqLen 50 \
-antType Antenna/OmniAntenna \
-propType Propagation/TwoRayGround \
-phyType Phy/WirelessPhy \
-topologyInstance $topo \
-channel Channel/WirelessChannel \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace OFF \
-energyModel EnergyModel \
-initialEnergy 90 \
-txPower 0.5 \
-rxPower 0.3 \
-idlePower 0.05 \
-sleepPower 0.03 \
NOTE: initial energy is in Joule and all other energy parameters are in Watts.
how can we use variable transmission power which depends on the transmission distance?
ReplyDeleteyou can simply change the transmission power from the tcl script itself
Deletehow to print residual energy of all the nodes in aodv ?
ReplyDeleteyou can use awk script or perl script for thal
DeleteI followed the code that u type it above, but i got errors
ReplyDeletenum_nodes is set 8
can't read "ns": no such variable
while executing
"$ns node-config -addressType hierarchical \
-adhocRouting AODV \
-llType LL \
..."
(file "mscproject.tcl" line 51)
how can i fixed this, and if this will give us the energy of the node after appling AWK or PERL script?
use ns always..may be u used ns_ instead of ns
Delete