A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-test-frequency-reuse.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 Piotr Gawlowicz
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
7 *
8 */
9
11
12#include "lte-ffr-simple.h"
14
15#include "ns3/internet-module.h"
16#include "ns3/lte-helper.h"
17#include "ns3/mobility-helper.h"
18#include "ns3/packet-sink-helper.h"
19#include "ns3/point-to-point-epc-helper.h"
20#include "ns3/point-to-point-module.h"
21#include "ns3/udp-client-server-helper.h"
22#include <ns3/boolean.h>
23#include <ns3/callback.h>
24#include <ns3/config.h>
25#include <ns3/double.h>
26#include <ns3/enum.h>
27#include <ns3/ff-mac-scheduler.h>
28#include <ns3/log.h>
29#include <ns3/lte-common.h>
30#include <ns3/lte-enb-net-device.h>
31#include <ns3/lte-enb-phy.h>
32#include <ns3/lte-enb-rrc.h>
33#include <ns3/lte-ue-net-device.h>
34#include <ns3/lte-ue-phy.h>
35#include <ns3/lte-ue-rrc.h>
36#include <ns3/pointer.h>
37#include <ns3/simulator.h>
38#include <ns3/string.h>
39
40using namespace ns3;
41
42NS_LOG_COMPONENT_DEFINE("LteFrequencyReuseTest");
43
44/**
45 * TestSuite
46 */
47
49 : TestSuite("lte-frequency-reuse", Type::SYSTEM)
50{
51 // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_DEBUG);
52 // LogComponentEnable ("LteFrequencyReuseTest", logLevel);
53
54 std::vector<bool> availableDlRb;
55 std::vector<bool> availableUlRb;
56 for (uint32_t i = 0; i < 12; i++)
57 {
58 availableDlRb.push_back(true);
59 availableUlRb.push_back(true);
60 }
61 for (uint32_t i = 12; i < 25; i++)
62 {
63 availableDlRb.push_back(false);
64 availableUlRb.push_back(false);
65 }
66
67 AddTestCase(new LteHardFrTestCase("DownlinkHardFrPf1",
68 1,
69 "ns3::PfFfMacScheduler",
70 25,
71 25,
72 0,
73 12,
74 0,
75 12,
76 availableDlRb,
77 availableUlRb),
78 TestCase::Duration::QUICK);
79 AddTestCase(new LteHardFrTestCase("DownlinkHardFrPf2",
80 5,
81 "ns3::PfFfMacScheduler",
82 25,
83 25,
84 0,
85 12,
86 0,
87 12,
88 availableDlRb,
89 availableUlRb),
90 TestCase::Duration::QUICK);
91 AddTestCase(new LteHardFrTestCase("DownlinkHardFrPss1",
92 1,
93 "ns3::PssFfMacScheduler",
94 25,
95 25,
96 0,
97 12,
98 0,
99 12,
100 availableDlRb,
101 availableUlRb),
102 TestCase::Duration::QUICK);
103 AddTestCase(new LteHardFrTestCase("DownlinkHardFrPss2",
104 5,
105 "ns3::PssFfMacScheduler",
106 25,
107 25,
108 0,
109 12,
110 0,
111 12,
112 availableDlRb,
113 availableUlRb),
114 TestCase::Duration::QUICK);
115 AddTestCase(new LteHardFrTestCase("DownlinkHardFrCqa1",
116 1,
117 "ns3::CqaFfMacScheduler",
118 25,
119 25,
120 0,
121 12,
122 0,
123 12,
124 availableDlRb,
125 availableUlRb),
126 TestCase::Duration::QUICK);
127 AddTestCase(new LteHardFrTestCase("DownlinkHardFrCqa2",
128 5,
129 "ns3::CqaFfMacScheduler",
130 25,
131 25,
132 0,
133 12,
134 0,
135 12,
136 availableDlRb,
137 availableUlRb),
138 TestCase::Duration::QUICK);
139 AddTestCase(new LteHardFrTestCase("DownlinkHardFrFdTbfq1",
140 1,
141 "ns3::FdTbfqFfMacScheduler",
142 25,
143 25,
144 0,
145 12,
146 0,
147 12,
148 availableDlRb,
149 availableUlRb),
150 TestCase::Duration::QUICK);
151 AddTestCase(new LteHardFrTestCase("DownlinkHardFrFdTbfq2",
152 5,
153 "ns3::FdTbfqFfMacScheduler",
154 25,
155 25,
156 0,
157 12,
158 0,
159 12,
160 availableDlRb,
161 availableUlRb),
162 TestCase::Duration::QUICK);
163 AddTestCase(new LteHardFrTestCase("DownlinkHardFrTdTbfq1",
164 1,
165 "ns3::TdTbfqFfMacScheduler",
166 25,
167 25,
168 0,
169 12,
170 0,
171 12,
172 availableDlRb,
173 availableUlRb),
174 TestCase::Duration::QUICK);
175 AddTestCase(new LteHardFrTestCase("DownlinkHardFrTdTbfq2",
176 5,
177 "ns3::TdTbfqFfMacScheduler",
178 25,
179 25,
180 0,
181 12,
182 0,
183 12,
184 availableDlRb,
185 availableUlRb),
186 TestCase::Duration::QUICK);
187
188 availableDlRb.clear();
189 availableUlRb.clear();
190 for (uint32_t i = 0; i < 6; i++)
191 {
192 availableDlRb.push_back(true);
193 availableUlRb.push_back(true);
194 }
195 for (uint32_t i = 6; i < 12; i++)
196 {
197 availableDlRb.push_back(false);
198 availableUlRb.push_back(false);
199 }
200 for (uint32_t i = 12; i < 18; i++)
201 {
202 availableDlRb.push_back(true);
203 availableUlRb.push_back(true);
204 }
205 for (uint32_t i = 18; i < 25; i++)
206 {
207 availableDlRb.push_back(false);
208 availableUlRb.push_back(false);
209 }
210
211 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrPf1",
212 1,
213 "ns3::PfFfMacScheduler",
214 25,
215 25,
216 6,
217 6,
218 6,
219 6,
220 6,
221 6,
222 availableDlRb,
223 availableUlRb),
224 TestCase::Duration::QUICK);
225 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrPf2",
226 5,
227 "ns3::PfFfMacScheduler",
228 25,
229 25,
230 6,
231 6,
232 6,
233 6,
234 6,
235 6,
236 availableDlRb,
237 availableUlRb),
238 TestCase::Duration::QUICK);
239 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrPss1",
240 1,
241 "ns3::PssFfMacScheduler",
242 25,
243 25,
244 6,
245 6,
246 6,
247 6,
248 6,
249 6,
250 availableDlRb,
251 availableUlRb),
252 TestCase::Duration::QUICK);
253 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrPss2",
254 5,
255 "ns3::PssFfMacScheduler",
256 25,
257 25,
258 6,
259 6,
260 6,
261 6,
262 6,
263 6,
264 availableDlRb,
265 availableUlRb),
266 TestCase::Duration::QUICK);
267 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrCqa1",
268 1,
269 "ns3::CqaFfMacScheduler",
270 25,
271 25,
272 6,
273 6,
274 6,
275 6,
276 6,
277 6,
278 availableDlRb,
279 availableUlRb),
280 TestCase::Duration::QUICK);
281 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrCqa2",
282 5,
283 "ns3::CqaFfMacScheduler",
284 25,
285 25,
286 6,
287 6,
288 6,
289 6,
290 6,
291 6,
292 availableDlRb,
293 availableUlRb),
294 TestCase::Duration::QUICK);
295 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrCqaFdTbfq1",
296 1,
297 "ns3::FdTbfqFfMacScheduler",
298 25,
299 25,
300 6,
301 6,
302 6,
303 6,
304 6,
305 6,
306 availableDlRb,
307 availableUlRb),
308 TestCase::Duration::QUICK);
309 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrCqaFdTbfq2",
310 5,
311 "ns3::FdTbfqFfMacScheduler",
312 25,
313 25,
314 6,
315 6,
316 6,
317 6,
318 6,
319 6,
320 availableDlRb,
321 availableUlRb),
322 TestCase::Duration::QUICK);
323 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrCqaTdTbfq1",
324 1,
325 "ns3::TdTbfqFfMacScheduler",
326 25,
327 25,
328 6,
329 6,
330 6,
331 6,
332 6,
333 6,
334 availableDlRb,
335 availableUlRb),
336 TestCase::Duration::QUICK);
337 AddTestCase(new LteStrictFrTestCase("DownlinkStrictFrCqaTdTbfq2",
338 5,
339 "ns3::TdTbfqFfMacScheduler",
340 25,
341 25,
342 6,
343 6,
344 6,
345 6,
346 6,
347 6,
348 availableDlRb,
349 availableUlRb),
350 TestCase::Duration::QUICK);
351
352 AddTestCase(new LteStrictFrAreaTestCase("LteStrictFrAreaTestCasePf1", "ns3::PfFfMacScheduler"),
353 TestCase::Duration::QUICK);
355 new LteStrictFrAreaTestCase("LteStrictFrAreaTestCasePss1", "ns3::PssFfMacScheduler"),
356 TestCase::Duration::QUICK);
358 new LteStrictFrAreaTestCase("LteStrictFrAreaTestCaseCqa1", "ns3::CqaFfMacScheduler"),
359 TestCase::Duration::QUICK);
361 new LteStrictFrAreaTestCase("LteStrictFrAreaTestCaseFdTbfq1", "ns3::FdTbfqFfMacScheduler"),
362 TestCase::Duration::QUICK);
364 new LteStrictFrAreaTestCase("LteStrictFrAreaTestCaseTdTbfq1", "ns3::TdTbfqFfMacScheduler"),
365 TestCase::Duration::QUICK);
366
367 AddTestCase(new LteSoftFrAreaTestCase("LteSoftFrAreaTestCasePf1", "ns3::PfFfMacScheduler"),
368 TestCase::Duration::QUICK);
369 AddTestCase(new LteSoftFrAreaTestCase("LteSoftFrAreaTestCasePss1", "ns3::PssFfMacScheduler"),
370 TestCase::Duration::QUICK);
371 AddTestCase(new LteSoftFrAreaTestCase("LteSoftFrAreaTestCaseCqa1", "ns3::CqaFfMacScheduler"),
372 TestCase::Duration::QUICK);
374 new LteSoftFrAreaTestCase("LteSoftFrAreaTestCaseFdTbfq1", "ns3::FdTbfqFfMacScheduler"),
375 TestCase::Duration::QUICK);
377 new LteSoftFrAreaTestCase("LteSoftFrAreaTestCaseTdTbfq1", "ns3::TdTbfqFfMacScheduler"),
378 TestCase::Duration::QUICK);
379
380 AddTestCase(new LteSoftFfrAreaTestCase("LteSoftFfrAreaTestCasePf1", "ns3::PfFfMacScheduler"),
381 TestCase::Duration::QUICK);
382 AddTestCase(new LteSoftFfrAreaTestCase("LteSoftFfrAreaTestCasePss1", "ns3::PssFfMacScheduler"),
383 TestCase::Duration::QUICK);
384 AddTestCase(new LteSoftFfrAreaTestCase("LteSoftFfrAreaTestCaseCqa1", "ns3::CqaFfMacScheduler"),
385 TestCase::Duration::QUICK);
387 new LteSoftFfrAreaTestCase("LteSoftFfrAreaTestCaseFdTbfq1", "ns3::FdTbfqFfMacScheduler"),
388 TestCase::Duration::QUICK);
390 new LteSoftFfrAreaTestCase("LteSoftFfrAreaTestCaseTdTbfq1", "ns3::TdTbfqFfMacScheduler"),
391 TestCase::Duration::QUICK);
392
394 new LteEnhancedFfrAreaTestCase("LteEnhancedFfrAreaTestCasePf1", "ns3::PfFfMacScheduler"),
395 TestCase::Duration::QUICK);
397 new LteEnhancedFfrAreaTestCase("LteEnhancedFfrAreaTestCasePss1", "ns3::PssFfMacScheduler"),
398 TestCase::Duration::QUICK);
400 new LteEnhancedFfrAreaTestCase("LteEnhancedFfrAreaTestCaseCqa1", "ns3::CqaFfMacScheduler"),
401 TestCase::Duration::QUICK);
402 AddTestCase(new LteEnhancedFfrAreaTestCase("LteEnhancedFfrAreaTestCaseFdTbfq1",
403 "ns3::FdTbfqFfMacScheduler"),
404 TestCase::Duration::QUICK);
405 AddTestCase(new LteEnhancedFfrAreaTestCase("LteEnhancedFfrAreaTestCaseTdTbfq1",
406 "ns3::TdTbfqFfMacScheduler"),
407 TestCase::Duration::QUICK);
408
409 AddTestCase(new LteDistributedFfrAreaTestCase("LteDistributedFfrAreaTestCasePf1",
410 "ns3::PfFfMacScheduler"),
411 TestCase::Duration::QUICK);
412 AddTestCase(new LteDistributedFfrAreaTestCase("LteDistributedFfrAreaTestCasePss1",
413 "ns3::PssFfMacScheduler"),
414 TestCase::Duration::QUICK);
415 AddTestCase(new LteDistributedFfrAreaTestCase("LteDistributedFfrAreaTestCaseCqa1",
416 "ns3::CqaFfMacScheduler"),
417 TestCase::Duration::QUICK);
418 AddTestCase(new LteDistributedFfrAreaTestCase("LteDistributedFfrAreaTestCaseFdTbfq1",
419 "ns3::FdTbfqFfMacScheduler"),
420 TestCase::Duration::QUICK);
421 AddTestCase(new LteDistributedFfrAreaTestCase("LteDistributedFfrAreaTestCaseTdTbfq1",
422 "ns3::TdTbfqFfMacScheduler"),
423 TestCase::Duration::QUICK);
424}
425
426/**
427 * @ingroup lte-test
428 * Static variable for test initialization
429 */
431
432/**
433 * TestCase Data
434 */
435void
437{
438 testcase->DlDataRxStart(spectrumValue);
439}
440
441void
443{
444 testcase->UlDataRxStart(spectrumValue);
445}
446
448 uint32_t userNum,
449 uint16_t dlBandwidth,
450 uint16_t ulBandwidth,
451 std::vector<bool> availableDlRb,
452 std::vector<bool> availableUlRb)
453 : TestCase("Test: " + name),
454 m_userNum(userNum),
455 m_dlBandwidth(dlBandwidth),
456 m_ulBandwidth(ulBandwidth),
457 m_availableDlRb(availableDlRb),
458 m_usedMutedDlRbg(false),
459 m_availableUlRb(availableUlRb),
460 m_usedMutedUlRbg(false)
461{
462}
463
467
468void
470{
471 NS_LOG_DEBUG("DL DATA Power allocation :");
472 uint32_t i = 0;
473 for (auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
474 {
475 double power = (*it) * (m_dlBandwidth * 180000);
476 NS_LOG_DEBUG("RB " << i << " POWER: "
477 << " " << power << " isAvailable: " << m_availableDlRb[i]);
478
479 if (!m_availableDlRb[i] && power > 0)
480 {
481 m_usedMutedDlRbg = true;
482 }
483 i++;
484 }
485}
486
487void
489{
490 NS_LOG_DEBUG("UL DATA Power allocation :");
491 uint32_t i = 0;
492 for (auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
493 {
494 double power = (*it) * (m_ulBandwidth * 180000);
495 NS_LOG_DEBUG("RB " << i << " POWER: "
496 << " " << power << " isAvailable: " << m_availableUlRb[i]);
497
498 if (!m_availableUlRb[i] && power > 0)
499 {
500 m_usedMutedUlRbg = true;
501 }
502 i++;
503 }
504}
505
506void
510
512 uint32_t userNum,
513 std::string schedulerType,
514 uint16_t dlBandwidth,
515 uint16_t ulBandwidth,
516 uint8_t dlSubBandOffset,
517 uint16_t dlSubBandwidth,
518 uint8_t ulSubBandOffset,
519 uint16_t ulSubBandwidth,
520 std::vector<bool> availableDlRb,
521 std::vector<bool> availableUlRb)
522 : LteFrTestCase(name, userNum, dlBandwidth, ulBandwidth, availableDlRb, availableUlRb),
523 m_schedulerType(schedulerType),
524 m_dlSubBandOffset(dlSubBandOffset),
525 m_dlSubBandwidth(dlSubBandwidth),
526 m_ulSubBandOffset(ulSubBandOffset),
527 m_ulSubBandwidth(ulSubBandwidth)
528{
529 NS_LOG_INFO("Creating LteDownlinkFrTestCase");
530}
531
535
536void
538{
539 NS_LOG_DEBUG("LteFrTestCase");
540
542 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(false));
543
544 /**
545 * Simulation Topology
546 */
547
549 lteHelper->SetFfrAlgorithmType("ns3::LteFrHardAlgorithm");
550
551 lteHelper->SetFfrAlgorithmAttribute("DlSubBandOffset", UintegerValue(m_dlSubBandOffset));
552 lteHelper->SetFfrAlgorithmAttribute("DlSubBandwidth", UintegerValue(m_dlSubBandwidth));
553
554 lteHelper->SetFfrAlgorithmAttribute("UlSubBandOffset", UintegerValue(m_ulSubBandOffset));
555 lteHelper->SetFfrAlgorithmAttribute("UlSubBandwidth", UintegerValue(m_ulSubBandwidth));
556
557 // Create Nodes: eNodeB and UE
558 NodeContainer enbNodes;
559 NodeContainer ueNodes;
560 enbNodes.Create(1);
561 ueNodes.Create(m_userNum);
562 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes);
563
564 // Install Mobility Model
565 MobilityHelper mobility;
566 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
567 mobility.Install(allNodes);
568
569 // Create Devices and install them in the Nodes (eNB and UE)
570 NetDeviceContainer enbDevs;
571 NetDeviceContainer ueDevs;
572 lteHelper->SetSchedulerType(m_schedulerType);
573 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
574 ueDevs = lteHelper->InstallUeDevice(ueNodes);
575
576 // Attach a UE to a eNB
577 lteHelper->Attach(ueDevs, enbDevs.Get(0));
578
579 // Activate the default EPS bearer
580 // Since this test includes the Token Bank Fair Queue Scheduler
581 //(ns3::FdTbfqFfMacScheduler) we have to treat the default
582 // bearer as the dedicated bearer with QoS.
584 qos.mbrUl = 1e6;
585 qos.mbrDl = 1e6;
586 qos.gbrUl = 1e4;
587 qos.gbrDl = 1e4;
588
590 EpsBearer bearer(q, qos);
591 lteHelper->ActivateDataRadioBearer(ueDevs, bearer);
592
593 // Test SpectrumPhy to get signals form DL channel
594 Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get(0)
595 ->GetObject<LteEnbNetDevice>()
596 ->GetPhy()
597 ->GetDownlinkSpectrumPhy()
599 Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel();
600
602 Ptr<LteEnbNetDevice> eNbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
603 testDlSpectrumPhy->SetRxSpectrumModel(
605 dlChannel->AddRx(testDlSpectrumPhy);
606
607 testDlSpectrumPhy->TraceConnectWithoutContext(
608 "RxStart",
610
611 // Test SpectrumPhy to get signals form UL channel
612 Ptr<LteSpectrumPhy> ueUlSpectrumPhy = ueDevs.Get(0)
613 ->GetObject<LteUeNetDevice>()
614 ->GetPhy()
615 ->GetUplinkSpectrumPhy()
617 Ptr<SpectrumChannel> ulChannel = ueUlSpectrumPhy->GetChannel();
618
620 testUlSpectrumPhy->SetRxSpectrumModel(
622 ulChannel->AddRx(testUlSpectrumPhy);
623
624 testUlSpectrumPhy->TraceConnectWithoutContext(
625 "RxStart",
627
628 Simulator::Stop(Seconds(0.500));
630
631 NS_TEST_ASSERT_MSG_EQ(m_usedMutedDlRbg, false, "Scheduler used DL RBG muted by FFR Algorithm");
632
633 NS_TEST_ASSERT_MSG_EQ(m_usedMutedUlRbg, false, "Scheduler used UL RBG muted by FFR Algorithm");
634
636}
637
639 uint32_t userNum,
640 std::string schedulerType,
641 uint16_t dlBandwidth,
642 uint16_t ulBandwidth,
643 uint16_t dlCommonSubBandwidth,
644 uint8_t dlEdgeSubBandOffset,
645 uint16_t dlEdgeSubBandwidth,
646 uint16_t ulCommonSubBandwidth,
647 uint8_t ulEdgeSubBandOffset,
648 uint16_t ulEdgeSubBandwidth,
649 std::vector<bool> availableDlRb,
650 std::vector<bool> availableUlRb)
651 : LteFrTestCase(name, userNum, dlBandwidth, ulBandwidth, availableDlRb, availableUlRb),
652 m_schedulerType(schedulerType),
653 m_dlCommonSubBandwidth(dlCommonSubBandwidth),
654 m_dlEdgeSubBandOffset(dlEdgeSubBandOffset),
655 m_dlEdgeSubBandwidth(dlEdgeSubBandwidth),
656 m_ulCommonSubBandwidth(ulCommonSubBandwidth),
657 m_ulEdgeSubBandOffset(ulEdgeSubBandOffset),
658 m_ulEdgeSubBandwidth(ulEdgeSubBandwidth)
659{
660 NS_LOG_INFO("Creating LteFrTestCase");
661}
662
666
667void
669{
670 NS_LOG_DEBUG("LteFrTestCase");
671
673 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(false));
674
675 /**
676 * Simulation Topology
677 */
678
680 lteHelper->SetFfrAlgorithmType("ns3::LteFrStrictAlgorithm");
681
682 lteHelper->SetFfrAlgorithmAttribute("DlCommonSubBandwidth",
684 lteHelper->SetFfrAlgorithmAttribute("DlEdgeSubBandOffset",
686 lteHelper->SetFfrAlgorithmAttribute("DlEdgeSubBandwidth", UintegerValue(m_dlEdgeSubBandwidth));
687
688 lteHelper->SetFfrAlgorithmAttribute("UlCommonSubBandwidth",
690 lteHelper->SetFfrAlgorithmAttribute("UlEdgeSubBandOffset",
692 lteHelper->SetFfrAlgorithmAttribute("UlEdgeSubBandwidth", UintegerValue(m_ulEdgeSubBandwidth));
693
694 // Create Nodes: eNodeB and UE
695 NodeContainer enbNodes;
696 NodeContainer ueNodes;
697 enbNodes.Create(1);
698 ueNodes.Create(m_userNum);
699 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes);
700
701 // Install Mobility Model
702 MobilityHelper mobility;
703 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
704 mobility.Install(allNodes);
705
706 // Create Devices and install them in the Nodes (eNB and UE)
707 NetDeviceContainer enbDevs;
708 NetDeviceContainer ueDevs;
709 lteHelper->SetSchedulerType(m_schedulerType);
710 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
711 ueDevs = lteHelper->InstallUeDevice(ueNodes);
712
713 // Attach a UE to a eNB
714 lteHelper->Attach(ueDevs, enbDevs.Get(0));
715
716 // Activate the default EPS bearer
717 // Since this test includes the Token Bank Fair Queue Scheduler
718 //(ns3::FdTbfqFfMacScheduler) we have to treat the default
719 // bearer as the dedicated bearer with QoS.
720
722 qos.mbrUl = 1e6;
723 qos.mbrDl = 1e6;
724 qos.gbrUl = 1e4;
725 qos.gbrDl = 1e4;
726
728 EpsBearer bearer(q, qos);
729 lteHelper->ActivateDataRadioBearer(ueDevs, bearer);
730
731 // Test SpectrumPhy to get signals form DL channel
732 Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get(0)
733 ->GetObject<LteEnbNetDevice>()
734 ->GetPhy()
735 ->GetDownlinkSpectrumPhy()
737 Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel();
738
740 Ptr<LteEnbNetDevice> eNbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
741 testDlSpectrumPhy->SetRxSpectrumModel(
743 dlChannel->AddRx(testDlSpectrumPhy);
744
745 testDlSpectrumPhy->TraceConnectWithoutContext(
746 "RxStart",
748
749 // Test SpectrumPhy to get signals form UL channel
750 Ptr<LteSpectrumPhy> ueUlSpectrumPhy = ueDevs.Get(0)
751 ->GetObject<LteUeNetDevice>()
752 ->GetPhy()
753 ->GetUplinkSpectrumPhy()
755 Ptr<SpectrumChannel> ulChannel = ueUlSpectrumPhy->GetChannel();
756
758 testUlSpectrumPhy->SetRxSpectrumModel(
760 ulChannel->AddRx(testUlSpectrumPhy);
761
762 testUlSpectrumPhy->TraceConnectWithoutContext(
763 "RxStart",
765
766 Simulator::Stop(Seconds(0.500));
768
769 NS_TEST_ASSERT_MSG_EQ(m_usedMutedDlRbg, false, "Scheduler used DL RBG muted by FFR Algorithm");
770
771 NS_TEST_ASSERT_MSG_EQ(m_usedMutedUlRbg, false, "Scheduler used UL RBG muted by FFR Algorithm");
772
774}
775
776void
778{
779 testcase->DlDataRxStart(spectrumValue);
780}
781
782void
784{
785 testcase->UlDataRxStart(spectrumValue);
786}
787
788LteFrAreaTestCase::LteFrAreaTestCase(std::string name, std::string schedulerType)
789 : TestCase("Test: " + name),
790 m_schedulerType(schedulerType)
791{
792 m_dlBandwidth = 25;
793 m_ulBandwidth = 25;
794 m_usedWrongDlRbg = false;
795 m_usedWrongUlRbg = false;
796}
797
801
802void
804{
805 // need time to report new UE measurements, and wait because of filtering
807 {
808 return;
809 }
810
811 NS_LOG_DEBUG("DL DATA Power allocation :");
812 uint32_t i = 0;
813 for (auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
814 {
815 double power = (*it) * (m_dlBandwidth * 180000);
816 NS_LOG_DEBUG("RB " << i << " POWER: "
817 << " " << power);
818 NS_LOG_DEBUG("RB " << i << " POWER: "
819 << " " << power << " Available: " << m_expectedDlRb[i]
820 << " Expected Power: " << m_expectedDlPower);
821
822 if (!m_expectedDlRb[i] && power > 0)
823 {
824 m_usedWrongDlRbg = true;
825 }
826 else if (m_expectedDlRb[i] && power > 0)
827 {
830 0.1,
831 "Wrong Data Channel DL Power level");
832 }
833 i++;
834 }
835}
836
837void
839{
840 // need time to report new UE measurements, and wait because of filtering
842 {
843 return;
844 }
845
846 NS_LOG_DEBUG("UL DATA Power allocation :");
847 uint32_t i = 0;
848 uint32_t numActiveRbs = 0;
849
850 // At the moment I could not find a better way to find total number
851 // of active RBs. This method is independent of the bandwidth
852 // configuration done in a test scenario, thus, it requires
853 // minimum change to the script.
854 for (auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
855 {
856 // Count the RB as active if it is part of
857 // the expected UL RBs and has Power Spectral Density (PSD) > 0
858 if (m_expectedUlRb[numActiveRbs] && (*it) > 0)
859 {
860 numActiveRbs++;
861 }
862 }
863 NS_LOG_DEBUG("Total number of active RBs = " << numActiveRbs);
864
865 // The uplink power control and the uplink PSD
866 // calculation only consider active resource blocks.
867 for (auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
868 {
869 double power = (*it) * (numActiveRbs * 180000);
870 NS_LOG_DEBUG("RB " << i << " POWER: " << power
871 << " expectedUlPower: " << m_expectedUlPower);
872 if (!m_expectedUlRb[i] && power > 0)
873 {
874 m_usedWrongUlRbg = true;
875 }
876 else if (m_expectedUlRb[i] && power > 0)
877 {
880 0.01,
881 "Wrong Data Channel UL Power level"
882 << Simulator::Now().As(Time::S));
883 }
884 i++;
885 }
886}
887
888void
890{
891 NS_LOG_FUNCTION(this);
892 NS_LOG_DEBUG("Teleport UE to : (" << x << ", " << y << ", 0)");
894 m_ueMobility->SetPosition(Vector(x, y, 0.0));
895}
896
897void
899 uint32_t y,
900 double expectedPower,
901 std::vector<bool> expectedDlRb)
902{
903 NS_LOG_FUNCTION(this);
904 NS_LOG_DEBUG("Teleport UE to : (" << x << ", " << y << ", 0)");
906 m_ueMobility->SetPosition(Vector(x, y, 0.0));
907 m_expectedDlPower = expectedPower;
908 m_expectedDlRb = expectedDlRb;
909}
910
911void
913 uint32_t x,
914 uint32_t y,
915 double expectedPower,
916 std::vector<bool> expectedDlRb)
917{
918 NS_LOG_FUNCTION(this);
919 NS_LOG_DEBUG("Teleport UE to : (" << x << ", " << y << ", 0)");
920
921 Ptr<MobilityModel> ueMobility = ueNode->GetObject<MobilityModel>();
922 ueMobility->SetPosition(Vector(x, y, 0.0));
924 m_expectedDlPower = expectedPower;
925 m_expectedDlRb = expectedDlRb;
926}
927
928void
929LteFrAreaTestCase::SetDlExpectedValues(double expectedDlPower, std::vector<bool> expectedDlRb)
930{
931 NS_LOG_FUNCTION(this);
932 m_expectedDlPower = expectedDlPower;
933 m_expectedDlRb = expectedDlRb;
934}
935
936void
937LteFrAreaTestCase::SetUlExpectedValues(double expectedUlPower, std::vector<bool> expectedUlRb)
938{
939 NS_LOG_FUNCTION(this);
940 m_expectedUlPower = expectedUlPower;
941 m_expectedUlRb = expectedUlRb;
942}
943
944void
948
949LteStrictFrAreaTestCase::LteStrictFrAreaTestCase(std::string name, std::string schedulerType)
950 : LteFrAreaTestCase(name, schedulerType)
951{
952 NS_LOG_INFO("Creating LteFrTestCase");
953}
954
958
959void
961{
962 NS_LOG_DEBUG("LteStrictFrAreaTestCase");
963
965 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
966 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
967 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
968
969 double eNbTxPower = 30;
970 Config::SetDefault("ns3::LteEnbPhy::TxPower", DoubleValue(eNbTxPower));
971 Config::SetDefault("ns3::LteUePhy::TxPower", DoubleValue(10.0));
972 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(true));
973
974 Config::SetDefault("ns3::LteUePowerControl::ClosedLoop", BooleanValue(true));
975 Config::SetDefault("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue(false));
976
978
979 // Create Nodes: eNodeB and UE
980 NodeContainer enbNodes;
981 NodeContainer ueNodes1;
982 NodeContainer ueNodes2;
983 enbNodes.Create(2);
984 ueNodes1.Create(1);
985 ueNodes2.Create(1);
986 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes1, ueNodes2);
987
988 /*
989 * The topology is the following:
990 *
991 * eNB1 UE1 eNB2
992 * | | |
993 * x ------------ x ------------------------ x ------------ x----UE2
994 * 200 m 600 m 200 m 20 m
995 *
996 */
997
999 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // eNB1
1000 positionAlloc->Add(Vector(1000, 0.0, 0.0)); // eNB2
1001 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // UE1
1002 positionAlloc->Add(Vector(1020, 0.0, 0.0)); // UE2
1003 MobilityHelper mobility;
1004 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
1005 mobility.SetPositionAllocator(positionAlloc);
1006 mobility.Install(allNodes);
1007 m_ueMobility = ueNodes1.Get(0)->GetObject<MobilityModel>();
1008
1009 // Disable layer-3 filtering
1010 Config::SetDefault("ns3::LteEnbRrc::RsrpFilterCoefficient", UintegerValue(0));
1011 Config::SetDefault("ns3::LteEnbRrc::RsrqFilterCoefficient", UintegerValue(0));
1012
1013 // Create Devices and install them in the Nodes (eNB and UE)
1014 NetDeviceContainer enbDevs;
1015 NetDeviceContainer ueDevs1;
1016 NetDeviceContainer ueDevs2;
1017 lteHelper->SetSchedulerType(m_schedulerType);
1018
1019 lteHelper->SetFfrAlgorithmType("ns3::LteFrStrictAlgorithm");
1020 lteHelper->SetFfrAlgorithmAttribute("RsrqThreshold", UintegerValue(25));
1021 lteHelper->SetFfrAlgorithmAttribute("CenterPowerOffset",
1023 lteHelper->SetFfrAlgorithmAttribute("EdgePowerOffset",
1025
1026 lteHelper->SetFfrAlgorithmAttribute("DlCommonSubBandwidth", UintegerValue(6));
1027 lteHelper->SetFfrAlgorithmAttribute("DlEdgeSubBandOffset", UintegerValue(6));
1028 lteHelper->SetFfrAlgorithmAttribute("DlEdgeSubBandwidth", UintegerValue(6));
1029
1030 lteHelper->SetFfrAlgorithmAttribute("UlCommonSubBandwidth", UintegerValue(6));
1031 lteHelper->SetFfrAlgorithmAttribute("UlEdgeSubBandOffset", UintegerValue(6));
1032 lteHelper->SetFfrAlgorithmAttribute("UlEdgeSubBandwidth", UintegerValue(6));
1033 enbDevs.Add(lteHelper->InstallEnbDevice(enbNodes.Get(0)));
1034
1035 lteHelper->SetFfrAlgorithmType("ns3::LteFrNoOpAlgorithm");
1036 enbDevs.Add(lteHelper->InstallEnbDevice(enbNodes.Get(1)));
1037
1038 ueDevs1 = lteHelper->InstallUeDevice(ueNodes1);
1039 ueDevs2 = lteHelper->InstallUeDevice(ueNodes2);
1040
1041 // Attach a UE to a eNB
1042 lteHelper->Attach(ueDevs1, enbDevs.Get(0));
1043 lteHelper->Attach(ueDevs2, enbDevs.Get(1));
1044
1045 // Activate the default EPS bearer
1046 // Since this test includes the Token Bank Fair Queue Scheduler
1047 //(ns3::FdTbfqFfMacScheduler) we have to treat the default
1048 // bearer as the dedicated bearer with QoS.
1050 qos.mbrUl = 1e6;
1051 qos.mbrDl = 1e6;
1052 qos.gbrUl = 1e4;
1053 qos.gbrDl = 1e4;
1054
1056 EpsBearer bearer(q, qos);
1057
1058 lteHelper->ActivateDataRadioBearer(ueDevs1, bearer);
1059 lteHelper->ActivateDataRadioBearer(ueDevs2, bearer);
1060
1061 // Test SpectrumPhy to get signals form DL channel
1062 Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get(0)
1063 ->GetObject<LteEnbNetDevice>()
1064 ->GetPhy()
1065 ->GetDownlinkSpectrumPhy()
1067 Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel();
1068
1070 Ptr<LteEnbNetDevice> eNbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
1071 testDlSpectrumPhy->SetRxSpectrumModel(
1073 dlChannel->AddRx(testDlSpectrumPhy);
1074
1075 testDlSpectrumPhy->SetCellId(1);
1076
1077 testDlSpectrumPhy->TraceConnectWithoutContext(
1078 "RxStart",
1080
1081 // Test SpectrumPhy to get signals form UL channel
1082 Ptr<LteSpectrumPhy> ueUlSpectrumPhy = ueDevs1.Get(0)
1083 ->GetObject<LteUeNetDevice>()
1084 ->GetPhy()
1085 ->GetUplinkSpectrumPhy()
1087 Ptr<SpectrumChannel> ulChannel = ueUlSpectrumPhy->GetChannel();
1088
1090 testUlSpectrumPhy->SetRxSpectrumModel(
1092 ulChannel->AddRx(testUlSpectrumPhy);
1093
1094 testUlSpectrumPhy->SetCellId(1);
1095
1096 testUlSpectrumPhy->TraceConnectWithoutContext(
1097 "RxStart",
1099
1100 std::vector<bool> expectedDlRbCenterArea;
1101 expectedDlRbCenterArea.resize(m_dlBandwidth, false);
1102 std::vector<bool> expectedUlRbCenterArea;
1103 expectedUlRbCenterArea.resize(m_ulBandwidth, false);
1104 for (uint32_t i = 0; i < 6; i++)
1105 {
1106 expectedDlRbCenterArea[i] = true;
1107 expectedUlRbCenterArea[i] = true;
1108 }
1109
1110 std::vector<bool> expectedDlRbEdgeArea;
1111 expectedDlRbEdgeArea.resize(m_dlBandwidth, false);
1112 std::vector<bool> expectedUlRbEdgeArea;
1113 expectedUlRbEdgeArea.resize(m_ulBandwidth, false);
1114 for (uint32_t i = 12; i < 18; i++)
1115 {
1116 expectedDlRbEdgeArea[i] = true;
1117 expectedUlRbEdgeArea[i] = true;
1118 }
1119
1122 this,
1123 200,
1124 0,
1125 1,
1126 expectedDlRbCenterArea);
1129 this,
1130 0.0150543,
1131 expectedUlRbCenterArea);
1132
1135 this,
1136 800,
1137 0,
1138 2,
1139 expectedDlRbEdgeArea);
1142 this,
1143 0.199526,
1144 expectedUlRbEdgeArea);
1145
1148 this,
1149 200,
1150 0,
1151 1,
1152 expectedDlRbCenterArea);
1155 this,
1156 0.0150543,
1157 expectedUlRbCenterArea);
1158
1159 Simulator::Stop(Seconds(1.500));
1161
1162 NS_TEST_ASSERT_MSG_EQ(m_usedWrongDlRbg, false, "Scheduler used DL RB muted by FFR Algorithm");
1163 NS_TEST_ASSERT_MSG_EQ(m_usedWrongUlRbg, false, "Scheduler used UL RB muted by FFR Algorithm");
1164
1166}
1167
1168LteSoftFrAreaTestCase::LteSoftFrAreaTestCase(std::string name, std::string schedulerType)
1169 : LteFrAreaTestCase(name, schedulerType)
1170{
1171 NS_LOG_INFO("Creating LteSoftFrAreaTestCase");
1172}
1173
1177
1178void
1180{
1181 NS_LOG_DEBUG("LteSoftFrAreaTestCase");
1182
1183 Config::Reset();
1184 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
1185 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
1186 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
1187
1188 double eNbTxPower = 30;
1189 Config::SetDefault("ns3::LteEnbPhy::TxPower", DoubleValue(eNbTxPower));
1190 Config::SetDefault("ns3::LteUePhy::TxPower", DoubleValue(10.0));
1191 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(true));
1192
1193 Config::SetDefault("ns3::LteUePowerControl::ClosedLoop", BooleanValue(true));
1194 Config::SetDefault("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue(false));
1195
1197
1198 // Create Nodes: eNodeB and UE
1199 NodeContainer enbNodes;
1200 NodeContainer ueNodes1;
1201 NodeContainer ueNodes2;
1202 enbNodes.Create(2);
1203 ueNodes1.Create(1);
1204 ueNodes2.Create(1);
1205 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes1, ueNodes2);
1206
1207 /*
1208 * The topology is the following:
1209 *
1210 * eNB1 UE1 eNB2
1211 * | | |
1212 * x ------------ x ------------------------ x ------------ x----UE2
1213 * 200 m 600 m 200 m 20 m
1214 *
1215 */
1216
1218 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // eNB1
1219 positionAlloc->Add(Vector(1000, 0.0, 0.0)); // eNB2
1220 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // UE1
1221 positionAlloc->Add(Vector(1020, 0.0, 0.0)); // UE2
1222 MobilityHelper mobility;
1223 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
1224 mobility.SetPositionAllocator(positionAlloc);
1225 mobility.Install(allNodes);
1226 m_ueMobility = ueNodes1.Get(0)->GetObject<MobilityModel>();
1227
1228 // Disable layer-3 filtering
1229 Config::SetDefault("ns3::LteEnbRrc::RsrpFilterCoefficient", UintegerValue(0));
1230 Config::SetDefault("ns3::LteEnbRrc::RsrqFilterCoefficient", UintegerValue(0));
1231
1232 // Create Devices and install them in the Nodes (eNB and UE)
1233 NetDeviceContainer enbDevs;
1234 NetDeviceContainer ueDevs1;
1235 NetDeviceContainer ueDevs2;
1236 lteHelper->SetSchedulerType(m_schedulerType);
1237
1238 lteHelper->SetFfrAlgorithmType("ns3::LteFrSoftAlgorithm");
1239 lteHelper->SetFfrAlgorithmAttribute("AllowCenterUeUseEdgeSubBand", BooleanValue(false));
1240 lteHelper->SetFfrAlgorithmAttribute("RsrqThreshold", UintegerValue(25));
1241 lteHelper->SetFfrAlgorithmAttribute("CenterPowerOffset",
1243 lteHelper->SetFfrAlgorithmAttribute("EdgePowerOffset",
1245
1246 lteHelper->SetFfrAlgorithmAttribute("DlEdgeSubBandOffset", UintegerValue(8));
1247 lteHelper->SetFfrAlgorithmAttribute("DlEdgeSubBandwidth", UintegerValue(8));
1248 lteHelper->SetFfrAlgorithmAttribute("UlEdgeSubBandOffset", UintegerValue(8));
1249 lteHelper->SetFfrAlgorithmAttribute("UlEdgeSubBandwidth", UintegerValue(8));
1250 enbDevs.Add(lteHelper->InstallEnbDevice(enbNodes.Get(0)));
1251
1252 lteHelper->SetFfrAlgorithmType("ns3::LteFrNoOpAlgorithm");
1253 enbDevs.Add(lteHelper->InstallEnbDevice(enbNodes.Get(1)));
1254
1255 ueDevs1 = lteHelper->InstallUeDevice(ueNodes1);
1256 ueDevs2 = lteHelper->InstallUeDevice(ueNodes2);
1257
1258 // Attach a UE to a eNB
1259 lteHelper->Attach(ueDevs1, enbDevs.Get(0));
1260 lteHelper->Attach(ueDevs2, enbDevs.Get(1));
1261
1262 // Activate the default EPS bearer
1263 // Since this test includes the Token Bank Fair Queue Scheduler
1264 //(ns3::FdTbfqFfMacScheduler) we have to treat the default
1265 // bearer as the dedicated bearer with QoS.
1267 qos.mbrUl = 1e6;
1268 qos.mbrDl = 1e6;
1269 qos.gbrUl = 1e4;
1270 qos.gbrDl = 1e4;
1271
1273 EpsBearer bearer(q, qos);
1274 lteHelper->ActivateDataRadioBearer(ueDevs1, bearer);
1275 lteHelper->ActivateDataRadioBearer(ueDevs2, bearer);
1276
1277 // Test SpectrumPhy to get signals form DL channel
1278 Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get(0)
1279 ->GetObject<LteEnbNetDevice>()
1280 ->GetPhy()
1281 ->GetDownlinkSpectrumPhy()
1283 Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel();
1284
1286 Ptr<LteEnbNetDevice> eNbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
1287 testDlSpectrumPhy->SetRxSpectrumModel(
1289 dlChannel->AddRx(testDlSpectrumPhy);
1290
1291 testDlSpectrumPhy->SetCellId(1);
1292
1293 testDlSpectrumPhy->TraceConnectWithoutContext(
1294 "RxStart",
1296
1297 // Test SpectrumPhy to get signals form UL channel
1298 Ptr<LteSpectrumPhy> ueUlSpectrumPhy = ueDevs1.Get(0)
1299 ->GetObject<LteUeNetDevice>()
1300 ->GetPhy()
1301 ->GetUplinkSpectrumPhy()
1303 Ptr<SpectrumChannel> ulChannel = ueUlSpectrumPhy->GetChannel();
1304
1306 testUlSpectrumPhy->SetRxSpectrumModel(
1308 ulChannel->AddRx(testUlSpectrumPhy);
1309
1310 testUlSpectrumPhy->SetCellId(1);
1311
1312 testUlSpectrumPhy->TraceConnectWithoutContext(
1313 "RxStart",
1315
1316 std::vector<bool> expectedDlRbCenterArea;
1317 expectedDlRbCenterArea.resize(m_dlBandwidth, false);
1318 std::vector<bool> expectedUlRbCenterArea;
1319 expectedUlRbCenterArea.resize(m_ulBandwidth, false);
1320 for (uint32_t i = 0; i < 8; i++)
1321 {
1322 expectedDlRbCenterArea[i] = true;
1323 expectedUlRbCenterArea[i] = true;
1324 }
1325 for (uint32_t i = 16; i < 25; i++)
1326 {
1327 expectedDlRbCenterArea[i] = true;
1328 }
1329
1330 std::vector<bool> expectedDlRbEdgeArea;
1331 expectedDlRbEdgeArea.resize(m_dlBandwidth, false);
1332 std::vector<bool> expectedUlRbEdgeArea;
1333 expectedUlRbEdgeArea.resize(m_ulBandwidth, false);
1334 for (uint32_t i = 8; i < 16; i++)
1335 {
1336 expectedDlRbEdgeArea[i] = true;
1337 expectedUlRbEdgeArea[i] = true;
1338 }
1339
1342 this,
1343 200,
1344 0,
1345 1,
1346 expectedDlRbCenterArea);
1349 this,
1350 0.0150543,
1351 expectedUlRbCenterArea);
1352
1355 this,
1356 800,
1357 0,
1358 2,
1359 expectedDlRbEdgeArea);
1362 this,
1363 0.199526,
1364 expectedUlRbEdgeArea);
1365
1368 this,
1369 200,
1370 0,
1371 1,
1372 expectedDlRbCenterArea);
1375 this,
1376 0.0150543,
1377 expectedUlRbCenterArea);
1378
1379 Simulator::Stop(Seconds(1.500));
1381
1382#if 0
1384 "Scheduler used DL RBG muted by FFR Algorithm");
1385
1386#endif
1387 NS_TEST_ASSERT_MSG_EQ(m_usedWrongUlRbg, false, "Scheduler used UL RB muted by FFR Algorithm");
1388
1390}
1391
1392LteSoftFfrAreaTestCase::LteSoftFfrAreaTestCase(std::string name, std::string schedulerType)
1393 : LteFrAreaTestCase(name, schedulerType)
1394{
1395 NS_LOG_INFO("Creating LteSoftFfrAreaTestCase");
1396}
1397
1401
1402void
1404{
1405 NS_LOG_DEBUG("LteSoftFfrAreaTestCase");
1406
1407 Config::Reset();
1408 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
1409 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
1410 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
1411
1412 double eNbTxPower = 30;
1413 Config::SetDefault("ns3::LteEnbPhy::TxPower", DoubleValue(eNbTxPower));
1414 Config::SetDefault("ns3::LteUePhy::TxPower", DoubleValue(10.0));
1415 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(true));
1416
1417 Config::SetDefault("ns3::LteUePowerControl::ClosedLoop", BooleanValue(true));
1418 Config::SetDefault("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue(false));
1419
1421
1422 // Create Nodes: eNodeB and UE
1423 NodeContainer enbNodes;
1424 NodeContainer ueNodes1;
1425 NodeContainer ueNodes2;
1426 enbNodes.Create(2);
1427 ueNodes1.Create(1);
1428 ueNodes2.Create(1);
1429 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes1, ueNodes2);
1430
1431 /*
1432 * The topology is the following:
1433 *
1434 * eNB1 UE1 eNB2
1435 * | | |
1436 * x ------------ x ------------------------ x ------------ x----UE2
1437 * 200 m 600 m 200 m 20 m
1438 *
1439 */
1440
1442 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // eNB1
1443 positionAlloc->Add(Vector(1000, 0.0, 0.0)); // eNB2
1444 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // UE1
1445 positionAlloc->Add(Vector(1020, 0.0, 0.0)); // UE2
1446 MobilityHelper mobility;
1447 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
1448 mobility.SetPositionAllocator(positionAlloc);
1449 mobility.Install(allNodes);
1450 m_ueMobility = ueNodes1.Get(0)->GetObject<MobilityModel>();
1451
1452 // Disable layer-3 filtering
1453 Config::SetDefault("ns3::LteEnbRrc::RsrpFilterCoefficient", UintegerValue(0));
1454 Config::SetDefault("ns3::LteEnbRrc::RsrqFilterCoefficient", UintegerValue(0));
1455
1456 // Create Devices and install them in the Nodes (eNB and UE)
1457 NetDeviceContainer enbDevs;
1458 NetDeviceContainer ueDevs1;
1459 NetDeviceContainer ueDevs2;
1460 lteHelper->SetSchedulerType(m_schedulerType);
1461
1462 lteHelper->SetFfrAlgorithmType("ns3::LteFfrSoftAlgorithm");
1463 lteHelper->SetFfrAlgorithmAttribute("CenterRsrqThreshold", UintegerValue(28));
1464 lteHelper->SetFfrAlgorithmAttribute("EdgeRsrqThreshold", UintegerValue(18));
1465 lteHelper->SetFfrAlgorithmAttribute("CenterAreaPowerOffset",
1467 lteHelper->SetFfrAlgorithmAttribute("MediumAreaPowerOffset",
1469 lteHelper->SetFfrAlgorithmAttribute("EdgeAreaPowerOffset",
1471
1472 lteHelper->SetFfrAlgorithmAttribute("UlCommonSubBandwidth", UintegerValue(6));
1473 lteHelper->SetFfrAlgorithmAttribute("DlCommonSubBandwidth", UintegerValue(6));
1474
1475 lteHelper->SetFfrAlgorithmAttribute("DlEdgeSubBandOffset", UintegerValue(6));
1476 lteHelper->SetFfrAlgorithmAttribute("DlEdgeSubBandwidth", UintegerValue(6));
1477 lteHelper->SetFfrAlgorithmAttribute("UlEdgeSubBandOffset", UintegerValue(6));
1478 lteHelper->SetFfrAlgorithmAttribute("UlEdgeSubBandwidth", UintegerValue(6));
1479 enbDevs.Add(lteHelper->InstallEnbDevice(enbNodes.Get(0)));
1480
1481 lteHelper->SetFfrAlgorithmType("ns3::LteFrNoOpAlgorithm");
1482 enbDevs.Add(lteHelper->InstallEnbDevice(enbNodes.Get(1)));
1483
1484 ueDevs1 = lteHelper->InstallUeDevice(ueNodes1);
1485 ueDevs2 = lteHelper->InstallUeDevice(ueNodes2);
1486
1487 // Attach a UE to a eNB
1488 lteHelper->Attach(ueDevs1, enbDevs.Get(0));
1489 lteHelper->Attach(ueDevs2, enbDevs.Get(1));
1490
1491 // Activate the default EPS bearer
1492 // Since this test includes the Token Bank Fair Queue Scheduler
1493 //(ns3::FdTbfqFfMacScheduler) we have to treat the default
1494 // bearer as the dedicated bearer with QoS.
1496 qos.mbrUl = 1e6;
1497 qos.mbrDl = 1e6;
1498 qos.gbrUl = 1e4;
1499 qos.gbrDl = 1e4;
1500
1502 EpsBearer bearer(q, qos);
1503 lteHelper->ActivateDataRadioBearer(ueDevs1, bearer);
1504 lteHelper->ActivateDataRadioBearer(ueDevs2, bearer);
1505
1506 // Test SpectrumPhy to get signals form DL channel
1507 Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get(0)
1508 ->GetObject<LteEnbNetDevice>()
1509 ->GetPhy()
1510 ->GetDownlinkSpectrumPhy()
1512 Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel();
1513
1515 Ptr<LteEnbNetDevice> eNbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
1516 testDlSpectrumPhy->SetRxSpectrumModel(
1518 dlChannel->AddRx(testDlSpectrumPhy);
1519
1520 testDlSpectrumPhy->SetCellId(1);
1521
1522 testDlSpectrumPhy->TraceConnectWithoutContext(
1523 "RxStart",
1525
1526 // Test SpectrumPhy to get signals form UL channel
1527 Ptr<LteSpectrumPhy> ueUlSpectrumPhy = ueDevs1.Get(0)
1528 ->GetObject<LteUeNetDevice>()
1529 ->GetPhy()
1530 ->GetUplinkSpectrumPhy()
1532 Ptr<SpectrumChannel> ulChannel = ueUlSpectrumPhy->GetChannel();
1533
1535 testUlSpectrumPhy->SetRxSpectrumModel(
1537 ulChannel->AddRx(testUlSpectrumPhy);
1538
1539 testUlSpectrumPhy->SetCellId(1);
1540
1541 testUlSpectrumPhy->TraceConnectWithoutContext(
1542 "RxStart",
1544
1545 double expectedDlPowerCenterArea = 0.5;
1546 std::vector<bool> expectedDlRbCenterArea;
1547 expectedDlRbCenterArea.resize(m_dlBandwidth, false);
1548 std::vector<bool> expectedUlRbCenterArea;
1549 expectedUlRbCenterArea.resize(m_ulBandwidth, false);
1550 for (uint32_t i = 6; i < 12; i++)
1551 {
1552 expectedDlRbCenterArea[i] = true;
1553 expectedUlRbCenterArea[i] = true;
1554 }
1555 for (uint32_t i = 18; i < 25; i++)
1556 {
1557 expectedDlRbCenterArea[i] = true;
1558 expectedUlRbCenterArea[i] = true;
1559 }
1560
1561 double expectedDlPowerMiddleArea = 1.0;
1562 std::vector<bool> expectedDlRbMiddleArea;
1563 expectedDlRbMiddleArea.resize(m_dlBandwidth, false);
1564 std::vector<bool> expectedUlRbMiddleArea;
1565 expectedUlRbMiddleArea.resize(m_ulBandwidth, false);
1566 for (uint32_t i = 0; i < 6; i++)
1567 {
1568 expectedDlRbMiddleArea[i] = true;
1569 expectedUlRbMiddleArea[i] = true;
1570 }
1571
1572 double expectedDlPowerEdgeArea = 2.0;
1573 std::vector<bool> expectedDlRbEdgeArea;
1574 expectedDlRbEdgeArea.resize(m_dlBandwidth, false);
1575 std::vector<bool> expectedUlRbEdgeArea;
1576 expectedUlRbEdgeArea.resize(m_ulBandwidth, false);
1577 for (uint32_t i = 12; i < 18; i++)
1578 {
1579 expectedDlRbEdgeArea[i] = true;
1580 expectedUlRbEdgeArea[i] = true;
1581 }
1582
1585 this,
1586 200,
1587 0,
1588 expectedDlPowerCenterArea,
1589 expectedDlRbCenterArea);
1592 this,
1593 0.0150543,
1594 expectedUlRbCenterArea);
1595
1598 this,
1599 600,
1600 0,
1601 expectedDlPowerMiddleArea,
1602 expectedDlRbMiddleArea);
1605 this,
1606 0.135489,
1607 expectedUlRbMiddleArea);
1608
1611 this,
1612 800,
1613 0,
1614 expectedDlPowerEdgeArea,
1615 expectedDlRbEdgeArea);
1618 this,
1619 0.199526,
1620 expectedUlRbEdgeArea);
1621
1624 this,
1625 600,
1626 0,
1627 expectedDlPowerMiddleArea,
1628 expectedDlRbMiddleArea);
1631 this,
1632 0.135489,
1633 expectedUlRbMiddleArea);
1634
1637 this,
1638 200,
1639 0,
1640 expectedDlPowerCenterArea,
1641 expectedDlRbCenterArea);
1644 this,
1645 0.0150543,
1646 expectedUlRbCenterArea);
1647
1648 Simulator::Stop(Seconds(2.500));
1650
1651 NS_TEST_ASSERT_MSG_EQ(m_usedWrongDlRbg, false, "Scheduler used DL RBG muted by FFR Algorithm");
1652
1653 NS_TEST_ASSERT_MSG_EQ(m_usedWrongUlRbg, false, "Scheduler used UL RB muted by FFR Algorithm");
1654
1656}
1657
1658LteEnhancedFfrAreaTestCase::LteEnhancedFfrAreaTestCase(std::string name, std::string schedulerType)
1659 : LteFrAreaTestCase(name, schedulerType)
1660{
1661 NS_LOG_INFO("Creating LteEnhancedFfrAreaTestCase");
1662}
1663
1667
1668void
1670{
1671 NS_LOG_DEBUG("LteEnhancedFfrAreaTestCase");
1672
1673 Config::Reset();
1674 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
1675 Config::SetDefault("ns3::LteHelper::UsePdschForCqiGeneration", BooleanValue(true));
1676 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
1677 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
1678
1679 double eNbTxPower = 30;
1680 Config::SetDefault("ns3::LteEnbPhy::TxPower", DoubleValue(eNbTxPower));
1681 Config::SetDefault("ns3::LteUePhy::TxPower", DoubleValue(10.0));
1682 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(true));
1683
1684 Config::SetDefault("ns3::LteUePowerControl::ClosedLoop", BooleanValue(true));
1685 Config::SetDefault("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue(false));
1686
1688
1689 // Create Nodes: eNodeB and UE
1690 NodeContainer enbNodes;
1691 NodeContainer ueNodes1;
1692 NodeContainer ueNodes2;
1693 enbNodes.Create(2);
1694 ueNodes1.Create(1);
1695 ueNodes2.Create(1);
1696 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes1, ueNodes2);
1697
1698 /*
1699 * The topology is the following:
1700 *
1701 * eNB1 UE1 eNB2
1702 * | | |
1703 * x ------------ x ------------------------ x ------------ x----UE2
1704 * 200 m 600 m 200 m 20 m
1705 *
1706 */
1707
1709 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // eNB1
1710 positionAlloc->Add(Vector(1000, 0.0, 0.0)); // eNB2
1711 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // UE1
1712 positionAlloc->Add(Vector(1020, 0.0, 0.0)); // UE2
1713 MobilityHelper mobility;
1714 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
1715 mobility.SetPositionAllocator(positionAlloc);
1716 mobility.Install(allNodes);
1717 m_ueMobility = ueNodes1.Get(0)->GetObject<MobilityModel>();
1718
1719 // Disable layer-3 filtering
1720 Config::SetDefault("ns3::LteEnbRrc::RsrpFilterCoefficient", UintegerValue(0));
1721 Config::SetDefault("ns3::LteEnbRrc::RsrqFilterCoefficient", UintegerValue(0));
1722
1723 // Create Devices and install them in the Nodes (eNB and UE)
1724 NetDeviceContainer enbDevs;
1725 NetDeviceContainer ueDevs1;
1726 NetDeviceContainer ueDevs2;
1727 lteHelper->SetSchedulerType(m_schedulerType);
1728 lteHelper->SetSchedulerAttribute("HarqEnabled", BooleanValue(true));
1729
1730 lteHelper->SetEnbDeviceAttribute("DlBandwidth", UintegerValue(m_dlBandwidth));
1731 lteHelper->SetEnbDeviceAttribute("UlBandwidth", UintegerValue(m_ulBandwidth));
1732
1733 lteHelper->SetFfrAlgorithmType("ns3::LteFfrEnhancedAlgorithm");
1734 lteHelper->SetFfrAlgorithmAttribute("RsrqThreshold", UintegerValue(25));
1735 lteHelper->SetFfrAlgorithmAttribute("DlCqiThreshold", UintegerValue(10));
1736 lteHelper->SetFfrAlgorithmAttribute("UlCqiThreshold", UintegerValue(15));
1737 lteHelper->SetFfrAlgorithmAttribute("CenterAreaPowerOffset",
1739 lteHelper->SetFfrAlgorithmAttribute("EdgeAreaPowerOffset",
1741
1742 lteHelper->SetFfrAlgorithmAttribute("UlSubBandOffset", UintegerValue(0));
1743 lteHelper->SetFfrAlgorithmAttribute("UlReuse3SubBandwidth", UintegerValue(4));
1744 lteHelper->SetFfrAlgorithmAttribute("UlReuse1SubBandwidth", UintegerValue(4));
1745
1746 lteHelper->SetFfrAlgorithmAttribute("DlSubBandOffset", UintegerValue(0));
1747 lteHelper->SetFfrAlgorithmAttribute("DlReuse3SubBandwidth", UintegerValue(4));
1748 lteHelper->SetFfrAlgorithmAttribute("DlReuse1SubBandwidth", UintegerValue(4));
1749
1750 enbDevs.Add(lteHelper->InstallEnbDevice(enbNodes.Get(0)));
1751
1752 lteHelper->SetFfrAlgorithmType("ns3::LteFrNoOpAlgorithm");
1753 enbDevs.Add(lteHelper->InstallEnbDevice(enbNodes.Get(1)));
1754
1755 ueDevs1 = lteHelper->InstallUeDevice(ueNodes1);
1756 ueDevs2 = lteHelper->InstallUeDevice(ueNodes2);
1757
1758 // Attach a UE to a eNB
1759 lteHelper->Attach(ueDevs1, enbDevs.Get(0));
1760 lteHelper->Attach(ueDevs2, enbDevs.Get(1));
1761
1762 // Activate the default EPS bearer
1763 // Since this test includes the Token Bank Fair Queue Scheduler
1764 //(ns3::FdTbfqFfMacScheduler) we have to treat the default
1765 // bearer as the dedicated bearer with QoS.
1767 qos.mbrUl = 1e6;
1768 qos.mbrDl = 1e6;
1769 qos.gbrUl = 1e4;
1770 qos.gbrDl = 1e4;
1771
1773 EpsBearer bearer(q, qos);
1774 lteHelper->ActivateDataRadioBearer(ueDevs1, bearer);
1775 lteHelper->ActivateDataRadioBearer(ueDevs2, bearer);
1776
1777 // Test SpectrumPhy to get signals form DL channel
1778 Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get(0)
1779 ->GetObject<LteEnbNetDevice>()
1780 ->GetPhy()
1781 ->GetDownlinkSpectrumPhy()
1783 Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel();
1784
1786 Ptr<LteEnbNetDevice> eNbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
1787 testDlSpectrumPhy->SetRxSpectrumModel(
1789 dlChannel->AddRx(testDlSpectrumPhy);
1790
1791 testDlSpectrumPhy->SetCellId(1);
1792
1793 testDlSpectrumPhy->TraceConnectWithoutContext(
1794 "RxStart",
1796
1797 // Test SpectrumPhy to get signals form UL channel
1798 Ptr<LteSpectrumPhy> ueUlSpectrumPhy = ueDevs1.Get(0)
1799 ->GetObject<LteUeNetDevice>()
1800 ->GetPhy()
1801 ->GetUplinkSpectrumPhy()
1803 Ptr<SpectrumChannel> ulChannel = ueUlSpectrumPhy->GetChannel();
1804
1806 testUlSpectrumPhy->SetRxSpectrumModel(
1808 ulChannel->AddRx(testUlSpectrumPhy);
1809
1810 testUlSpectrumPhy->SetCellId(1);
1811
1812 testUlSpectrumPhy->TraceConnectWithoutContext(
1813 "RxStart",
1815
1816 double expectedDlPowerCenterArea = 0.251189;
1817 std::vector<bool> expectedDlRbCenterArea;
1818 expectedDlRbCenterArea.resize(m_dlBandwidth, false);
1819 std::vector<bool> expectedUlRbCenterArea;
1820 expectedUlRbCenterArea.resize(m_ulBandwidth, false);
1821 for (uint32_t i = 0; i < 8; i++)
1822 {
1823 expectedDlRbCenterArea[i] = true;
1824 expectedUlRbCenterArea[i] = true;
1825 }
1826 for (uint32_t i = 12; i < 16; i++)
1827 {
1828 expectedDlRbCenterArea[i] = true;
1829 expectedUlRbCenterArea[i] = true;
1830 }
1831 for (uint32_t i = 20; i < 24; i++)
1832 {
1833 expectedDlRbCenterArea[i] = true;
1834 expectedUlRbCenterArea[i] = true;
1835 }
1836
1837 double expectedDlPowerMiddleArea = 0.251189;
1838 std::vector<bool> expectedDlRbMiddleArea;
1839 expectedDlRbMiddleArea.resize(m_dlBandwidth, false);
1840 std::vector<bool> expectedUlRbMiddleArea;
1841 expectedUlRbMiddleArea.resize(m_ulBandwidth, false);
1842 for (uint32_t i = 4; i < 8; i++)
1843 {
1844 expectedDlRbMiddleArea[i] = true;
1845 expectedUlRbMiddleArea[i] = true;
1846 }
1847
1848 double expectedDlPowerEdgeArea = 1.0;
1849 std::vector<bool> expectedDlRbEdgeArea;
1850 expectedDlRbEdgeArea.resize(m_dlBandwidth, false);
1851 std::vector<bool> expectedUlRbEdgeArea;
1852 expectedUlRbEdgeArea.resize(m_ulBandwidth, false);
1853 for (uint32_t i = 0; i < 4; i++)
1854 {
1855 expectedDlRbEdgeArea[i] = true;
1856 expectedUlRbEdgeArea[i] = true;
1857 }
1858
1861 this,
1862 100,
1863 0,
1864 expectedDlPowerCenterArea,
1865 expectedDlRbCenterArea);
1868 this,
1869 0.00250905,
1870 expectedUlRbCenterArea);
1871
1874 this,
1875 300,
1876 0,
1877 expectedDlPowerMiddleArea,
1878 expectedDlRbMiddleArea);
1881 this,
1882 0.0225815,
1883 expectedUlRbMiddleArea);
1884
1887 this,
1888 600,
1889 0,
1890 expectedDlPowerEdgeArea,
1891 expectedDlRbEdgeArea);
1894 this,
1895 0.0903259,
1896 expectedUlRbEdgeArea);
1897
1900 this,
1901 100,
1902 0,
1903 expectedDlPowerCenterArea,
1904 expectedDlRbCenterArea);
1907 this,
1908 0.00250905,
1909 expectedUlRbCenterArea);
1910
1913 this,
1914 300,
1915 0,
1916 expectedDlPowerMiddleArea,
1917 expectedDlRbMiddleArea);
1920 this,
1921 0.0225815,
1922 expectedUlRbCenterArea);
1923
1924 Simulator::Stop(Seconds(2.500));
1926
1927 NS_TEST_ASSERT_MSG_EQ(m_usedWrongDlRbg, false, "Scheduler used DL RBG muted by FFR Algorithm");
1928
1929 NS_TEST_ASSERT_MSG_EQ(m_usedWrongUlRbg, false, "Scheduler used UL RB muted by FFR Algorithm");
1930
1932}
1933
1935 std::string schedulerType)
1936 : LteFrAreaTestCase(name, schedulerType)
1937{
1938 NS_LOG_INFO("Creating LteDistributedFfrAreaTestCase");
1939}
1940
1944
1945void
1947{
1948 NS_LOG_DEBUG("LteDistributedFfrAreaTestCase");
1949
1950 Config::Reset();
1951 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
1952 Config::SetDefault("ns3::LteHelper::UsePdschForCqiGeneration", BooleanValue(true));
1953 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
1954 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
1955
1956 double eNbTxPower = 30;
1957 Config::SetDefault("ns3::LteEnbPhy::TxPower", DoubleValue(eNbTxPower));
1958 Config::SetDefault("ns3::LteUePhy::TxPower", DoubleValue(10.0));
1959 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(true));
1960
1961 Config::SetDefault("ns3::LteUePowerControl::ClosedLoop", BooleanValue(true));
1962 Config::SetDefault("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue(false));
1963
1964 // Disable layer-3 filtering
1965 Config::SetDefault("ns3::LteEnbRrc::RsrpFilterCoefficient", UintegerValue(0));
1966 Config::SetDefault("ns3::LteEnbRrc::RsrqFilterCoefficient", UintegerValue(0));
1967
1968 uint16_t bandwidth = 25;
1969
1972 lteHelper->SetEpcHelper(epcHelper);
1973 lteHelper->SetHandoverAlgorithmType("ns3::NoOpHandoverAlgorithm"); // disable automatic handover
1974
1975 Ptr<Node> pgw = epcHelper->GetPgwNode();
1976
1977 // Create a single RemoteHost
1978 NodeContainer remoteHostContainer;
1979 remoteHostContainer.Create(1);
1980 Ptr<Node> remoteHost = remoteHostContainer.Get(0);
1981 InternetStackHelper internet;
1982 internet.Install(remoteHostContainer);
1983
1984 // Create the Internet
1985 PointToPointHelper p2ph;
1986 p2ph.SetDeviceAttribute("DataRate", DataRateValue(DataRate("100Gb/s")));
1987 p2ph.SetDeviceAttribute("Mtu", UintegerValue(1500));
1988 p2ph.SetChannelAttribute("Delay", TimeValue(Seconds(0.010)));
1989 NetDeviceContainer internetDevices = p2ph.Install(pgw, remoteHost);
1990 Ipv4AddressHelper ipv4h;
1991 ipv4h.SetBase("1.0.0.0", "255.0.0.0");
1992 Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign(internetDevices);
1993 Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress(1);
1994
1995 // Routing of the Internet Host (towards the LTE network)
1996 Ipv4StaticRoutingHelper ipv4RoutingHelper;
1997 Ptr<Ipv4StaticRouting> remoteHostStaticRouting =
1998 ipv4RoutingHelper.GetStaticRouting(remoteHost->GetObject<Ipv4>());
1999 // interface 0 is localhost, 1 is the p2p device
2000 remoteHostStaticRouting->AddNetworkRouteTo(Ipv4Address("7.0.0.0"), Ipv4Mask("255.0.0.0"), 1);
2001
2002 // Create Nodes: eNodeB and UE
2003 NodeContainer enbNodes;
2004 NodeContainer ueNodes1;
2005 NodeContainer ueNodes2;
2006 enbNodes.Create(2);
2007 ueNodes1.Create(2);
2008 ueNodes2.Create(1);
2009 NodeContainer ueNodes = NodeContainer(ueNodes1, ueNodes2);
2010 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes1, ueNodes2);
2011
2012 /*
2013 * The topology is the following:
2014 *
2015 * eNB1 UE1 UE2 eNB2
2016 * | | | |
2017 * x ------------ x ------------------------ x ------------ x
2018 * 200 m 600 m 200 m
2019 *
2020 */
2021
2022 // Install Mobility Model
2024 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // eNB1
2025 positionAlloc->Add(Vector(1000, 0.0, 0.0)); // eNB2
2026
2027 positionAlloc->Add(Vector(200, 0.0, 0.0)); // UE1
2028 positionAlloc->Add(Vector(200, 0.0, 0.0)); // UE1
2029 positionAlloc->Add(Vector(800, 0.0, 0.0)); // UE2
2030
2031 MobilityHelper mobility;
2032 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
2033 mobility.SetPositionAllocator(positionAlloc);
2034 mobility.Install(allNodes);
2035 m_ueMobility = ueNodes2.Get(0)->GetObject<MobilityModel>();
2036
2037 // Create Devices and install them in the Nodes (eNB and UE)
2038 NetDeviceContainer enbDevs;
2039 NetDeviceContainer ueDevs1;
2040 NetDeviceContainer ueDevs2;
2041 lteHelper->SetSchedulerType(m_schedulerType);
2042
2043 lteHelper->SetEnbDeviceAttribute("DlBandwidth", UintegerValue(bandwidth));
2044 lteHelper->SetEnbDeviceAttribute("UlBandwidth", UintegerValue(bandwidth));
2045
2046 lteHelper->SetFfrAlgorithmType("ns3::LteFfrDistributedAlgorithm");
2047 lteHelper->SetFfrAlgorithmAttribute("CalculationInterval", TimeValue(MilliSeconds(10)));
2048 lteHelper->SetFfrAlgorithmAttribute("RsrqThreshold", UintegerValue(25));
2049 lteHelper->SetFfrAlgorithmAttribute("RsrpDifferenceThreshold", UintegerValue(5));
2050 lteHelper->SetFfrAlgorithmAttribute("EdgeRbNum", UintegerValue(6));
2051 lteHelper->SetFfrAlgorithmAttribute("CenterPowerOffset",
2053 lteHelper->SetFfrAlgorithmAttribute("EdgePowerOffset",
2055
2056 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
2057 ueDevs1 = lteHelper->InstallUeDevice(ueNodes1);
2058 ueDevs2 = lteHelper->InstallUeDevice(ueNodes2);
2059
2060 NetDeviceContainer ueLteDevs;
2061 ueLteDevs.Add(ueDevs1);
2062 ueLteDevs.Add(ueDevs2);
2063
2064 // Add X2 interface
2065 lteHelper->AddX2Interface(enbNodes);
2066
2067 // Install the IP stack on the UEs
2068 internet.Install(ueNodes);
2069 Ipv4InterfaceContainer ueIpIfaces;
2070 ueIpIfaces = epcHelper->AssignUeIpv4Address(NetDeviceContainer(ueLteDevs));
2071 // Assign IP address to UEs, and install applications
2072 for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
2073 {
2074 Ptr<Node> ueNode = ueNodes.Get(u);
2075 // Set the default gateway for the UE
2076 Ptr<Ipv4StaticRouting> ueStaticRouting =
2077 ipv4RoutingHelper.GetStaticRouting(ueNode->GetObject<Ipv4>());
2078 ueStaticRouting->SetDefaultRoute(epcHelper->GetUeDefaultGatewayAddress(), 1);
2079 }
2080
2081 // Attach a UE to a eNB
2082 lteHelper->Attach(ueDevs1, enbDevs.Get(0));
2083 lteHelper->Attach(ueDevs2, enbDevs.Get(1));
2084
2085 // Install and start applications on UEs and remote host
2086 uint16_t dlPort = 10000;
2087 uint16_t ulPort = 20000;
2088
2089 // randomize a bit start times to avoid simulation artifacts
2090 // (e.g., buffer overflows due to packet transmissions happening
2091 // exactly at the same time)
2093 startTimeSeconds->SetAttribute("Min", DoubleValue(0));
2094 startTimeSeconds->SetAttribute("Max", DoubleValue(0.010));
2095
2096 for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
2097 {
2098 Ptr<Node> ue = ueNodes.Get(u);
2099 // Set the default gateway for the UE
2100 Ptr<Ipv4StaticRouting> ueStaticRouting =
2101 ipv4RoutingHelper.GetStaticRouting(ue->GetObject<Ipv4>());
2102 ueStaticRouting->SetDefaultRoute(epcHelper->GetUeDefaultGatewayAddress(), 1);
2103
2104 for (uint32_t b = 0; b < 1; ++b)
2105 {
2106 ++dlPort;
2107 ++ulPort;
2108
2109 ApplicationContainer clientApps;
2110 ApplicationContainer serverApps;
2111
2112 NS_LOG_LOGIC("installing UDP DL app for UE " << u);
2113 UdpClientHelper dlClientHelper(ueIpIfaces.GetAddress(u), dlPort);
2114 dlClientHelper.SetAttribute("MaxPackets", UintegerValue(1000000));
2115 dlClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1)));
2116 clientApps.Add(dlClientHelper.Install(remoteHost));
2117 PacketSinkHelper dlPacketSinkHelper("ns3::UdpSocketFactory",
2119 serverApps.Add(dlPacketSinkHelper.Install(ue));
2120
2121 NS_LOG_LOGIC("installing UDP UL app for UE " << u);
2122 UdpClientHelper ulClientHelper(remoteHostAddr, ulPort);
2123 ulClientHelper.SetAttribute("MaxPackets", UintegerValue(1000000));
2124 ulClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1)));
2125 clientApps.Add(ulClientHelper.Install(ue));
2126 PacketSinkHelper ulPacketSinkHelper("ns3::UdpSocketFactory",
2128 serverApps.Add(ulPacketSinkHelper.Install(remoteHost));
2129
2132 dlpf.localPortStart = dlPort;
2133 dlpf.localPortEnd = dlPort;
2134 tft->Add(dlpf);
2136 ulpf.remotePortStart = ulPort;
2137 ulpf.remotePortEnd = ulPort;
2138 tft->Add(ulpf);
2139 // Since this test includes the Token Bank Fair Queue Scheduler
2140 //(ns3::FdTbfqFfMacScheduler) we have to use GBR bearer with
2141 // certain QoS.
2143 qos.mbrUl = 1e6;
2144 qos.mbrDl = 1e6;
2145 qos.gbrUl = 1e4;
2146 qos.gbrDl = 1e4;
2147
2149 EpsBearer bearer(q, qos);
2150 lteHelper->ActivateDedicatedEpsBearer(ueLteDevs.Get(u), bearer, tft);
2151
2152 Time startTime = Seconds(startTimeSeconds->GetValue());
2153 serverApps.Start(startTime);
2154 clientApps.Start(startTime);
2155 }
2156 }
2157
2158 // Test SpectrumPhy to get signals form DL channel
2159 Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get(0)
2160 ->GetObject<LteEnbNetDevice>()
2161 ->GetPhy()
2162 ->GetDownlinkSpectrumPhy()
2164 Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel();
2165
2167 Ptr<LteEnbNetDevice> eNbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
2168 testDlSpectrumPhy->SetRxSpectrumModel(
2170 dlChannel->AddRx(testDlSpectrumPhy);
2171
2172 testDlSpectrumPhy->SetCellId(2);
2173
2174 testDlSpectrumPhy->TraceConnectWithoutContext(
2175 "RxStart",
2177
2178 // Test SpectrumPhy to get signals form UL channel
2179 Ptr<LteSpectrumPhy> ueUlSpectrumPhy = ueDevs1.Get(0)
2180 ->GetObject<LteUeNetDevice>()
2181 ->GetPhy()
2182 ->GetUplinkSpectrumPhy()
2184 Ptr<SpectrumChannel> ulChannel = ueUlSpectrumPhy->GetChannel();
2185
2187 testUlSpectrumPhy->SetRxSpectrumModel(
2189 ulChannel->AddRx(testUlSpectrumPhy);
2190
2191 testUlSpectrumPhy->SetCellId(2);
2192
2193 testUlSpectrumPhy->TraceConnectWithoutContext(
2194 "RxStart",
2196
2197 double expectedDlPowerCenterArea = 1.0;
2198 std::vector<bool> expectedDlRbCenterArea;
2199 expectedDlRbCenterArea.resize(m_dlBandwidth, false);
2200 std::vector<bool> expectedUlRbCenterArea;
2201 expectedUlRbCenterArea.resize(m_ulBandwidth, false);
2202 for (uint32_t i = 0; i < m_dlBandwidth; i++)
2203 {
2204 expectedDlRbCenterArea[i] = true;
2205 expectedUlRbCenterArea[i] = true;
2206 }
2207
2208 double expectedDlPowerEdgeArea = 2.0;
2209 std::vector<bool> expectedDlRbEdgeArea;
2210 expectedDlRbEdgeArea.resize(m_dlBandwidth, false);
2211 std::vector<bool> expectedUlRbEdgeArea;
2212 expectedUlRbEdgeArea.resize(m_ulBandwidth, false);
2213 for (uint32_t i = 0; i < 6; i++)
2214 {
2215 expectedDlRbEdgeArea[i] = true;
2216 expectedUlRbEdgeArea[i] = true;
2217 }
2218
2219 std::vector<bool> expectedDlRbEdgeArea2;
2220 expectedDlRbEdgeArea2.resize(m_dlBandwidth, false);
2221 std::vector<bool> expectedUlRbEdgeArea2;
2222 expectedUlRbEdgeArea2.resize(m_dlBandwidth, false);
2223 for (uint32_t i = 6; i < 12; i++)
2224 {
2225 expectedDlRbEdgeArea2[i] = true;
2226 expectedUlRbEdgeArea2[i] = true;
2227 }
2228
2231 this,
2232 800,
2233 0,
2234 expectedDlPowerCenterArea,
2235 expectedDlRbCenterArea);
2238 this,
2239 0.0225815,
2240 expectedUlRbCenterArea);
2241
2244 this,
2245 400,
2246 0,
2247 expectedDlPowerEdgeArea,
2248 expectedDlRbEdgeArea);
2251 this,
2252 0.135489,
2253 expectedUlRbEdgeArea);
2254
2257 this,
2258 ueNodes1.Get(0),
2259 600,
2260 0,
2261 expectedDlPowerEdgeArea,
2262 expectedDlRbEdgeArea2);
2265 this,
2266 0.135489,
2267 expectedUlRbEdgeArea2);
2268
2271 this,
2272 ueNodes1.Get(0),
2273 200,
2274 0,
2275 expectedDlPowerEdgeArea,
2276 expectedDlRbEdgeArea);
2279 this,
2280 0.135489,
2281 expectedUlRbEdgeArea);
2282
2285 this,
2286 800,
2287 0,
2288 expectedDlPowerCenterArea,
2289 expectedDlRbCenterArea);
2292 this,
2293 0.0225815,
2294 expectedUlRbCenterArea);
2295
2296 Simulator::Stop(Seconds(2.500));
2298
2299#if 0
2301 "Scheduler used DL RBG muted by FFR Algorithm");
2302#endif
2303
2304 NS_TEST_ASSERT_MSG_EQ(m_usedWrongUlRbg, false, "Scheduler used UL RB muted by FFR Algorithm");
2305
2307}
Lte Distributed Ffr Area Test Case.
LteDistributedFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
void DoRun() override
Implementation to actually run this TestCase.
Lte Enhanced Ffr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
LteEnhancedFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Test frequency reuse algorithm by teleporting UEs to different parts of area and checking if the freq...
Time m_teleportTime
the teleport time
LteFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
bool m_usedWrongUlRbg
used wrong UL RBG?
std::vector< bool > m_expectedDlRb
the expected DL per RB
void SimpleTeleportUe(uint32_t x, uint32_t y)
Simple teleport UE function.
uint16_t m_ulBandwidth
the UL bandwidth
uint16_t m_dlBandwidth
the DL bandwidth
std::vector< bool > m_expectedUlRb
expected UL per RB
void UlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
UL data receive start function.
void TeleportUe2(Ptr< Node > ueNode, uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb)
Teleport UE 2 function.
void DlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
DL data receive start function.
double m_expectedUlPower
expected UL power
std::string m_schedulerType
the scheduler type
void SetUlExpectedValues(double expectedPower, std::vector< bool > expectedDlRb)
Set UL expected values function.
double m_expectedDlPower
the expected DL power
void SetDlExpectedValues(double expectedPower, std::vector< bool > expectedDlRb)
Set DL expected values function.
bool m_usedWrongDlRbg
used wrong DL RBG?
void TeleportUe(uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb)
Teleport UE function.
Ptr< MobilityModel > m_ueMobility
the UE mobility model
void DoRun() override
Implementation to actually run this TestCase.
Test frequency reuse algorithm.
void DlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
DL data receive start function.
uint32_t m_userNum
the number of UE nodes
void UlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
UL data receive start function.
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_dlBandwidth
the DL bandwidth
LteFrTestCase(std::string name, uint32_t userNum, uint16_t dlBandwidth, uint16_t ulBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
uint16_t m_ulBandwidth
the UL bandwidth
bool m_usedMutedDlRbg
used muted DL RBG?
std::vector< bool > m_availableDlRb
the available DL for each RB
std::vector< bool > m_availableUlRb
the available UL for each RB
bool m_usedMutedUlRbg
used muted UL RBG?
Test the fractional frequency reuse algorithms.
Test hard frequency reuse algorithm.
LteHardFrTestCase(std::string name, uint32_t userNum, std::string schedulerType, uint16_t dlBandwidth, uint16_t ulBandwidth, uint8_t dlSubBandOffset, uint16_t dlSubBandwidth, uint8_t ulSubBandOffset, uint16_t ulSubBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
uint8_t m_dlSubBandOffset
the DL subband offset
uint8_t m_ulSubBandwidth
UL subband offset.
uint8_t m_ulSubBandOffset
UL subband offset.
void DoRun() override
Implementation to actually run this TestCase.
uint8_t m_dlSubBandwidth
the DL subband width
std::string m_schedulerType
the scheduler type
Lte Soft Ffr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
LteSoftFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Lte Soft Fr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
LteSoftFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
void DoRun() override
Implementation to actually run this TestCase.
LteStrictFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Test strict frequency reuse algorithm.
uint16_t m_ulCommonSubBandwidth
UL common subbandwidth.
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_dlCommonSubBandwidth
DL common subbandwidth.
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
std::string m_schedulerType
scheduler type
LteStrictFrTestCase(std::string name, uint32_t userNum, std::string schedulerType, uint16_t dlBandwidth, uint16_t ulBandwidth, uint16_t dlCommonSubBandwidth, uint8_t dlEdgeSubBandOffset, uint16_t dlEdgeSubBandwidth, uint16_t ulCommonSubBandwidth, uint8_t ulEdgeSubBandOffset, uint16_t ulEdgeSubBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
uint16_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
uint16_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
holds a vector of ns3::Application pointers.
ApplicationContainer Install(NodeContainer c)
Install an application on each node of the input container configured with all the attributes set wit...
void SetAttribute(const std::string &name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
AttributeValue implementation for Boolean.
Definition boolean.h:26
Class for representing data rates.
Definition data-rate.h:78
AttributeValue implementation for DataRate.
Definition data-rate.h:285
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition double.h:31
This class contains the specification of EPS Bearers.
Definition eps-bearer.h:80
Qci
QoS Class Indicator.
Definition eps-bearer.h:95
@ GBR_CONV_VOICE
GBR Conversational Voice.
Definition eps-bearer.h:96
an Inet address class
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ipv4 addresses are stored in host order in this class.
static Ipv4Address GetAny()
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition ipv4.h:69
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
a class to represent an Ipv4 address mask
Helper class that adds ns3::Ipv4StaticRouting objects.
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
The eNodeB device implementation.
The LteSpectrumPhy models the physical layer of LTE.
static Ptr< SpectrumModel > GetSpectrumModel(uint32_t earfcn, uint16_t bandwidth)
The LteUeNetDevice class implements the UE net device.
Helper class used to assign positions and mobility models to nodes.
Keep track of the current position and velocity of an object.
holds a vector of ns3::NetDevice pointers
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
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.
uint32_t GetN() const
Get the number of Ptr<Node> stored in this container.
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:511
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
NetDeviceContainer Install(NodeContainer c)
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition simulator.h:560
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition simulator.cc:131
static Time Now()
Return the current simulation virtual time.
Definition simulator.cc:197
static void Run()
Run the simulation.
Definition simulator.cc:167
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Definition simulator.cc:175
encapsulates test code
Definition test.h:1050
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition test.cc:292
A suite of tests to run.
Definition test.h:1267
Type
Type of test.
Definition test.h:1274
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
@ S
second
Definition nstime.h:105
AttributeValue implementation for Time.
Definition nstime.h:1431
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Hold an unsigned integer type.
Definition uinteger.h:34
void Reset()
Reset the initial value of every attribute as well as the value of every global to what they were bef...
Definition config.cc:848
void SetDefault(std::string name, const AttributeValue &value)
Definition config.cc:883
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition log.h:257
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition log.h:271
#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:264
static LteFrequencyReuseTestSuite lteFrequencyReuseTestSuite
Static variable for test initialization.
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs &&... bargs)
Make Callbacks with varying number of bound arguments.
Definition callback.h:745
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition object.h:619
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:436
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Definition test.h:134
#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:327
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1344
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1356
void UlDataRxStartNotificationArea(LteFrAreaTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
void UlDataRxStartNotification(LteFrTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
void DlDataRxStartNotification(LteFrTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
TestCase Data.
void DlDataRxStartNotificationArea(LteFrAreaTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
Definition epc-tft.h:60
uint16_t localPortEnd
end of the port number range of the UE
Definition epc-tft.h:121
uint16_t remotePortEnd
end of the port number range of the remote host
Definition epc-tft.h:119
uint16_t remotePortStart
start of the port number range of the remote host
Definition epc-tft.h:118
uint16_t localPortStart
start of the port number range of the UE
Definition epc-tft.h:120
3GPP TS 36.413 9.2.1.18 GBR QoS Information
Definition eps-bearer.h:25
uint64_t gbrDl
Guaranteed Bit Rate (bit/s) in downlink.
Definition eps-bearer.h:31
uint64_t gbrUl
Guaranteed Bit Rate (bit/s) in uplink.
Definition eps-bearer.h:32
uint64_t mbrDl
Maximum Bit Rate (bit/s) in downlink.
Definition eps-bearer.h:33
uint64_t mbrUl
Maximum Bit Rate (bit/s) in uplink.
Definition eps-bearer.h:34