I am using Omnet++ and Inet 3.4.0 and I am trying to simulate power consumption and make the node dead after it's energy gets over. I tried IdealEnergySource model and SimpleEnergyStorage. but I could not figure out where to keep the parameter of the energy source. I tried in SimpleEnergyStorage.cc but could not find.
Than you in advance
The Wireless08
tutorial from INET
uses IdealEnergyStorage
which has an infinite amount of energy. Therefore in that case a node will never be dead.
To model a real consumption one can use SimpleEnergyStorage
. In Wireless08
section of omnetpp.ini
comment out the line:
#*.host*.energyStorageType = "IdealEnergyStorage"
and add the following lines:
**.host*.energyStorageType = "SimpleEnergyStorage"
**.host*.energyStorage.nominalCapacity = 0.10J
**.host*.energyStorage.initialCapacity = 0.09J
**.host*.energyStorage.nodeShutdownCapacity = 0J
**.host*.energyStorage.nodeStartCapacity = 0.01J
**.hasStatus = true
Moreover, edit WirelessB.ned
and add at the beginning:
import inet.common.lifecycle.LifecycleController;
and in submodules:
lifecycleController: LifecycleController;