INET Framework for OMNeT++/OMNEST
|
This class implements a simple total power integrating energy storage. More...
#include <SimpleEpEnergyStorage.h>
Public Member Functions | |
virtual | ~SimpleEpEnergyStorage () |
virtual J | getNominalEnergyCapacity () const override |
Returns the nominal energy capacity in the range [0, +infinity]. More... | |
virtual J | getResidualEnergyCapacity () const override |
Returns the residual energy capacity in the range [0, nominalCapacity]. More... | |
Public Member Functions inherited from inet::power::EpEnergyStorageBase | |
virtual void | addEnergyConsumer (const IEnergyConsumer *energyConsumer) override |
Adds a new energy consumer to the energy source. More... | |
virtual void | removeEnergyConsumer (const IEnergyConsumer *energyConsumer) override |
Removes a previously added energy consumer from this energy source. More... | |
virtual void | addEnergyGenerator (const IEnergyGenerator *energyGenerator) override |
Adds a new energy generator to the energy sink. More... | |
virtual void | removeEnergyGenerator (const IEnergyGenerator *energyGenerator) override |
Removes a previously added energy generator from this energy sink. More... | |
virtual void | receiveSignal (cComponent *source, simsignal_t signal, double value, cObject *details) override |
Public Member Functions inherited from inet::power::EpEnergySourceBase | |
virtual W | getTotalPowerConsumption () const override |
Returns the total power consumption in the range [0, +infinity). More... | |
Public Member Functions inherited from inet::power::EnergySourceBase | |
virtual int | getNumEnergyConsumers () const override |
Returns the number of energy consumers in the range [0, +infinity). More... | |
virtual const IEnergyConsumer * | getEnergyConsumer (int index) const override |
Returns the energy consumer for the provided index. More... | |
Public Member Functions inherited from inet::power::IEnergySource | |
virtual | ~IEnergySource () |
Public Member Functions inherited from inet::power::EpEnergySinkBase | |
virtual W | getTotalPowerGeneration () const override |
Returns the total power generation in the range [0, +infinity). More... | |
Public Member Functions inherited from inet::power::EnergySinkBase | |
virtual int | getNumEnergyGenerators () const override |
Returns the number of energy generators in the range [0, +infinity). More... | |
virtual const IEnergyGenerator * | getEnergyGenerator (int index) const override |
Returns the energy generator for the provided index. More... | |
Public Member Functions inherited from inet::power::IEnergySink | |
virtual | ~IEnergySink () |
Protected Member Functions | |
virtual void | initialize (int stage) override |
virtual void | handleMessage (cMessage *message) override |
virtual void | updateTotalPowerConsumption () override |
virtual void | updateTotalPowerGeneration () override |
virtual void | executeNodeOperation (J newResidualCapacity) |
virtual void | setResidualCapacity (J newResidualCapacity) |
virtual void | updateResidualCapacity () |
virtual void | scheduleTimer () |
Protected Member Functions inherited from inet::power::EpEnergyStorageBase | |
void | initialize (int stage) override |
Protected Member Functions inherited from inet::power::EpEnergySourceBase | |
virtual W | computeTotalPowerConsumption () const |
Protected Member Functions inherited from inet::power::EpEnergySinkBase | |
virtual W | computeTotalPowerGeneration () const |
Protected Attributes | |
J | nominalCapacity = J(NaN) |
The nominal capacity is in the range [0, +infinity). More... | |
J | residualCapacity = J(NaN) |
The residual capacity is in the range [0, nominalCapacity]. More... | |
J | printCapacityStep = J(NaN) |
Specifies the amount of capacity change which will be reported. More... | |
simtime_t | lastResidualCapacityUpdate = -1 |
The simulation time when the residual capacity was last updated. More... | |
cMessage * | timer = nullptr |
The timer that is scheduled to the earliest time when the energy storage will be depleted, the energy storage will be charged. More... | |
J | targetCapacity = J(NaN) |
The capacity that will be set when the timer expires. More... | |
LifecycleController * | lifecycleController = nullptr |
The lifecycle controller used to shutdown and start the node. More... | |
cModule * | networkNode = nullptr |
The containing node module. More... | |
NodeStatus * | nodeStatus = nullptr |
The status of the node. More... | |
Protected Attributes inherited from inet::power::EpEnergySourceBase | |
W | totalPowerConsumption = W(NaN) |
Protected Attributes inherited from inet::power::EnergySourceBase | |
std::vector< const IEnergyConsumer * > | energyConsumers |
Protected Attributes inherited from inet::power::EpEnergySinkBase | |
W | totalPowerGeneration = W(NaN) |
Protected Attributes inherited from inet::power::EnergySinkBase | |
std::vector< const IEnergyGenerator * > | energyGenerators |
Additional Inherited Members | |
Static Public Attributes inherited from inet::power::IEpEnergySource | |
static simsignal_t | powerConsumptionChangedSignal = cComponent::registerSignal("powerConsumptionChanged") |
The signal that is used to publish power consumption changes. More... | |
Static Public Attributes inherited from inet::power::IEpEnergySink | |
static simsignal_t | powerGenerationChangedSignal = cComponent::registerSignal("powerGenerationChanged") |
The signal that is used to publish power generation changes. More... | |
Static Public Attributes inherited from inet::power::IEpEnergyStorage | |
static simsignal_t | residualEnergyCapacityChangedSignal = cComponent::registerSignal("residualEnergyCapacityChanged") |
The signal that is used to publish residual energy capacity changes also including when the energy storage becomes completely depleted or charged. More... | |
This class implements a simple total power integrating energy storage.
It maintains its residual capacity by repeatedly scheduling a single timer to the next capacity update. The next update happens when either the storage becomes completely depleted, completely charged, or the next capacity report is done. Besides, it immediately updates the capacity when the total absorbed or provided power changes, and it also reschedules the timer.
See the corresponding NED file for more details.
|
virtual |
|
protectedvirtual |
Referenced by setResidualCapacity().
|
inlineoverridevirtual |
Returns the nominal energy capacity in the range [0, +infinity].
It specifies the maximum amount of energy that the energy storage can contain.
Implements inet::power::IEpEnergyStorage.
|
overridevirtual |
Returns the residual energy capacity in the range [0, nominalCapacity].
It specifies the amount of energy that the energy storage contains at the moment.
Implements inet::power::IEpEnergyStorage.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
protectedvirtual |
Referenced by handleMessage(), initialize(), updateTotalPowerConsumption(), and updateTotalPowerGeneration().
|
protectedvirtual |
Referenced by handleMessage(), initialize(), and updateResidualCapacity().
|
protectedvirtual |
Referenced by getResidualEnergyCapacity(), updateTotalPowerConsumption(), and updateTotalPowerGeneration().
|
overrideprotectedvirtual |
Reimplemented from inet::power::EpEnergyStorageBase.
|
overrideprotectedvirtual |
Reimplemented from inet::power::EpEnergyStorageBase.
|
protected |
The simulation time when the residual capacity was last updated.
Referenced by setResidualCapacity(), and updateResidualCapacity().
|
protected |
The lifecycle controller used to shutdown and start the node.
Referenced by executeNodeOperation(), and initialize().
|
protected |
The containing node module.
Referenced by executeNodeOperation(), initialize(), and setResidualCapacity().
|
protected |
The status of the node.
Referenced by executeNodeOperation(), and initialize().
The nominal capacity is in the range [0, +infinity).
Referenced by handleMessage(), initialize(), scheduleTimer(), setResidualCapacity(), and updateResidualCapacity().
Specifies the amount of capacity change which will be reported.
Referenced by initialize(), and scheduleTimer().
The residual capacity is in the range [0, nominalCapacity].
Referenced by getResidualEnergyCapacity(), handleMessage(), initialize(), scheduleTimer(), setResidualCapacity(), and updateResidualCapacity().
The capacity that will be set when the timer expires.
Referenced by handleMessage(), and scheduleTimer().
|
protected |
The timer that is scheduled to the earliest time when the energy storage will be depleted, the energy storage will be charged.
Referenced by handleMessage(), initialize(), scheduleTimer(), and ~SimpleEpEnergyStorage().