A Discrete-Event Network Simulator
API
lte-test-frequency-reuse.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Piotr Gawlowicz
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
19  *
20  */
21 
22 #ifndef LTE_TEST_DOWNLINK_FR_H
23 #define LTE_TEST_DOWNLINK_FR_H
24 
25 #include "ns3/test.h"
26 #include "ns3/spectrum-value.h"
27 #include <ns3/lte-rrc-sap.h>
28 
29 #include "ns3/spectrum-test.h"
30 #include "ns3/lte-spectrum-value-helper.h"
31 
32 using namespace ns3;
33 
41 {
42 public:
44 };
45 
53 class LteFrTestCase : public TestCase
54 {
55 public:
66  LteFrTestCase (std::string name,
67  uint32_t userNum,uint16_t dlBandwidth,uint16_t ulBandwidth,
68  std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
69  virtual ~LteFrTestCase ();
70 
75  void DlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
80  void UlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
81 
82 protected:
83  virtual void DoRun (void);
84 
85  uint32_t m_userNum;
86  uint16_t m_dlBandwidth;
87  uint16_t m_ulBandwidth;
88 
89  std::vector<bool> m_availableDlRb;
91 
92  std::vector<bool> m_availableUlRb;
94 };
95 
96 
105 {
106 public:
122  LteHardFrTestCase (std::string name, uint32_t userNum,
123  std::string schedulerType,
124  uint16_t dlBandwidth, uint16_t ulBandwidth,
125  uint8_t dlSubBandOffset, uint16_t dlSubBandwidth,
126  uint8_t ulSubBandOffset, uint16_t ulSubBandwidth,
127  std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
128  virtual ~LteHardFrTestCase ();
129 
130 private:
131  virtual void DoRun (void);
132 
133  std::string m_schedulerType;
134 
137 
140 };
141 
150 {
151 public:
169  LteStrictFrTestCase (std::string name, uint32_t userNum,
170  std::string schedulerType,
171  uint16_t dlBandwidth, uint16_t ulBandwidth,
172  uint16_t dlCommonSubBandwidth, uint8_t dlEdgeSubBandOffset, uint16_t dlEdgeSubBandwidth,
173  uint16_t ulCommonSubBandwidth, uint8_t ulEdgeSubBandOffset, uint16_t ulEdgeSubBandwidth,
174  std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
175  virtual ~LteStrictFrTestCase ();
176 
177 private:
178  virtual void DoRun (void);
179 
180  std::string m_schedulerType;
181 
185 
189 };
190 
201 {
202 public:
209  LteFrAreaTestCase (std::string name, std::string schedulerType);
210  virtual ~LteFrAreaTestCase ();
211 
216  void DlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
221  void UlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
222 
228  void SimpleTeleportUe (uint32_t x, uint32_t y);
236  void TeleportUe (uint32_t x, uint32_t y, double expectedPower, std::vector<bool> expectedDlRb);
245  void TeleportUe2 (Ptr<Node> ueNode, uint32_t x, uint32_t y, double expectedPower,
246  std::vector<bool> expectedDlRb);
247 
253  void SetDlExpectedValues (double expectedPower, std::vector<bool> expectedDlRb);
259  void SetUlExpectedValues (double expectedPower, std::vector<bool> expectedDlRb);
260 
261 protected:
262  virtual void DoRun (void);
263 
264  std::string m_schedulerType;
265 
266  uint16_t m_dlBandwidth;
267  uint16_t m_ulBandwidth;
268 
271 
273  std::vector<bool> m_expectedDlRb;
276 
278  std::vector<bool> m_expectedUlRb;
281 
282 };
283 
291 {
292 public:
299  LteStrictFrAreaTestCase (std::string name, std::string schedulerType);
300  virtual ~LteStrictFrAreaTestCase ();
301 
302 private:
303  virtual void DoRun (void);
304 };
305 
313 {
314 public:
321  LteSoftFrAreaTestCase (std::string name, std::string schedulerType);
322  virtual ~LteSoftFrAreaTestCase ();
323 
324 private:
325  virtual void DoRun (void);
326 
327 };
328 
336 {
337 public:
344  LteSoftFfrAreaTestCase (std::string name, std::string schedulerType);
345  virtual ~LteSoftFfrAreaTestCase ();
346 
347 private:
348  virtual void DoRun (void);
349 
350 };
351 
359 {
360 public:
367  LteEnhancedFfrAreaTestCase (std::string name, std::string schedulerType);
368  virtual ~LteEnhancedFfrAreaTestCase ();
369 
370 private:
371  virtual void DoRun (void);
372 
373 };
374 
382 {
383 public:
390  LteDistributedFfrAreaTestCase (std::string name, std::string schedulerType);
391  virtual ~LteDistributedFfrAreaTestCase ();
392 
393 private:
394  virtual void DoRun (void);
395 
396 };
397 
398 #endif /* LTE_TEST_DOWNLINK_FR_H */
LteFrequencyReuseTestSuite
Test the fractional frequency reuse algorithms.
Definition: lte-test-frequency-reuse.h:41
LteStrictFrAreaTestCase
Lte Fr Area Test Case.
Definition: lte-test-frequency-reuse.h:291
LteFrAreaTestCase::m_teleportTime
Time m_teleportTime
the telport time
Definition: lte-test-frequency-reuse.h:269
LteFrAreaTestCase::m_expectedDlPower
double m_expectedDlPower
the expected DL power
Definition: lte-test-frequency-reuse.h:272
LteHardFrTestCase::m_ulSubBandwidth
uint8_t m_ulSubBandwidth
UL subband offset.
Definition: lte-test-frequency-reuse.h:139
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
LteHardFrTestCase::m_ulSubBandOffset
uint8_t m_ulSubBandOffset
UL subband offset.
Definition: lte-test-frequency-reuse.h:138
LteFrAreaTestCase::m_expectedUlPower
double m_expectedUlPower
expected UL power
Definition: lte-test-frequency-reuse.h:277
LteFrTestCase::m_usedMutedUlRbg
bool m_usedMutedUlRbg
used muted UL RBG?
Definition: lte-test-frequency-reuse.h:93
LteStrictFrTestCase
Test stric frequency reuse algorithm.
Definition: lte-test-frequency-reuse.h:150
LteStrictFrTestCase::m_dlCommonSubBandwidth
uint16_t m_dlCommonSubBandwidth
DL common subbandwidth.
Definition: lte-test-frequency-reuse.h:182
LteStrictFrTestCase::m_schedulerType
std::string m_schedulerType
scheduler type
Definition: lte-test-frequency-reuse.h:180
LteHardFrTestCase::m_dlSubBandwidth
uint8_t m_dlSubBandwidth
the DL subband width
Definition: lte-test-frequency-reuse.h:136
LteFrAreaTestCase::m_dlBandwidth
uint16_t m_dlBandwidth
the DL bandwidth
Definition: lte-test-frequency-reuse.h:266
LteFrTestCase
Test frequency reuse algorithm.
Definition: lte-test-frequency-reuse.h:54
LteStrictFrTestCase::m_ulEdgeSubBandwidth
uint16_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
Definition: lte-test-frequency-reuse.h:188
LteStrictFrTestCase::m_ulEdgeSubBandOffset
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
Definition: lte-test-frequency-reuse.h:187
ns3::TestCase
encapsulates test code
Definition: test.h:1154
LteFrTestCase::m_dlBandwidth
uint16_t m_dlBandwidth
the DL bandwidth
Definition: lte-test-frequency-reuse.h:86
LteSoftFfrAreaTestCase
Lte Soft Ffr Area Test Case.
Definition: lte-test-frequency-reuse.h:336
LteFrAreaTestCase
Test frequency reuse algorithm by teleporing UEs to different parts of area and checking if the frequ...
Definition: lte-test-frequency-reuse.h:201
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
LteEnhancedFfrAreaTestCase
Lte Enhanced Ffr Area Test Case.
Definition: lte-test-frequency-reuse.h:359
LteFrAreaTestCase::m_schedulerType
std::string m_schedulerType
the scheduler type
Definition: lte-test-frequency-reuse.h:264
LteFrTestCase::m_usedMutedDlRbg
bool m_usedMutedDlRbg
used muted DL RBG?
Definition: lte-test-frequency-reuse.h:90
LteSoftFrAreaTestCase
Lte Soft Fr Area Test Case.
Definition: lte-test-frequency-reuse.h:313
LteFrAreaTestCase::m_ulBandwidth
uint16_t m_ulBandwidth
the UL bandwidth
Definition: lte-test-frequency-reuse.h:267
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
LteFrAreaTestCase::m_usedWrongDlPower
bool m_usedWrongDlPower
used wrong DL power?
Definition: lte-test-frequency-reuse.h:275
LteFrTestCase::m_availableDlRb
std::vector< bool > m_availableDlRb
the available DL for each RB
Definition: lte-test-frequency-reuse.h:89
LteFrTestCase::m_ulBandwidth
uint16_t m_ulBandwidth
the UL bandwidth
Definition: lte-test-frequency-reuse.h:87
LteFrAreaTestCase::m_usedWrongUlRbg
bool m_usedWrongUlRbg
used wrong UL RBG?
Definition: lte-test-frequency-reuse.h:279
LteFrAreaTestCase::m_expectedDlRb
std::vector< bool > m_expectedDlRb
the expected DL per RB
Definition: lte-test-frequency-reuse.h:273
LteFrAreaTestCase::m_usedWrongUlPower
bool m_usedWrongUlPower
used wrong UL power?
Definition: lte-test-frequency-reuse.h:280
ns3::TestSuite
A suite of tests to run.
Definition: test.h:1344
sample-rng-plot.x
list x
Definition: sample-rng-plot.py:34
LteFrAreaTestCase::m_expectedUlRb
std::vector< bool > m_expectedUlRb
expected UL per RB
Definition: lte-test-frequency-reuse.h:278
LteStrictFrTestCase::m_ulCommonSubBandwidth
uint16_t m_ulCommonSubBandwidth
UL common subbandwidth.
Definition: lte-test-frequency-reuse.h:186
LteFrTestCase::m_userNum
uint32_t m_userNum
the number of UE nodes
Definition: lte-test-frequency-reuse.h:85
LteFrAreaTestCase::m_usedWrongDlRbg
bool m_usedWrongDlRbg
used wrong DL RBG?
Definition: lte-test-frequency-reuse.h:274
LteFrTestCase::m_availableUlRb
std::vector< bool > m_availableUlRb
the available UL for each RB
Definition: lte-test-frequency-reuse.h:92
LteStrictFrTestCase::m_dlEdgeSubBandwidth
uint16_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
Definition: lte-test-frequency-reuse.h:184
LteHardFrTestCase::m_dlSubBandOffset
uint8_t m_dlSubBandOffset
the DL subband offset
Definition: lte-test-frequency-reuse.h:135
LteDistributedFfrAreaTestCase
Lte Distributed Ffr Area Test Case.
Definition: lte-test-frequency-reuse.h:382
LteStrictFrTestCase::m_dlEdgeSubBandOffset
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
Definition: lte-test-frequency-reuse.h:183
LteHardFrTestCase
Test hard frequency reuse algorithm.
Definition: lte-test-frequency-reuse.h:105
LteFrAreaTestCase::m_ueMobility
Ptr< MobilityModel > m_ueMobility
the UE mobility model
Definition: lte-test-frequency-reuse.h:270
LteHardFrTestCase::m_schedulerType
std::string m_schedulerType
the scheduler type
Definition: lte-test-frequency-reuse.h:133