LinuxQuestions.org
Help answer threads with 0 replies.
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 09-02-2014, 07:36 AM   #1
pon
Member
 
Registered: Aug 2014
Posts: 77

Rep: Reputation: Disabled
Smile How to set different energy levels to different nodes in ns2


Hi all,

I used following part of code to set energy of the node in ns2.

Code:
# Define options
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(ll)             LL                         ;# link layer type
set val(ant)            Antenna/OmniAntenna        ;# antenna model
set val(ifqlen)         50                         ;# max packet in ifq
set val(nn)             8                          ;# number of mobilenodes
set val(rp)             AODV                       ;# routing protocol
set val(x)              500                        ;# X dimension of topography
set val(y)              400                        ;# Y dimension of topography
set val(energymodel)    EnergyModel                ;# Energy Model
set val(initialenergy)  77                        ;# Value
set val(stop)           150                        ;# time of simulation end

...
...

  $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 OFF \
             -energyModel $val(energymodel) \
             -initialEnergy $val(initialenergy) \
             -rxPower 35.28e-3 \
             -txPower 31.32e-3 \
             -idlePower 712e-6 \
             -sleepPower 144e-9

but above codes sets uniform energy to all nodes.how could i set different energy levels to each nodes?

Thanks

Pon
 
  


Reply

Tags
energy, ns2


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
How to set the transmitting power of wireless nodes in ns2 pon Linux - Newbie 0 08-14-2014 01:44 PM
Optimizing nodes energy consumption for Mobile Ad Hoc Networks (MANET) Using Fuzzy lo must Linux - Wireless Networking 0 03-06-2014 06:45 PM
how to set different energy level to different nodes in ns2 Aska123 Linux - Software 0 02-17-2014 02:44 PM
Energy.awk required to compute remaing energy of nodes. Aska123 Linux - Wireless Networking 2 02-02-2014 02:31 AM
To set anchor nodes in NS2 arthidurai Linux - Newbie 2 10-30-2010 10:26 AM


All times are GMT -5. The time now is 12:41 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