19. Energy Model in ns

Energy Model, as implemented in ns, is a node attribute. The energy model represents level of energy in a mobile host. The energy model in a node has a initial value which is the level of energy the node has at the beginning of the simulation. This is known as initialEnergy_. It also has a given energy usage for every packet it transmits and receives. These are called txPower_ and rxPower_. The files where the energy model is defined are ns/energymodel[.cc and.h]. Other functions/methods described in this chapter may be found in  ns/wireless-phy.cc, ns/cmu-trace.cc, ns/tcl/lib[ns-lib.tcl, ns-node.tcl, ns-mobilenode.tcl].


Tom Henderson 2011-11-05