EpEnergyConsumerBase¶
Package: inet.power.base
simple module EpEnergyConsumerBase
This is an abstract base module for power-based energy consumer models. It defines shared signals and statistics.
See also: EpEnergySourceBase, EpEnergyGeneratorBase, EpEnergySinkBase, EpEnergyStorageBase
Inheritance diagram¶
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
simple module |
This energy consumer model alternates between two modes called consumption and sleep mode. In consumption mode, it consumes a randomly selected constant power for a random time interval. In sleep mode, it doesn’t consume energy for another random time interval. |
Extends¶
Name |
Type |
Description |
|---|---|---|
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 |
EpEnergyConsumerBase |
|
display |
i=block/plug |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
powerConsumptionChanged |
double |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
powerConsumption |
Power consumption |
powerConsumptionChanged |
vector |
W |
sample-hold |
Source code¶
//
// This is an abstract base module for power-based energy consumer models.
// It defines shared signals and statistics.
//
// @see ~EpEnergySourceBase, ~EpEnergyGeneratorBase, ~EpEnergySinkBase, ~EpEnergyStorageBase
//
simple EpEnergyConsumerBase extends SimpleModule like IEpEnergyConsumer
{
parameters:
@class(EpEnergyConsumerBase);
@display("i=block/plug");
@signal[powerConsumptionChanged](type=double);
@statistic[powerConsumption](title="Power consumption"; source=powerConsumptionChanged; record=vector; interpolationmode=sample-hold; unit=W);
}