[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Energy per packet & other questions...



The Energy Model has the following function. What is
the parametr P_tx and what is energy lost per packet
transmission?

void EnergyModel::DecrTxEnergy(double txtime, double
P_tx) 
{
	double dEng = P_tx * txtime;
	if (energy_ <= dEng)
		energy_ = 0.0;
	else
		energy_ = energy_ - dEng;
	if (energy_ <= 0.0)
		God::instance()->ComputeRoute();
}

And secondly, in the test-suite-energy.tcl in
~ns/tcl/test, there are statements like:

set opt(energymodel)    EnergyModel     ;
set opt(initialenergy)  0.455               ;# Initial
energy in Joules

and:

-energyModel $opt(energymodel)

Are these enough to simulate the energy loss scenario?

Secondly how eneergy in joules is calculated?

Thirdly, which file in NS2 take the energy model
parametrs from the tcl file we write. Like the set
opt(energymodel) statemants above?

Thanks in advance,

Ahmad

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com