Hi Ahmed I will suggest you to create your own energy model. Although it is difficult but it will be more scalable and will fulfil your needs. To do that i will suggest you to create a variable in the Node Class per node by declaring it in Node.cc as energy variable and consume the energy as you want. For instance, if you want to consume some energy for all the nodes who sends a packet then firstly give some energy value to the nodes in the constructor or give random energy values per node. Then each and every node that will send the packet will consume Rtx energy for transmission of packet. In the same way, you can also incorporate energy consumption at the reception, overhearing, mac layer etc
I am suggesting this solution because the whole energy consumption module will be in your hand and you can easily make amendments as you want in your energy module. thanks Regards Mubashir Husain Rehmani Lip6, UPMC, Paris, France 2008/11/17 Ahmed Ayadi <[EMAIL PROTECTED]> > > Hi, > > I'm new with ns-2. I'm working on energy-efficient routing protocols for > wireless sensor network. > I'm using Energy model in my simulation. > I have configured all node like that : > > $ns_ node-config -adhocRouting $val(rp) \ > -llType $val(ll) \ > -macType $val(mac) \ > -ifqType $val(ifq) \ > -ifqLen $val(ifqlen) \ > -antType $val(ant) \ > -propType $val(prop) \ > -phyType $val(netif) \ > -channelType $val(chan) \ > -topoInstance $topo \ > -agentTrace ON \ > -routerTrace ON \ > -macTrace OFF \ > -movementTrace OFF \ > -energyModel $val(energymodel) \ > -idlePower $val(ip) \ > -rxPower $val(rxPower) \ > -txPower $val(txPower) \ > -sleepPower $val(sleeppower)\ > -transitionPower $val(tp) \ > -transitionTime $val(tt)\ > -initialEnergy $val(initialenergy)\ > > > However, all the node have the same value of initial energy. > How can I change that so I can give more easy to a sensor node more than an > other. > > Cordialement / Best regards > -- > Ahmed > -- Mubashir Husain Rehmani
