20 #ifndef LI_ION_ENERGY_SOURCE_H
21 #define LI_ION_ENERGY_SOURCE_H
25 #include "ns3/deprecated.h"
26 #include "ns3/event-id.h"
27 #include "ns3/nstime.h"
28 #include "ns3/traced-value.h"
An identifier for simulation events.
Model a generic Lithium Ion Battery basing on [1][2].
void DoDispose() override
All child's implementation must call BreakDeviceEnergyModelRefCycle to ensure reference cycles to Dev...
void UpdateEnergySource() override
Implements UpdateEnergySource.
double m_drainedCapacity
capacity drained from the cell, in Ah
void SetInitialEnergy(double initialEnergyJ)
double m_minVoltTh
minimum threshold voltage to consider the battery depleted
virtual void IncreaseRemainingEnergy(double energyJ)
void DoInitialize() override
Initialize() implementation.
double m_supplyVoltageV
actual voltage of the cell
TracedValue< double > m_remainingEnergyJ
remaining energy, in Joules
double m_initialEnergyJ
initial energy, in Joules
double GetRemainingEnergy() override
double m_eFull
initial voltage of the cell, in Volts
void SetEnergyUpdateInterval(Time interval)
double m_internalResistance
internal resistance of the cell, in Ohms
Time m_energyUpdateInterval
energy update interval
~LiIonEnergySource() override
void SetInitialSupplyVoltage(double supplyVoltageV)
double m_eNom
nominal voltage of the cell, in Volts
double m_lowBatteryTh
low battery threshold, as a fraction of the initial energy
double m_eExp
cell voltage at the end of the exponential zone, in Volts
EventId m_energyUpdateEvent
energy update event
double GetEnergyFraction() override
Time GetEnergyUpdateInterval() const
void CalculateRemainingEnergy()
Calculates remaining energy.
double GetInitialEnergy() const override
static TypeId GetTypeId()
Get the type ID.
double m_qNom
cell capacity at the end of the nominal zone, in Ah
double m_qExp
capacity value at the end of the exponential zone, in Ah
double GetVoltage(double current) const
Get the cell voltage in function of the discharge current.
double m_qRated
rated capacity of the cell, in Ah
double GetSupplyVoltage() const override
virtual void DecreaseRemainingEnergy(double energyJ)
double m_typCurrent
typical discharge current used to fit the curves
void HandleEnergyDrainedEvent()
Handles the remaining energy going to zero event.
Time m_lastUpdateTime
last update time
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
#define NS_DEPRECATED_3_40(msg)
Tag for things deprecated in version ns-3.40.
Every class exported by the ns3 library is enclosed in the ns3 namespace.