23 #include "ns3/simulator.h"
25 #include "ns3/string.h"
26 #include "ns3/double.h"
28 #include "ns3/boolean.h"
29 #include <ns3/pointer.h>
30 #include "ns3/mobility-helper.h"
31 #include "ns3/lte-helper.h"
32 #include "ns3/ff-mac-scheduler.h"
34 #include "ns3/lte-enb-phy.h"
35 #include "ns3/lte-enb-net-device.h"
37 #include "ns3/lte-ue-phy.h"
38 #include "ns3/lte-ue-net-device.h"
45 #include "ns3/spectrum-value.h"
46 #include "ns3/lte-spectrum-value-helper.h"
58 :
TestSuite (
"lte-interference-fr", SYSTEM)
85 m_dlSinrDb (10 *
std::log10 (dlSinr)),
86 m_ulSinrDb (10 *
std::log10 (ulSinr))
132 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
134 positionAlloc->
Add (Vector (0.0,
m_d1, 0.0));
135 positionAlloc->
Add (Vector (
m_d2, 0.0, 0.0));
163 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
164 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
195 Simulator::Stop (
Seconds (0.200));
199 for (uint32_t i = 0; i < 12; i++)
201 double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
202 double dlSinr1Db = 10.0 * std::log10 (dlSinr1);
206 double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
210 for (uint32_t i = 12; i < 24; i++)
212 double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
215 double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
216 double dlSinr2Db = 10.0 * std::log10 (dlSinr2);
229 Simulator::Destroy ();
233 double commonDlSinr,
double commonUlSinr,
double edgeDlSinr,
double edgeUlSinr,
234 uint32_t rspqThreshold)
238 m_commonDlSinrDb (10 *
std::log10 (commonDlSinr)),
239 m_commonUlSinrDb (10 *
std::log10 (commonUlSinr)),
240 m_edgeDlSinrDb (10 *
std::log10 (edgeDlSinr)),
241 m_edgeUlSinrDb (10 *
std::log10 (edgeUlSinr)),
242 m_rspqThreshold (rspqThreshold)
244 NS_LOG_INFO (
"Creating LteInterferenceFrTestCase");
294 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
297 positionAlloc->
Add (Vector (0.0,
m_d1, 0.0));
298 positionAlloc->
Add (Vector (0.5 *
m_d2, 0.0, 0.0));
300 positionAlloc->
Add (Vector (
m_d2, 0.0, 0.0));
301 positionAlloc->
Add (Vector (0.5 *
m_d2,
m_d1, 0.0));
333 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
334 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
365 Simulator::Stop (
Seconds (2.000));
369 for (uint32_t i = 0; i < 12; i++)
371 double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
372 double dlSinr1Db = 10.0 * std::log10 (dlSinr1);
376 double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
377 double dlSinr2Db = 10.0 * std::log10 (dlSinr2);
381 for (uint32_t i = 12; i < 18; i++)
383 double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
384 double dlSinr1Db = 10.0 * std::log10 (dlSinr1);
388 double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
392 for (uint32_t i = 18; i < 24; i++)
394 double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
397 double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
398 double dlSinr2Db = 10.0 * std::log10 (dlSinr2);
412 Simulator::Destroy ();
virtual ~LteInterferenceStrictFrTestCase()
AttributeValue implementation for Boolean.
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
void Reset(void)
Reset the initial value of every attribute as well as the value of every global to what they were bef...
Hold variables of type string.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
LteInterferenceHardFrTestCase(std::string name, double d1, double d2, double dlSinr, double ulSinr)
TestCase Data.
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< LteSpectrumPhy > GetUplinkSpectrumPhy()
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
LteInterferenceStrictFrTestCase(std::string name, double d1, double d2, double commonDlSinr, double commonUlSinr, double edgeDlSinr, double edgeUlSinr, uint32_t rspqThreshold)
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
virtual ~LteInterferenceHardFrTestCase()
static LteInterferenceFrTestSuite LteInterferenceFrTestSuite
void SetFfrAlgorithmType(std::string type)
Set the type of FFR algorithm to be used by eNodeB devices.
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
This class contains the specification of EPS Bearers.
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
Hold variables of type enum.
LteInterferenceFrTestSuite()
TestSuite.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Hold an unsigned integer type.
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created.
holds a vector of ns3::NetDevice pointers
Ptr< LteSpectrumPhy > GetDownlinkSpectrumPhy()
#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...
void SetDefault(std::string name, const AttributeValue &value)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Helper class used to assign positions and mobility models to nodes.
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Time Seconds(double value)
Construct a Time in the indicated unit.
void Add(Vector v)
Add a position to the list of positions.
Test Interference level with FR algorithms.
std::string GetName(void) const
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
This class can be used to hold variables of floating point type such as 'double' or 'float'...
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
The eNodeB device implementation.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
virtual void DoRun(void)
Implementation to actually run this TestCase.
void SetFfrAlgorithmAttribute(std::string n, const AttributeValue &v)
Set an attribute for the FFR algorithm to be created.
virtual void DoRun(void)
Implementation to actually run this TestCase.
The LtePhy models the physical layer of LTE.
The LteUeNetDevice class implements the UE net device.