LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to integrate the "Resource/Energy" leach class into NS-2.34? (https://www.linuxquestions.org/questions/linux-software-2/how-to-integrate-the-resource-energy-leach-class-into-ns-2-34-a-870368/)

shanky 04-27-2012 12:33 PM

Hi,

I have installed ns-2.34 on ubuntu and also followed the instructions to install leach on it.I have run simulations successfully to measure network lifetime, energy consumption for different number of nodes.I now want to change the cluster head probability and get the graph for this by changing the CH probabalilty.Where do i change this parameter in the code to get the desired results ??

Thanks
Regards
Shanky

deepa_2111 04-27-2012 11:27 PM

Shanky,

probability is given by (k/N) ... so changing these values gives you a different probability

shanky 04-28-2012 05:02 AM

Thanks deepa..I did figure it out eventually and changed the cluster heads and total nodes accordingly to get the desired results.. :)

Regards

ayaan 04-28-2012 05:26 AM

hi! i want to know what is the format of leach trace file i.e leach.tr

upk345 04-30-2012 12:01 AM

Hello every one,

I have followed many steps from this form and it was too helpful for me in running leach.
I'm using ubuntu platform and at last after completing all the process in the terminal I'm getting nothing to be done.

According to the older posts its not a prob. But, after running the leach_test in the simulation results the file leach.err contains a statement "./leach_test: line 37: ns: command not found"




Please do help me.


Thank you.

upk345 04-30-2012 12:49 AM

Please do help me plzzzzzzzzzzzzzzzzzzzzz

shailu 04-30-2012 12:49 AM

this is because u have not set path correctly i.e $PATH variable that is why operating system does not where to look for ns.

Go to the directory where ns2 is installed.
then type ls.If you see ns.exe, ns2 is installed properly and then do ./ns it will run properly.

engr 05-01-2012 10:51 PM

@ deepa thnx dear
but when ever i run ./leach_test it gives no results.
and in ./test file it is set that ./leach_test file will be running whenever ./test command wil be executed.
can u plz help me where can i deifne mobility for all the sensor nodes.
Regards


@Hi shanky..!
can you plz help me to generate graphs for leach protocol.
regards

upk345 05-01-2012 11:39 PM

@ shailu

Thank you for helping me. I got rid of that prob.
Now i would like to change the criteria for cluster head changing. So, can please help in finding where i have to change the codes so that it works as required for me....?

Plz Plz help me......!

shanky 05-02-2012 04:20 AM

@ engr
Hi
what i have done is ,i ran a lot of simulations changing parameters like number of nodes,number of cluster heads and then tabulated the results of network lifetime,energy consumed,data throughput,number of nodes alive.Using these results in word excel i got the graphs.
If in case you are aware of a better methodology to generate graphs please let me know.

Regards

upk345 05-02-2012 04:23 AM

@ shanky

Can you help in knowing how to change the criteria for cluster head changing. Please help me in finding where i have to change the codes so that it works as required for me....?

Plz Plz help me......!

shanky 05-02-2012 05:12 AM

go to leach_test code...in the code you will able to find number of cluster heads..that way you can change the parameter

upk345 05-02-2012 05:19 AM

@Shanky

Can you plz help me to know how to change the criteria for cluster head selection...?!

Plz.. Plz.....!

upk345 05-03-2012 03:16 AM

@Shanky

With that we can only change the no of clusters and all, but i want to change the way how the cluster head changes.....!

Plz do help.

Thank you

shanky 05-03-2012 06:12 AM

Hi,

I am not aware of the technique that allows to change the way the CH changes..
sry..ask around or start a new thread..

Regards


All times are GMT -5. The time now is 10:22 PM.