A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
generic-battery-discharge-example.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Tokushima University
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Alberto Gallegos Ramonet <alramonet@is.tokushima-u.ac.jp>
18 */
19
20#include <ns3/core-module.h>
21#include <ns3/energy-module.h>
22#include <ns3/gnuplot.h>
23
24#include <fstream>
25#include <sstream>
26#include <string>
27
28using namespace ns3;
29using namespace ns3::energy;
30
31/**
32 * This example shows the use of batteries in ns-3.
33 * 5 batteries of different chemistries are discharged
34 * using a constant current. Batteries can be configured
35 * manually using the necessary parameters or using
36 * presets.
37 *
38 * In this example, only the first battery uses parameters
39 * to form a NiMh battery. The rest of the batteries in this
40 * example use defined presets with already tested parameters.
41 *
42 * Users can make their own battery presets by setting
43 * the necessary parameters as in the example in the first
44 * battery.
45 *
46 * Plot files are produced as a result of this example.
47 * Graphs can be obtained from the plot using:
48 * \code{.sh}
49 $> gnuplot <plotname>.plt
50 \endcode
51 *
52 */
53
54Gnuplot battDischPlot1 = Gnuplot("BattDisch1.eps");
56std::ofstream battDischFile1("BattDischCurve1.plt");
57
58Gnuplot battDischPlot2 = Gnuplot("BattDisch2.eps");
60std::ofstream battDischFile2("BattDischCurve2.plt");
61
62Gnuplot battDischPlot3 = Gnuplot("BattDisch3.eps");
64std::ofstream battDischFile3("BattDischCurve3.plt");
65
66Gnuplot battDischPlot4 = Gnuplot("BattDisch4.eps");
68std::ofstream battDischFile4("BattDischCurve4.plt");
69
70Gnuplot battDischPlot5 = Gnuplot("BattDisch5.eps");
72std::ofstream battDischFile5("BattDischCurve5.plt");
73
74void
76{
77 // NiMh battery Panasonic HHR650D NiMH
78 double cellVoltage = es->GetSupplyVoltage();
79 Time currentTime = Simulator::Now();
80 battDischDataset1.Add(currentTime.GetMinutes(), cellVoltage);
81 // battDischDataset1.Add(currentTime.GetHours(), cellVoltage);
82
84 {
86 }
87}
88
89void
91{
92 // CSB GP1272 Lead Acid
93 double cellVoltage = es->GetSupplyVoltage();
94 Time currentTime = Simulator::Now();
95 battDischDataset2.Add(currentTime.GetMinutes(), cellVoltage);
96 // battDischDataset2.Add(currentTime.GetHours(), cellVoltage);
97
99 {
101 }
102}
103
104void
106{
107 // Panasonic CGR18650DA Li-on
108 double cellVoltage = es->GetSupplyVoltage();
109 double dischargeCapacityAh = es->GetDrainedCapacity();
110 battDischDataset3.Add(dischargeCapacityAh * 1000, cellVoltage);
111
113 {
115 }
116}
117
118void
120{
121 // Rs Pro LGP12100 Lead Acid
122 double cellVoltage = es->GetSupplyVoltage();
123 Time currentTime = Simulator::Now();
124 battDischDataset4.Add(currentTime.GetMinutes(), cellVoltage);
125 // battDischDataset4.Add(currentTime.GetHours(), cellVoltage);
126
128 {
130 }
131}
132
133void
135{
136 // Panasonic N-700AAC NiCd
137 double cellVoltage = es->GetSupplyVoltage();
138 Time currentTime = Simulator::Now();
139 // battDischDataset5.Add(currentTime.GetMinutes(), cellVoltage);
140 battDischDataset5.Add(currentTime.GetHours(), cellVoltage);
141
143 {
145 }
146}
147
148int
149main(int argc, char** argv)
150{
151 CommandLine cmd(__FILE__);
152 cmd.Parse(argc, argv);
153
154 LogComponentEnable("GenericBatteryModel", LOG_LEVEL_DEBUG);
155
156 Ptr<Node> node;
157 GenericBatteryModelHelper batteryHelper;
158 Ptr<GenericBatteryModel> batteryModel;
159 Ptr<SimpleDeviceEnergyModel> devicesEnergyModel;
160
161 //////////////////////// PANASONIC HHR650D NiMH discharge 1C,2C,5C ////////////////////
162
163 // Discharge 6.5A (1C)
164 battDischDataset1 = Gnuplot2dDataset("Panasonic NiMH HHR650D 6.5 A (1C)");
165
166 node = CreateObject<Node>();
167 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
168 batteryModel = CreateObject<GenericBatteryModel>();
169
170 batteryModel->SetAttribute("FullVoltage", DoubleValue(1.39)); // Vfull
171 batteryModel->SetAttribute("MaxCapacity", DoubleValue(7.0)); // Q
172
173 batteryModel->SetAttribute("NominalVoltage", DoubleValue(1.18)); // Vnom
174 batteryModel->SetAttribute("NominalCapacity", DoubleValue(6.25)); // QNom
175
176 batteryModel->SetAttribute("ExponentialVoltage", DoubleValue(1.28)); // Vexp
177 batteryModel->SetAttribute("ExponentialCapacity", DoubleValue(1.3)); // Qexp
178
179 batteryModel->SetAttribute("InternalResistance", DoubleValue(0.0046)); // R
180 batteryModel->SetAttribute("TypicalDischargeCurrent", DoubleValue(1.3)); // i typical
181 batteryModel->SetAttribute("CutoffVoltage", DoubleValue(1.0)); // End of charge.
182
183 // Capacity Ah(qMax) * (Vfull) voltage * 3600 = (7 * 1.39 * 3.6) = 35028
184 batteryModel->SetAttribute("BatteryType", EnumValue(NIMH_NICD)); // Battery type
185
186 // The Generic battery model allow users to simulate different types of
187 // batteries based on some parameters. However, presets of batteries are
188 // included in ns-3, for example, the previous battery values can be
189 // configured using a helper to set a NiMh battery preset:
190
191 // batteryModel = DynamicCast<GenericBatteryModel>
192 // (batteryHelper.Install(node,PANASONIC_HHR650D_NIMH));
193
194 devicesEnergyModel->SetEnergySource(batteryModel);
195 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
196 devicesEnergyModel->SetNode(node);
197
198 devicesEnergyModel->SetCurrentA(6.5);
199
200 GraphBattery1(batteryModel);
201
203 // 18717 secs around 5.3hrs, 750secs for 32.5 current, or (4200 70 mins)
207
208 // Discharge 13A (2C)
209 battDischDataset1 = Gnuplot2dDataset("Panasonic NiMH HHR650D 13 A (2C)");
210 node = CreateObject<Node>();
211 batteryModel =
212 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, PANASONIC_HHR650D_NIMH));
213
214 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
215 devicesEnergyModel->SetEnergySource(batteryModel);
216 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
217 devicesEnergyModel->SetNode(node);
218
219 devicesEnergyModel->SetCurrentA(13);
220
221 GraphBattery1(batteryModel);
222
227
228 // Discharge 32.5A (5C)
229 battDischDataset1 = Gnuplot2dDataset("Panasonic NiMH HHR650D 32.5 A (5C)");
230 node = CreateObject<Node>();
231 batteryModel = CreateObject<GenericBatteryModel>();
232 batteryModel =
233 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, PANASONIC_HHR650D_NIMH));
234
235 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
236 devicesEnergyModel->SetEnergySource(batteryModel);
237 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
238 devicesEnergyModel->SetNode(node);
239
240 devicesEnergyModel->SetCurrentA(32.5);
241
242 GraphBattery1(batteryModel);
244
248
249 battDischPlot1.SetTerminal("postscript eps color enh \"Times-BoldItalic\"");
250 battDischPlot1.SetLegend(" Time (minutes)", "Voltage (V)");
251 battDischPlot1.SetExtra("set xrange[0:70]\n\
252 set yrange [0.8:1.8]\n\
253 set xtics 10\n\
254 set ytics 0.1\n\
255 set grid\n\
256 set style line 1 linewidth 5\n\
257 set style line 2 linewidth 5\n\
258 set style line 3 linewidth 5\n\
259 set style line 4 linewidth 5\n\
260 set style line 5 linewidth 5\n\
261 set style line 6 linewidth 5\n\
262 set style line 7 linewidth 5\n\
263 set style line 8 linewidth 5\n\
264 set style increment user\n\
265 set key reverse Left");
266
268 battDischFile1.close();
269 std::cout << "The end, plotting now\n";
270
271 //////////////////////// CSB GP1272 Lead Acid discharge 0.5C, 0.9C ////////////
272
273 // Discharge 0.36A (0.05C)
274 battDischDataset2 = Gnuplot2dDataset("CSB GP1272 0.36 A (0.05C)");
275 node = CreateObject<Node>();
276 batteryModel =
277 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, CSB_GP1272_LEADACID));
278
279 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
280 devicesEnergyModel->SetEnergySource(batteryModel);
281 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
282 devicesEnergyModel->SetNode(node);
283
284 devicesEnergyModel->SetCurrentA(0.36);
285
286 GraphBattery2(batteryModel);
288
289 Simulator::Stop(Seconds(55000));
292
293 // Discharge 0.648A (0.09C)
294 battDischDataset2 = Gnuplot2dDataset("CSB GP1272 0.648 A (0.09C)");
295 node = CreateObject<Node>();
296 batteryModel =
297 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, CSB_GP1272_LEADACID));
298
299 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
300 devicesEnergyModel->SetEnergySource(batteryModel);
301 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
302 devicesEnergyModel->SetNode(node);
303
304 devicesEnergyModel->SetCurrentA(0.648);
305
306 GraphBattery2(batteryModel);
308
309 Simulator::Stop(Seconds(30000));
312
313 battDischPlot2.SetTerminal("postscript eps color enh \"Times-BoldItalic\"");
314 battDischPlot2.SetLegend(" Time (Minutes)", "Voltage (V)");
315 battDischPlot2.SetExtra("set xrange[1:1800]\n\
316 set yrange [7:14]\n\
317 set logscale x \n\
318 set tics scale 3\n\
319 set xtics (1,2,3,5,10,20,30,60,120,180,300,600,1200,1800)\n\
320 set ytics (0,8,9,10,11,12,13,14)\n\
321 set grid\n\
322 set style line 1 linewidth 5\n\
323 set style line 2 linewidth 5\n\
324 set style line 3 linewidth 5\n\
325 set style line 4 linewidth 5\n\
326 set style line 5 linewidth 5\n\
327 set style line 6 linewidth 5\n\
328 set style line 7 linewidth 5\n\
329 set style line 8 linewidth 5\n\
330 set style increment user\n\
331 set key reverse Left");
333 battDischFile2.close();
334 std::cout << "The end, plotting now\n";
335
336 //////////////////////// Panasonic Li-on CGR18650DA, discharge 0.2C,1C,2C ///////////
337
338 // Discharge 0.466A (0.2C)
339 battDischDataset3 = Gnuplot2dDataset("Panasonic Li-on CGR18650DA 0.466 A (0.2C)");
340 node = CreateObject<Node>();
341 batteryModel =
342 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, PANASONIC_CGR18650DA_LION));
343
344 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
345 devicesEnergyModel->SetEnergySource(batteryModel);
346 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
347 devicesEnergyModel->SetNode(node);
348
349 devicesEnergyModel->SetCurrentA(0.466);
350
351 GraphBattery3(batteryModel);
353
354 Simulator::Stop(Seconds(17720));
357
358 // Discharge 2.33A (1C)
359 battDischDataset3 = Gnuplot2dDataset("Panasonic Li-on CGR18650DA 2.33 A (1C)");
360 node = CreateObject<Node>();
361 batteryModel =
362 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, PANASONIC_CGR18650DA_LION));
363
364 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
365 devicesEnergyModel->SetEnergySource(batteryModel);
366 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
367 devicesEnergyModel->SetNode(node);
368
369 devicesEnergyModel->SetCurrentA(2.33);
370
371 GraphBattery3(batteryModel);
373
377
378 // Discharge 4.66A (2C)
379 battDischDataset3 = Gnuplot2dDataset("Panasonic Li-on CGR18650DA 4.66 A (2C)");
380 node = CreateObject<Node>();
381 batteryModel =
382 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, PANASONIC_CGR18650DA_LION));
383
384 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
385 devicesEnergyModel->SetEnergySource(batteryModel);
386 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
387 devicesEnergyModel->SetNode(node);
388
389 devicesEnergyModel->SetCurrentA(4.66);
390
391 GraphBattery3(batteryModel);
393
397
398 battDischPlot3.SetTerminal("postscript eps color enh \"Times-BoldItalic\"");
399 battDischPlot3.SetLegend(" Discharge Capacity (mAh)", "Voltage (V)");
400 battDischPlot3.SetExtra("set xrange[0:2400]\n\
401 set yrange [2.6:4.4]\n\
402 set xtics 400\n\
403 set ytics 0.2\n\
404 set grid\n\
405 set style line 1 linewidth 5\n\
406 set style line 2 linewidth 5\n\
407 set style line 3 linewidth 5\n\
408 set style line 4 linewidth 5\n\
409 set style line 5 linewidth 5\n\
410 set style line 6 linewidth 5\n\
411 set style line 7 linewidth 5\n\
412 set style line 8 linewidth 5\n\
413 set style increment user\n\
414 set key reverse Left");
416 battDischFile3.close();
417 std::cout << "The end, plotting now\n";
418
419 //////////////////////// Rs PRO LGP12100 Lead Acid discharge 0.05C, 1C ///////////////
420
421 // Discharge 0.36A (0.05C)
422 battDischDataset4 = Gnuplot2dDataset("Rs PRO LGP12100 5A (0.05C)");
423 node = CreateObject<Node>();
424 batteryModel =
425 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, RSPRO_LGP12100_LEADACID));
426
427 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
428 devicesEnergyModel->SetEnergySource(batteryModel);
429 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
430 devicesEnergyModel->SetNode(node);
431
432 devicesEnergyModel->SetCurrentA(5);
433
434 GraphBattery4(batteryModel);
436
437 Simulator::Stop(Seconds(65000));
440
441 // Discharge 100A (1C)
442 battDischDataset4 = Gnuplot2dDataset("Rs PRO LGP12100 100A (1C)");
443 node = CreateObject<Node>();
444 batteryModel =
445 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, RSPRO_LGP12100_LEADACID));
446
447 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
448 devicesEnergyModel->SetEnergySource(batteryModel);
449 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
450 devicesEnergyModel->SetNode(node);
451
452 devicesEnergyModel->SetCurrentA(100);
453
454 GraphBattery4(batteryModel);
456
460
461 battDischPlot4.SetTerminal("postscript eps color enh \"Times-BoldItalic\"");
462 battDischPlot4.SetLegend(" Time (Minutes)", "Voltage (V)");
463 battDischPlot4.SetExtra("set xrange[1:1800]\n\
464 set yrange [7:13]\n\
465 set logscale \n\
466 set tics scale 3\n\
467 set xtics (1,2,4,6,8,10,20,40,60,120,240,360,480,600,1200)\n\
468 set ytics (7,8,9,10,11,12,13)\n\
469 set grid\n\
470 set style line 1 linewidth 5\n\
471 set style line 2 linewidth 5\n\
472 set style line 3 linewidth 5\n\
473 set style line 4 linewidth 5\n\
474 set style line 5 linewidth 5\n\
475 set style line 6 linewidth 5\n\
476 set style line 7 linewidth 5\n\
477 set style line 8 linewidth 5\n\
478 set style increment user\n\
479 set key reverse Left");
481 battDischFile4.close();
482 std::cout << "The end, plotting now\n";
483
484 //////////////////////// Panasonic N-700AAC NiCd discharge ///////////////////////////
485
486 // Discharge 0.7A (0.1C)
487 battDischDataset5 = Gnuplot2dDataset("Panasonic N-700AAC 0.7A (0.01C)");
488 node = CreateObject<Node>();
489 batteryModel =
490 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, PANASONIC_N700AAC_NICD));
491
492 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
493 devicesEnergyModel->SetEnergySource(batteryModel);
494 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
495 devicesEnergyModel->SetNode(node);
496
497 devicesEnergyModel->SetCurrentA(0.07);
498
499 GraphBattery5(batteryModel);
501
502 Simulator::Stop(Seconds(38500));
505
506 // Discharge 0.14A (0.2C)
507 battDischDataset5 = Gnuplot2dDataset("Panasonic N-700AAC 0.14A (0.2C)");
508 node = CreateObject<Node>();
509 batteryModel =
510 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, PANASONIC_N700AAC_NICD));
511
512 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
513 devicesEnergyModel->SetEnergySource(batteryModel);
514 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
515 devicesEnergyModel->SetNode(node);
516
517 devicesEnergyModel->SetCurrentA(0.14);
518
519 GraphBattery5(batteryModel);
521
522 Simulator::Stop(Seconds(19200));
525
526 // Discharge 0.35A (0.5C)
527 battDischDataset5 = Gnuplot2dDataset("Panasonic N-700AAC 0.35A (0.5C)");
528 node = CreateObject<Node>();
529 batteryModel =
530 DynamicCast<GenericBatteryModel>(batteryHelper.Install(node, PANASONIC_N700AAC_NICD));
531
532 devicesEnergyModel = CreateObject<SimpleDeviceEnergyModel>();
533 devicesEnergyModel->SetEnergySource(batteryModel);
534 batteryModel->AppendDeviceEnergyModel(devicesEnergyModel);
535 devicesEnergyModel->SetNode(node);
536
537 devicesEnergyModel->SetCurrentA(0.35);
538
539 GraphBattery5(batteryModel);
541
545
546 battDischPlot5.SetTerminal("postscript eps color enh \"Times-BoldItalic\"");
547 battDischPlot5.SetLegend(" Time (Hours)", "Voltage (V)");
548 battDischPlot5.SetExtra("set xrange[0:16]\n\
549 set yrange [0.7:1.5]\n\
550 set tics scale 3\n\
551 set xtics 2\n\
552 set ytics 0.1\n\
553 set grid\n\
554 set style line 1 linewidth 5\n\
555 set style line 2 linewidth 5\n\
556 set style line 3 linewidth 5\n\
557 set style line 4 linewidth 5\n\
558 set style line 5 linewidth 5\n\
559 set style line 6 linewidth 5\n\
560 set style line 7 linewidth 5\n\
561 set style line 8 linewidth 5\n\
562 set style increment user\n\
563 set key reverse Left");
565 battDischFile5.close();
566 std::cout << "The end, plotting now\n";
567 return 0;
568}
Parse command-line arguments.
Definition: command-line.h:232
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:42
Hold variables of type enum.
Definition: enum.h:62
Creates and assign an assortment of BatteryModels to Nodes.
Ptr< energy::EnergySourceContainer > Install(NodeContainer c) const
This function installs energy sources in a group of nodes in a node container.
Class to represent a 2D points plot.
Definition: gnuplot.h:116
void Add(double x, double y)
Definition: gnuplot.cc:377
a simple class to generate gnuplot-ready plotting commands from a set of datasets.
Definition: gnuplot.h:370
void AddDataset(const GnuplotDataset &dataset)
Definition: gnuplot.cc:796
void SetLegend(const std::string &xLegend, const std::string &yLegend)
Definition: gnuplot.cc:776
void SetTerminal(const std::string &terminal)
Definition: gnuplot.cc:764
void GenerateOutput(std::ostream &os)
Writes gnuplot commands and data values to a single output stream.
Definition: gnuplot.cc:802
void SetExtra(const std::string &extra)
Definition: gnuplot.cc:783
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:571
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:142
static bool IsFinished()
Check if the simulation should finish.
Definition: simulator.cc:171
static Time Now()
Return the current simulation virtual time.
Definition: simulator.cc:208
static void Run()
Run the simulation.
Definition: simulator.cc:178
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:186
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
double GetMinutes() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:398
double GetHours() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:393
std::ofstream battDischFile1("BattDischCurve1.plt")
Gnuplot2dDataset battDischDataset2
void GraphBattery1(Ptr< GenericBatteryModel > es)
std::ofstream battDischFile3("BattDischCurve3.plt")
void GraphBattery4(Ptr< GenericBatteryModel > es)
std::ofstream battDischFile5("BattDischCurve5.plt")
void GraphBattery2(Ptr< GenericBatteryModel > es)
std::ofstream battDischFile4("BattDischCurve4.plt")
Gnuplot battDischPlot1
This example shows the use of batteries in ns-3.
Gnuplot2dDataset battDischDataset5
void GraphBattery5(Ptr< GenericBatteryModel > es)
Gnuplot2dDataset battDischDataset1
void GraphBattery3(Ptr< GenericBatteryModel > es)
Gnuplot2dDataset battDischDataset3
Gnuplot2dDataset battDischDataset4
std::ofstream battDischFile2("BattDischCurve2.plt")
@ PANASONIC_HHR650D_NIMH
Panasonic HHR650D NiMh battery.
@ CSB_GP1272_LEADACID
CSB GP1272 Lead acid battery.
@ PANASONIC_CGR18650DA_LION
Panasonic CGR18650DA Li-Ion battery.
@ PANASONIC_N700AAC_NICD
Panasonic N700AAC NiCd battery.
@ RSPRO_LGP12100_LEADACID
RS Pro LGP12100 Lead acid battery.
@ NIMH_NICD
Nickel-metal hydride and Nickel cadmium batteries.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1319
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void LogComponentEnable(const std::string &name, LogLevel level)
Enable the logging output associated with that log component.
Definition: log.cc:302
@ LOG_LEVEL_DEBUG
LOG_DEBUG and above.
Definition: log.h:113
ns cmd
Definition: second.py:40