A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-test-fdmt-ff-mac-scheduler.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Marco Miozzo <marco.miozzo@cttc.es>,
18 * Nicola Baldo <nbaldo@cttc.es>
19 * Dizhi Zhou <dizhi.zhou@gmail.com>
20 */
21
23
24#include "ns3/double.h"
25#include "ns3/radio-bearer-stats-calculator.h"
26#include "ns3/string.h"
27#include <ns3/boolean.h>
28#include <ns3/constant-position-mobility-model.h>
29#include <ns3/enum.h>
30#include <ns3/eps-bearer.h>
31#include <ns3/ff-mac-scheduler.h>
32#include <ns3/log.h>
33#include <ns3/lte-enb-net-device.h>
34#include <ns3/lte-enb-phy.h>
35#include <ns3/lte-helper.h>
36#include <ns3/lte-ue-net-device.h>
37#include <ns3/lte-ue-phy.h>
38#include <ns3/lte-ue-rrc.h>
39#include <ns3/mobility-helper.h>
40#include <ns3/net-device-container.h>
41#include <ns3/node-container.h>
42#include <ns3/object.h>
43#include <ns3/packet.h>
44#include <ns3/ptr.h>
45#include <ns3/simulator.h>
46#include <ns3/spectrum-error-model.h>
47#include <ns3/spectrum-interference.h>
48#include <ns3/test.h>
49
50#include <iostream>
51#include <sstream>
52#include <string>
53
54using namespace ns3;
55
56NS_LOG_COMPONENT_DEFINE("LenaTestFdMtFfMacScheduler");
57
59 : TestSuite("lte-fdmt-ff-mac-scheduler", Type::SYSTEM)
60{
61 NS_LOG_INFO("creating LenaTestFdMtFfMacSchedulerSuite");
62
63 bool errorModel = false;
64
65 // Test Case : AMC works in FDMT
66
67 // Note: here the MCS is calculated by the narrowband CQI
68
69 // DOWNLINK - DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.213)
70 // 1 user -> 24 PRB at Itbs 26 -> 2196 -> 2196000 bytes/sec for one UE; 0 bytes/sec for other
71 // UEs 3 users -> 2196000 among 3 users -> 2196000 bytes/sec for one UE; 0 bytes/sec for other
72 // UEs 6 users -> 2196000 among 6 users -> 2196000 bytes/sec for one UE; 0 bytes/sec for other
73 // UEs 12 users -> 2196000 among 12 users -> 2196000 bytes/sec for one UE; 0 bytes/sec for other
74 // UEs UPLINK- DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.213) 1 user -> 25
75 // PRB at Itbs 26 -> 2292 -> 2292000 bytes/sec 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000
76 // bytes/sec 6 users -> 4 PRB at Itbs 26 -> 373 -> 373000 bytes/sec after the patch enforcing
77 // min 3 PRBs per UE: 12 users -> 3 PRB at Itbs 26 -> 277 bytes * 8/12 UE/TTI -> 184670
78 // bytes/sec
79 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(1, 0, 2196000, 2292000, errorModel),
80 TestCase::Duration::EXTENSIVE);
81 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(3, 0, 2196000, 749000, errorModel),
82 TestCase::Duration::QUICK);
83 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(6, 0, 2196000, 373000, errorModel),
84 TestCase::Duration::EXTENSIVE);
85 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(12, 0, 2196000, 184670, errorModel),
86 TestCase::Duration::EXTENSIVE);
87
88 // DOWNLINK - DISTANCE 4800 -> MCS 22 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
89 // 1 user -> 24 PRB at Itbs 20 -> 1383 -> 1383000 byte/secfor one UE; 0 bytes/sec for other UEs
90 // 3 users -> 1383000 among 3 users -> 1383000 bytes/sec for one UE; 0 bytes/sec for other UEs
91 // 6 users -> 1383000 among 6 users -> 1383000 bytes/sec for one UE; 0 bytes/sec for other UEs
92 // 12 users -> 1383000 among 12 users -> 1383000 bytes/sec for one UE; 0 bytes/sec for other UEs
93 // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
94 // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 bytes/sec
95 // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 bytes/sec
96 // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 bytes/sec
97 // after the patch enforcing min 3 PRBs per UE:
98 // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 bytes/sec
99 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(1, 4800, 1383000, 807000, errorModel),
100 TestCase::Duration::EXTENSIVE);
101 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(3, 4800, 1383000, 253000, errorModel),
102 TestCase::Duration::EXTENSIVE);
103 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(6, 4800, 1383000, 125000, errorModel),
104 TestCase::Duration::EXTENSIVE);
105 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(12, 4800, 1383000, 62000, errorModel),
106 TestCase::Duration::EXTENSIVE);
107
108 // DOWNLINK - DISTANCE 6000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36.213)
109 // 1 user -> 24 PRB at Itbs 18 -> 1191 -> 1191000 byte/sec for one UE; 0 bytes/sec for other UEs
110 // 3 users -> 1191000 among 3 users -> 1191000 bytes/sec for one UE; 0 bytes/sec for other UEs
111 // 6 users -> 1191000 among 6 users -> 1191000 bytes/sec for one UE; 0 bytes/sec for other UEs
112 // 12 users ->1191000 among 12 users -> 1191000 bytes/sec for one UE; 0 bytes/sec for other UEs
113 // UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
114 // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 bytes/sec
115 // 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 bytes/sec
116 // 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 bytes/sec
117 // after the patch enforcing min 3 PRBs per UE:
118 // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 bytes/sec
119 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(1, 6000, 1191000, 621000, errorModel),
120 TestCase::Duration::EXTENSIVE);
121 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(3, 6000, 1191000, 201000, errorModel),
122 TestCase::Duration::EXTENSIVE);
123 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(6, 6000, 1191000, 97000, errorModel),
124 TestCase::Duration::EXTENSIVE);
125 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(12, 6000, 1191000, 48667, errorModel),
126 TestCase::Duration::EXTENSIVE);
127
128 // DOWNLINK - DISTANCE 10000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
129 // 1 user -> 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec for one UE; 0 bytes/sec for other UEs
130 // 3 users -> 775000 among 3 users -> 775000 bytes/sec for one UE; 0 bytes/sec for other UEs
131 // 6 users -> 775000 among 6 users -> 775000 bytes/sec for one UE; 0 bytes/sec for other UEs
132 // 12 users -> 775000 among 12 users -> 775000 bytes/sec for one UE; 0 bytes/sec for other UEs
133 // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
134 // 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 bytes/sec
135 // 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 bytes/sec
136 // 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 bytes/sec
137 // after the patch enforcing min 3 PRBs per UE:
138 // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 bytes/sec
139 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(1, 10000, 775000, 437000, errorModel),
140 TestCase::Duration::EXTENSIVE);
141 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(3, 10000, 775000, 137000, errorModel),
142 TestCase::Duration::EXTENSIVE);
143 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(6, 10000, 775000, 67000, errorModel),
144 TestCase::Duration::EXTENSIVE);
145 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(12, 10000, 775000, 32667, errorModel),
146 TestCase::Duration::EXTENSIVE);
147
148 // DONWLINK - DISTANCE 20000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
149 // 1 user -> 24 PRB at Itbs 8 -> 421 -> 421000 bytes/sec for one UE; 0 bytes/sec for other UEs
150 // 3 users -> 421000 among 3 users -> 421000 bytes/sec for one UE; 0 bytes/sec for other UEs
151 // 6 users -> 421000 among 6 users -> 421000 bytes/sec for one UE; 0 bytes/sec for other UEs
152 // 12 users -> 421000 among 12 users -> 421000 bytes/sec for one UE; 0 bytes/sec for other UEs
153 // UPLINK - DISTANCE 20000 -> MCS 2 -> Itbs 2 (from table 7.1.7.2.1-1 of 36.213)
154 // 1 user -> 25 PRB at Itbs 2 -> 233 -> 137000 bytes/sec
155 // 3 users -> 8 PRB at Itbs 2 -> 69 -> 41000 bytes/sec
156 // 6 users -> 4 PRB at Itbs 2 -> 32 -> 22000 bytes/sec
157 // after the patch enforcing min 3 PRBs per UE:
158 // 12 users -> 3 PRB at Itbs 2 -> 26 bytes * 8/12 UE/TTI -> 12000 bytes/sec
159 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(1, 20000, 421000, 137000, errorModel),
160 TestCase::Duration::EXTENSIVE);
161 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(3, 20000, 421000, 41000, errorModel),
162 TestCase::Duration::EXTENSIVE);
163 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(6, 20000, 421000, 22000, errorModel),
164 TestCase::Duration::EXTENSIVE);
165 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(12, 20000, 421000, 12000, errorModel),
166 TestCase::Duration::EXTENSIVE);
167
168 // DOWNLINK - DISTANCE 100000 -> CQI == 0 -> out of range -> 0 bytes/sec
169 // UPLINK - DISTANCE 100000 -> CQI == 0 -> out of range -> 0 bytes/sec
170 AddTestCase(new LenaFdMtFfMacSchedulerTestCase(1, 100000, 0, 0, errorModel),
171 TestCase::Duration::QUICK);
172}
173
174/**
175 * \ingroup lte-test
176 * Static variable for test initialization
177 */
179
180// --------------- T E S T - C A S E ------------------------------
181
182std::string
184{
185 std::ostringstream oss;
186 oss << nUser << " UEs, distance " << dist << " m";
187 return oss.str();
188}
189
191 double dist,
192 double thrRefDl,
193 double thrRefUl,
194 bool errorModelEnabled)
195 : TestCase(BuildNameString(nUser, dist)),
196 m_nUser(nUser),
197 m_dist(dist),
198 m_thrRefDl(thrRefDl),
199 m_thrRefUl(thrRefUl),
200 m_errorModelEnabled(errorModelEnabled)
201{
202}
203
205{
206}
207
208void
210{
211 NS_LOG_FUNCTION(this << m_nUser << m_dist);
212
214 {
215 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
216 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
217 }
218
219 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
220 Config::SetDefault("ns3::MacStatsCalculator::DlOutputFilename",
221 StringValue(CreateTempDirFilename("DlMacStats.txt")));
222 Config::SetDefault("ns3::MacStatsCalculator::UlOutputFilename",
223 StringValue(CreateTempDirFilename("UlMacStats.txt")));
224 Config::SetDefault("ns3::RadioBearerStatsCalculator::DlRlcOutputFilename",
225 StringValue(CreateTempDirFilename("DlRlcStats.txt")));
226 Config::SetDefault("ns3::RadioBearerStatsCalculator::UlRlcOutputFilename",
227 StringValue(CreateTempDirFilename("UlRlcStats.txt")));
228
229 /**
230 * Initialize Simulation Scenario: 1 eNB and m_nUser UEs
231 */
232
233 Ptr<LteHelper> lteHelper = CreateObject<LteHelper>();
234 lteHelper->SetAttribute("PathlossModel", StringValue("ns3::FriisSpectrumPropagationLossModel"));
235
236 // Create Nodes: eNodeB and UE
237 NodeContainer enbNodes;
238 NodeContainer ueNodes;
239 enbNodes.Create(1);
240 ueNodes.Create(m_nUser);
241
242 // Install Mobility Model
243 MobilityHelper mobility;
244 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
245 mobility.Install(enbNodes);
246 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
247 mobility.Install(ueNodes);
248
249 // Create Devices and install them in the Nodes (eNB and UE)
250 NetDeviceContainer enbDevs;
251 NetDeviceContainer ueDevs;
252 lteHelper->SetSchedulerType("ns3::FdMtFfMacScheduler");
253 lteHelper->SetSchedulerAttribute("UlCqiFilter", EnumValue(FfMacScheduler::SRS_UL_CQI));
254 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
255 ueDevs = lteHelper->InstallUeDevice(ueNodes);
256
257 // Attach a UE to a eNB
258 lteHelper->Attach(ueDevs, enbDevs.Get(0));
259
260 // Activate an EPS bearer
262 EpsBearer bearer(q);
263 lteHelper->ActivateDataRadioBearer(ueDevs, bearer);
264
265 Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
266 Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy();
267 enbPhy->SetAttribute("TxPower", DoubleValue(30.0));
268 enbPhy->SetAttribute("NoiseFigure", DoubleValue(5.0));
269
270 // Set UEs' position and power
271 for (int i = 0; i < m_nUser; i++)
272 {
275 mm->SetPosition(Vector(m_dist, 0.0, 0.0));
276 Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get(i)->GetObject<LteUeNetDevice>();
277 Ptr<LteUePhy> uePhy = lteUeDev->GetPhy();
278 uePhy->SetAttribute("TxPower", DoubleValue(23.0));
279 uePhy->SetAttribute("NoiseFigure", DoubleValue(9.0));
280 }
281
282 double statsStartTime = 0.300; // need to allow for RRC connection establishment + SRS
283 double statsDuration = 0.6;
284 double tolerance = 0.1;
285 Simulator::Stop(Seconds(statsStartTime + statsDuration - 0.000001));
286
287 lteHelper->EnableMacTraces();
288 lteHelper->EnableRlcTraces();
289 Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats();
290 rlcStats->SetAttribute("StartTime", TimeValue(Seconds(statsStartTime)));
291 rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(statsDuration)));
292
294
295 /**
296 * Check that the downlink assignment is done in a "frequency domain maximum throughput" manner
297 */
298 NS_LOG_INFO("DL - Test with " << m_nUser << " user(s) at distance " << m_dist);
299 std::vector<uint64_t> dlDataRxed;
300 for (int i = 0; i < m_nUser; i++)
301 {
302 // get the imsi
303 uint64_t imsi = ueDevs.Get(i)->GetObject<LteUeNetDevice>()->GetImsi();
304 uint8_t lcId = 3;
305 dlDataRxed.push_back(rlcStats->GetDlRxData(imsi, lcId));
306 NS_LOG_INFO("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at(i)
307 << " thr " << (double)dlDataRxed.at(i) / statsDuration << " ref "
308 << m_thrRefDl);
309 }
310
311 /**
312 * Check that the assignment is done in a "frequency domain maximum throughput" manner among
313 * users with maximum SINRs: without fading, current FD MT always assign all resources to one UE
314 */
315
316 uint8_t found = 0;
317 for (int i = 0; i < m_nUser; i++)
318 {
319 double throughput = (double)dlDataRxed.at(i) / statsDuration;
320 if (throughput != 0 && found == 0)
321 {
324 m_thrRefDl * tolerance,
325 " Unfair Throughput!");
326 found = 1;
327 }
328 else if (throughput != 0 && found == 1)
329 {
330 NS_TEST_ASSERT_MSG_EQ_TOL(0, m_thrRefDl, m_thrRefDl * tolerance, " Unfair Throughput!");
331 }
332 else
333 {
334 NS_TEST_ASSERT_MSG_EQ_TOL(throughput, 0, 0, " Unfair Throughput!");
335 }
336 }
337
338 /**
339 * Check that the uplink assignment is done in a "proportional fair" manner
340 */
341 NS_LOG_INFO("UL - Test with " << m_nUser << " user(s) at distance " << m_dist);
342 std::vector<uint64_t> ulDataRxed;
343 for (int i = 0; i < m_nUser; i++)
344 {
345 // get the imsi
346 uint64_t imsi = ueDevs.Get(i)->GetObject<LteUeNetDevice>()->GetImsi();
347 // get the lcId
348 uint8_t lcId = 3;
349 ulDataRxed.push_back(rlcStats->GetUlRxData(imsi, lcId));
350 NS_LOG_INFO("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)ulDataRxed.at(i)
351 << " thr " << (double)ulDataRxed.at(i) / statsDuration << " ref "
352 << m_thrRefUl);
353 }
354 /**
355 * Check that the assignment is done in a "proportional fair" manner among users
356 * with equal SINRs: the bandwidth should be distributed according to the
357 * ratio of the estimated throughput per TTI of each user; therefore equally
358 * partitioning the whole bandwidth achievable from a single users in a TTI
359 */
360 for (int i = 0; i < m_nUser; i++)
361 {
362 NS_TEST_ASSERT_MSG_EQ_TOL((double)ulDataRxed.at(i) / statsDuration,
364 m_thrRefUl * tolerance,
365 " Unfair Throughput!");
366 }
368}
This system test program creates different test cases with a single eNB and several UEs,...
double m_thrRefDl
DL throughput reference.
LenaFdMtFfMacSchedulerTestCase(uint16_t nUser, double dist, double thrRefDl, double thrRefUl, bool errorModelEnabled)
Constructor.
void DoRun() override
Implementation to actually run this TestCase.
static std::string BuildNameString(uint16_t nUser, double dist)
Builds the test name string based on provided parameter values.
double m_dist
distance between the nodes
double m_thrRefUl
UL throughput reference.
Test suite for LenaFdMtFfMacSchedulerTestCase test case.
AttributeValue implementation for Boolean.
Definition: boolean.h:37
Mobility model for which the current position does not change once it has been set and until it is se...
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
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
Qci
QoS Class Indicator.
Definition: eps-bearer.h:106
@ GBR_CONV_VOICE
GBR Conversational Voice.
Definition: eps-bearer.h:107
The eNodeB device implementation.
The LteUeNetDevice class implements the UE net device.
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Definition: object.h:522
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:142
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
Hold variables of type string.
Definition: string.h:56
encapsulates test code
Definition: test.h:1061
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:301
std::string CreateTempDirFilename(std::string filename)
Construct the full path to a file in a temporary directory.
Definition: test.cc:438
A suite of tests to run.
Definition: test.h:1268
Type
Type of test.
Definition: test.h:1275
AttributeValue implementation for Time.
Definition: nstime.h:1413
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:894
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:275
static LenaTestFdMtFfMacSchedulerSuite lenaTestFdMtFfMacSchedulerSuite
Static variable for test initialization.
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
Definition: test.h:338
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ofstream throughput