EpEnergyStorageBase

Package: inet.power.base

EpEnergyStorageBase

simple module

C++ definition

This is an abstract base module for power-based energy storage models. It defines shared signals and statistics.

<b>See also:</b> ~EpEnergyConsumerBase, ~EpEnergySourceBase, ~EpEnergyGeneratorBase, ~EpEnergySinkBase

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
IdealEpEnergyStorage simple module

This energy storage model stores an infinite amount of energy. It can provide energy for any number of consumers, and it can absorb energy from any number of generators. The ideal energy storage never gets completely charged or depleted. This module is primarily useful for testing energy consumer and energy generator models. See the base module for signals and statistics.

SimpleEpEnergyStorage simple module

This energy storage model maintains a residual energy capacity by integrating the difference between the total consumed power and the total generated power over time. It initiates node crash when the residual energy capacity reaches zero. This model does not have various properties such as self-discharge, memory effect, overcharging, temperature-dependence, etc. that real-world batteries have. See the base module for signals and statistics.

Extends

Name Type Description
SimpleModule simple module

Base module for all INET simple modules.

Parameters

Name Type Default value Description
displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

Properties

Name Value Description
class EpEnergyStorageBase
display i=block/plug

Signals

Name Type Unit Description
residualEnergyCapacityChanged
powerConsumptionChanged
powerGenerationChanged

Statistics

Name Title Source Record Unit Interpolation Mode Description
residualEnergyCapacity Residual energy capacity residualEnergyCapacityChanged vector, last J linear
powerConsumption Power consumption powerConsumptionChanged vector W sample-hold
powerGeneration Power generation powerGenerationChanged vector W sample-hold

Source code

//
// This is an abstract base module for power-based energy storage models.
// It defines shared signals and statistics.
//
// @see ~EpEnergyConsumerBase, ~EpEnergySourceBase, ~EpEnergyGeneratorBase, ~EpEnergySinkBase
//
simple EpEnergyStorageBase extends SimpleModule like IEpEnergyStorage
{
    parameters:
        @class(EpEnergyStorageBase);
        @display("i=block/plug");
        @signal[powerConsumptionChanged];
        @signal[powerGenerationChanged];
        @signal[residualEnergyCapacityChanged];
        @statistic[powerConsumption](title="Power consumption"; source=powerConsumptionChanged; record=vector; interpolationmode=sample-hold; unit=W);
        @statistic[powerGeneration](title="Power generation"; source=powerGenerationChanged; record=vector; interpolationmode=sample-hold; unit=W);
        @statistic[residualEnergyCapacity](title="Residual energy capacity"; source=residualEnergyCapacityChanged; record=vector,last; interpolationmode=linear; unit=J);
}

File: src/inet/power/base/EpEnergyStorageBase.ned