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"
Introspection did not find any typical Config paths.
An identifier for simulation events.
Rakhmatov Vrudhula non-linear battery model.
double m_lowBatteryTh
low battery threshold, as a fraction of the initial energy
int GetNumOfTerms(void) const
double m_openCircuitVoltage
Open circuit voltage (in Volts)
virtual double GetSupplyVoltage(void) const
void SetNumOfTerms(int num)
Sets the number of terms of the infinite sum for estimating battery level.
virtual void DoInitialize(void)
Defined in ns3::Object.
double m_cutoffVoltage
Cutoff voltage (in Volts)
virtual double GetEnergyFraction(void)
Time GetSamplingInterval(void) const
EventId m_currentSampleEvent
Current sample event.
static TypeId GetTypeId(void)
Get the type ID.
double GetAlpha(void) const
void SetSamplingInterval(Time interval)
Time m_lastSampleTime
Last sample time.
virtual double GetInitialEnergy(void) const
double m_previousLoad
load value (total current) of previous sampling
std::vector< Time > m_timeStamps
time stamps of load profile
int m_numOfTerms
Number# of terms for infinite sum in battery level estimation.
double GetCutoffVoltage(void) const
double Discharge(double load, Time t)
Discharges the battery.
void SetCutoffVoltage(double voltage)
Sets cutoff voltage of battery.
virtual double GetRemainingEnergy(void)
void SetBeta(double beta)
Sets the beta value for the battery model.
Time GetLifetime(void) const
virtual void DoDispose(void)
Defined in ns3::Object.
std::vector< double > m_load
load profile
TracedValue< Time > m_lifetime
time of death of the battery
Time m_samplingInterval
Sampling interval.
void SetOpenCircuitVoltage(double voltage)
Sets open circuit voltage of battery.
double RvModelAFunction(Time t, Time sk, Time sk_1, double beta)
RV model A function.
void SetAlpha(double alpha)
Sets the alpha value for the battery model.
double GetOpenCircuitVoltage(void) const
virtual void UpdateEnergySource(void)
Implements UpdateEnergySource.
void HandleEnergyDrainedEvent(void)
Handles the remaining energy going to zero event.
virtual ~RvBatteryModel()
double GetBeta(void) const
double m_alpha
alpha value of RV model, in Coulomb
double GetBatteryLevel(void)
TracedValue< double > m_batteryLevel
Battery level is defined as: output of Discharge function / alpha value.
double m_beta
beta value of RV model, in second^-1
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
float alpha
Plot alpha value (transparency)