计算功耗以查看节点是否死亡 [英] Calculate power consumption to see if the node dies

查看:85
本文介绍了计算功耗以查看节点是否死亡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Omnet ++和Inet 3.4.0,并且试图模拟功耗并在能量耗尽后使节点失效.我尝试了IdealEnergySource模型和SimpleEnergyStorage.但是我不知道在哪里保存能源参数.我在SimpleEnergyStorage.cc中尝试过,但找不到.

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.

比你提前

推荐答案

INET中的Wireless08教程使用了IdealEnergyStorage,它具有无限的能量.因此,在那种情况下,节点永远不会死.
要模拟实际消费量,可以使用SimpleEnergyStorage.在omnetpp.iniWireless08部分中,注释掉该行:

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"

并添加以下行:

**.host*.energyStorageType = "SimpleEnergyStorage"
**.host*.energyStorage.nominalCapacity = 0.10J
**.host*.energyStorage.initialCapacity = 0.09J
**.host*.energyStorage.nodeShutdownCapacity = 0J
**.host*.energyStorage.nodeStartCapacity = 0.01J
**.hasStatus = true

此外,编辑WirelessB.ned并在开头添加:

Moreover, edit WirelessB.ned and add at the beginning:

import inet.common.lifecycle.LifecycleController;

submodules:

lifecycleController: LifecycleController;

这篇关于计算功耗以查看节点是否死亡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆