Package: inet.power.generator
AlternatingEpEnergyGenerator
simple moduleThis energy generator model alternates between two modes called generation and sleep mode. In generation mode it generates a randomly selected constant power for a random time interval. In sleep mode it doesn't generate energy for another random time interval.
See also: AlternatingEpEnergyConsumer
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
Name | Type | Description |
---|---|---|
EpEnergyGeneratorBase | simple module |
This is an abstract base module for power based energy generator models. It defines shared signals and statistics. |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
energySinkModule | string | "^.energyStorage" |
module path of energy sink |
powerGeneration | double |
amount of power generated in generation mode |
|
generationInterval | double |
time interval for generation mode |
|
sleepInterval | double |
time interval for sleep mode |
Properties
Name | Value | Description |
---|---|---|
display | i=block/plug | |
class | AlternatingEpEnergyGenerator |
Signals
Name | Type | Unit |
---|---|---|
powerGenerationChanged |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
powerGeneration | Power generation | powerGenerationChanged | vector | W | sample-hold |
Scheduled messages (observed)
msg | kind | ctrl | tags | msgname | context |
---|---|---|---|---|---|
omnetpp::cMessage | 0 | timer |
Direct method calls (observed)
call to | function | info |
---|---|---|
SimpleEpEnergyStorage | inet::power::SimpleEpEnergyStorage::addEnergyGenerator | addEnergyGenerator |
SimpleEpEnergyStorage | inet::power::SimpleEpEnergyStorage::receiveSignal | powerGenerationChanged |
Source code
// // This energy generator model alternates between two modes called generation // and sleep mode. In generation mode it generates a randomly selected constant // power for a random time interval. In sleep mode it doesn't generate energy // for another random time interval. // // @see ~AlternatingEpEnergyConsumer // simple AlternatingEpEnergyGenerator extends EpEnergyGeneratorBase { parameters: string energySinkModule = default("^.energyStorage"); // module path of energy sink volatile double powerGeneration @unit(W); // amount of power generated in generation mode volatile double generationInterval @unit(s); // time interval for generation mode volatile double sleepInterval @unit(s); // time interval for sleep mode @class(AlternatingEpEnergyGenerator); }File: src/inet/power/generator/AlternatingEpEnergyGenerator.ned