[ns] Modification to the energy model in NS

2006-07-23 Thread Michael Siu
Hi, Im trying to implement an algorithm that uses BECA when a node has more than 50% of its initial energy and switches to AFECA when its energy falls below 50%. How can I make the function AdaptiveFidelityEntity::adapt_it() in energy-model.cc (shown below) be able to read the initial energy

[ns] energy level of mobile nodes

2006-07-21 Thread Michael Siu
Hi, Is there a way to show the energy of nodes in a trace file? I know a method to show the number of packets received and lost at a node can be done as below. Is there a similar method which can show the nodal energy? Thanks in advance, Michael set f1 [open node_received_1.tr w]

[ns] some tests failed while using "./validate"

2006-07-17 Thread Michael Siu
Hi I have installed ns 2.29 using cywgin on WINDOWS XP. I then added the paths using: export PATH=$PATH:/ns-allinone-2.29/bin:/ns-allinone-2.29/tcl8.4.11/unix:/ns-allinone-2.29/tk8.4.11/unix export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ns-allinone-2.29/otcl-1.11:/ns-allinone-2.29/lib export TCL_L

[ns] [NS] problem with the 'make' command

2006-07-16 Thread Michael Siu
Hi all, I am new to NS. I am running NS on cygwin on Windows XP. I was trying the 'make depend' and 'make' commands to see if they are working properly. I did not make any changes to any files after i installed NS. However, I received the errors shown below while i used the 'make' command: ucb;