More and more about NS-2

To set different initial energy to every node

# set initial energy for first node
$ns node-config -initialEnergy 50
set node_(0) [$ns node]

# set initial energy for second node
$ns node-config -initialEnergy 100
set node_(1) [$ns node]

# set initial energy for third node
$ns node-config -initialEnergy 70
set node_(2) [$ns node]

and similarly for more nodes...

10 comments:

hi my dear friend
i have many question in ns.


1) how i can simulate a webserver (how code or command or class & objects?)

2) how i can install gnuplot?
- how i can show the output analyze file, in gnuplot? (how code or command?)

3) if i use SCTP Protocol&Agent,how should i do? (how code or command?)


very thanks...
please help me
helot_of_god@yahoo.com

hai
i wanna code to set a bandwidth for each node.is it possible to set bandwidth for area.if possible pls help me...

Is it possible to set the energy level of a node again, apart from setting a global energy of all nodes in the beginning.? can v set reset the value of a node again? I want transfer energy from one node to other, how is it possible in ns2? pls help me.

Thanks
lillyevan.17@gmail.com

how to choose node which is having more energy in NS2

Hi..

How to set bandwidth.?

Hi

Can we set the queue length for each node.?

hi I followed what did u do for assigning different initial energy to nodes , but it doesnt work properly, I mean when I want to reach them from c++ code, it shows me 0 for all of the nodes!my c++ code to reach energy is :
for (int i=0; inodes(); i++)
{
node_a2 = (MobileNode*) Node::get_node_by_address(i);
if (node_a2->energy_model())
en = node_a2->energy_model()->energy();
cout<<"\tNode ID: "<<i<<"\t remaining energy : "<< en<<endl;
}

hi

how to find multiple path from source to destination in aodv and select best path at destination.

Hi,
Is it possible to use flow and queue monitor in ADHOC simulation if so please send me a sample tcl code .
My mail id mohanmecse2010@gmail.com

thanks dude it's very helpful to me

Post a Comment