83 J targetCapacity =
J(
NaN);
86 if (totalPower >
W(0)) {
91 else if (totalPower <
W(0)) {
97 simtime_t remainingTime =
unit((targetCapacity - estimatedResidualCapacity) / totalPower /
s(1)).get();
101 if (remainingTime > 0)
const value_type & get() const
Definition: Units.h:89
NodeStatus * nodeStatus
Definition: SimpleEpEnergyManagement.h:41
compose< J, pow< s,-1 > > W
Definition: Units.h:770
#define NaN
Definition: INETMath.h:103
J nodeShutdownCapacity
Definition: SimpleEpEnergyManagement.h:34
virtual W getTotalPowerGeneration() const =0
Returns the total power generation in the range [0, +infinity).
virtual J getEstimatedEnergyCapacity() const override
Returns the estimated energy capacity in the range [0, +infinity).
Definition: SimpleEpEnergyManagement.cc:105
pow< internal::none, 0 > unit
Definition: Units.h:60
cMessage * lifecycleOperationTimer
Definition: SimpleEpEnergyManagement.h:42
value< double, units::s > s
Definition: Units.h:1049
IEpEnergyStorage * energyStorage
Definition: SimpleEpEnergyManagement.h:36
compose< N, m > J
Definition: Units.h:769
J nodeStartCapacity
Definition: SimpleEpEnergyManagement.h:35
Definition: NodeStatus.h:40
virtual W getTotalPowerConsumption() const =0
Returns the total power consumption in the range [0, +infinity).
virtual State getState() const
Definition: NodeStatus.h:48
Definition: NodeStatus.h:40