21 #ifndef RV_BATTERY_MODEL_H
22 #define RV_BATTERY_MODEL_H
24 #include "ns3/traced-value.h"
25 #include "ns3/nstime.h"
26 #include "ns3/event-id.h"
double Discharge(double load, Time t)
Discharges the battery.
keep track of time values and allow control of global simulation resolution
void SetOpenCircuitVoltage(double voltage)
Sets open circuit voltage of battery.
Time m_samplingInterval
(1 / sampling interval) = sampling frequency
Time GetSamplingInterval(void) const
virtual double GetSupplyVoltage(void) const
Energy source base class.
double GetBeta(void) const
void SetBeta(double beta)
Sets the beta value for the battery model.
virtual ~RvBatteryModel()
virtual double GetInitialEnergy(void) const
void HandleEnergyDrainedEvent(void)
Handles the remaining energy going to zero event.
void SetNumOfTerms(int num)
Sets the number of terms of the infinite sum for estimating battery level.
double m_openCircuitVoltage
void SetCutoffVoltage(double voltage)
Sets cutoff voltage of battery.
double GetAlpha(void) const
virtual void DoInitialize(void)
Defined in ns3::Object.
Time GetLifetime(void) const
void SetSamplingInterval(Time interval)
std::vector< Time > m_timeStamps
virtual void DoDispose(void)
Defined in ns3::Object.
double RvModelAFunction(Time t, Time sk, Time sk_1, double beta)
RV model A function.
TracedValue< Time > m_lifetime
static TypeId GetTypeId(void)
an identifier for simulation events.
EventId m_currentSampleEvent
TracedValue< double > m_batteryLevel
Battery level is defined as: output of Discharge function / alpha value.
virtual double GetRemainingEnergy(void)
virtual void UpdateEnergySource(void)
Implements UpdateEnergySource.
double GetOpenCircuitVoltage(void) const
Rakhmatov Vrudhula non-linear battery model.
int GetNumOfTerms(void) const
std::vector< double > m_load
a unique identifier for an interface.
double GetCutoffVoltage(void) const
void SetAlpha(double alpha)
Sets the alpha value for the battery model.
virtual double GetEnergyFraction(void)
double GetBatteryLevel(void)