A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
BatteryLifetimeTest Class Reference

This example was originally devised as a test, then it was converted to an example. More...

+ Collaboration diagram for BatteryLifetimeTest:

Classes

struct  LoadProfile
 Load profile of the battery. More...
 

Public Member Functions

 BatteryLifetimeTest ()
 
virtual ~BatteryLifetimeTest ()
 
bool ConstantLoadTest (double load, Time expLifetime) const
 
void CreateLoadProfiles ()
 Creates load profiles according to D.
 
bool VariableLoadTest (std::vector< double > loads, std::vector< Time > timeStamps, Time expLifetime) const
 

Public Attributes

double m_alpha
 Alpha parameter of the battery model.
 
double m_beta
 Beta parameter of the battery model.
 
std::vector< LoadProfilem_loadProfiles
 Load profiles.
 

Detailed Description

This example was originally devised as a test, then it was converted to an example.

The script tests the remaining energy for RvBatteryModel and WifiRadioEnergyModel updates. It does so by mimicking the procedure and results published in D. Rakhmatov, S. Vrudhula, D.A. Wallach, "Battery lifetime prediction for energy-aware computing," Proceedings of the 2002 International Symposium on Low Power Electronics and Design,

  1. ISLPED '02. doi: 10.1109/LPE.2002.146729

Definition at line 54 of file rv-battery-model-test.cc.

Constructor & Destructor Documentation

◆ BatteryLifetimeTest()

BatteryLifetimeTest::BatteryLifetimeTest ( )

Definition at line 105 of file rv-battery-model-test.cc.

References m_alpha, and m_beta.

◆ ~BatteryLifetimeTest()

BatteryLifetimeTest::~BatteryLifetimeTest ( )
virtual

Definition at line 112 of file rv-battery-model-test.cc.

Member Function Documentation

◆ ConstantLoadTest()

bool BatteryLifetimeTest::ConstantLoadTest ( double  load,
Time  expLifetime 
) const

◆ CreateLoadProfiles()

void BatteryLifetimeTest::CreateLoadProfiles ( )

Creates load profiles according to D.

Rakhmatov, S. Vrudhula, D.A. Wallach, "Battery lifetime prediction for energy-aware computing," Proceedings of the 2002 International Symposium on Low Power Electronics and Design, 2002. ISLPED '02. doi: 10.1109/LPE.2002.146729

Definition at line 117 of file rv-battery-model-test.cc.

References BatteryLifetimeTest::LoadProfile::dualFoilLifeTime, BatteryLifetimeTest::LoadProfile::itsyLifetime, BatteryLifetimeTest::LoadProfile::loads, m_loadProfiles, ns3::Seconds(), and BatteryLifetimeTest::LoadProfile::timeStamps.

+ Here is the call graph for this function:

◆ VariableLoadTest()

bool BatteryLifetimeTest::VariableLoadTest ( std::vector< double loads,
std::vector< Time timeStamps,
Time  expLifetime 
) const

Member Data Documentation

◆ m_alpha

double BatteryLifetimeTest::m_alpha

Alpha parameter of the battery model.

Definition at line 101 of file rv-battery-model-test.cc.

Referenced by BatteryLifetimeTest(), ConstantLoadTest(), and VariableLoadTest().

◆ m_beta

double BatteryLifetimeTest::m_beta

Beta parameter of the battery model.

Definition at line 102 of file rv-battery-model-test.cc.

Referenced by BatteryLifetimeTest(), ConstantLoadTest(), and VariableLoadTest().

◆ m_loadProfiles

std::vector<LoadProfile> BatteryLifetimeTest::m_loadProfiles

Load profiles.

Definition at line 100 of file rv-battery-model-test.cc.

Referenced by CreateLoadProfiles().


The documentation for this class was generated from the following file: