11#include "ns3/double.h"
12#include "ns3/radio-bearer-stats-calculator.h"
13#include "ns3/string.h"
14#include <ns3/boolean.h>
15#include <ns3/buildings-helper.h>
16#include <ns3/buildings-propagation-loss-model.h>
18#include <ns3/eps-bearer.h>
20#include <ns3/lte-enb-net-device.h>
21#include <ns3/lte-enb-phy.h>
22#include <ns3/lte-helper.h>
23#include <ns3/lte-ue-net-device.h>
24#include <ns3/lte-ue-phy.h>
25#include <ns3/lte-ue-rrc.h>
26#include <ns3/mobility-building-info.h>
27#include <ns3/mobility-helper.h>
28#include <ns3/net-device-container.h>
29#include <ns3/node-container.h>
30#include <ns3/object.h>
31#include <ns3/packet.h>
32#include <ns3/pf-ff-mac-scheduler.h>
33#include <ns3/pointer.h>
35#include <ns3/rr-ff-mac-scheduler.h>
36#include <ns3/simulator.h>
37#include <ns3/spectrum-error-model.h>
38#include <ns3/spectrum-interference.h>
59 std::vector<uint32_t> estThrDl;
60 estThrDl.push_back(119100);
61 estThrDl.push_back(183600);
62 estThrDl.push_back(193400);
64 TestCase::Duration::QUICK);
66 TestCase::Duration::QUICK);
68 TestCase::Duration::QUICK);
70 TestCase::Duration::QUICK);
82 std::ostringstream oss;
83 oss <<
" UE distance " << dist <<
" m"
84 <<
" Scheduler " << schedulerType;
97 std::vector<uint32_t> estThrDl,
98 std::string schedulerType,
100 :
TestCase(BuildNameString(dist, schedulerType, useIdealRrc)),
102 m_estThrDl(estThrDl),
103 m_schedulerType(schedulerType),
104 m_useIdealRrc(useIdealRrc)
141 lteHelper->SetAttribute(
"PathlossModel",
142 StringValue(
"ns3::HybridBuildingsPropagationLossModel"));
143 lteHelper->SetPathlossModelAttribute(
"ShadowSigmaOutdoor",
DoubleValue(0.0));
144 lteHelper->SetPathlossModelAttribute(
"ShadowSigmaIndoor",
DoubleValue(0.0));
145 lteHelper->SetPathlossModelAttribute(
"ShadowSigmaExtWalls",
DoubleValue(0.0));
157 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
158 mobility.Install(enbNodes);
160 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
161 mobility.Install(ueNodes);
168 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
169 ueDevs = lteHelper->InstallUeDevice(ueNodes);
172 lteHelper->Attach(ueDevs, enbDevs.
Get(0));
177 lteHelper->ActivateDataRadioBearer(ueDevs, bearer);
181 enbPhy->SetAttribute(
"TxPower",
DoubleValue(46.0));
182 enbPhy->SetAttribute(
"NoiseFigure",
DoubleValue(5.0));
184 mmenb->SetPosition(Vector(0.0, 0.0, 30.0));
188 mmue->SetPosition(Vector(
m_dist, 0.0, 1.0));
192 uePhy->SetAttribute(
"NoiseFigure",
DoubleValue(9.0));
195 lteHelper->EnableRlcTraces();
196 lteHelper->EnableMacTraces();
197 double simulationTime = 0.6;
198 double tolerance = 0.1;
204 enbNetDev->GetCcMap()[0]->GetAttribute(
"FfMacScheduler", ptrval);
253 double sampleTime = 0.199999;
254 for (std::size_t j = 0; j <
m_estThrDl.size(); j++)
256 NS_LOG_INFO(
"\t test with user at distance " <<
m_dist <<
" time " << sampleTime);
269 for (std::size_t i = 0; i <
m_estThrDl.size(); i++)
276 " Unfair Throughput!");
285 m_dlDataRxed.push_back(rlcStats->GetDlRxData(imsi, lcId));
This system test program creates different test cases with a single eNB and single UE.
void DoRun() override
Implementation to actually run this TestCase.
~LenaMimoTestCase() override
void GetRlcBufferSample(Ptr< RadioBearerStatsCalculator > rlcStats, uint64_t imsi, uint8_t rnti)
Get RLC buffer sample.
std::string m_schedulerType
the scheduler type
LenaMimoTestCase(uint16_t dist, std::vector< uint32_t > estThrDl, std::string schedulerType, bool useIdealRrc)
Constructor.
bool m_useIdealRrc
whether to use the ideal RRC
std::vector< uint64_t > m_dlDataRxed
DL data received.
std::vector< uint32_t > m_estThrDl
estimated throughput DL
uint16_t m_dist
the distance
static std::string BuildNameString(uint16_t dist, std::string schedulerType, bool useIdealRrc)
Builds the test name string based on provided parameter values.
static void Install(Ptr< Node > node)
Install the MobilityBuildingInfo to a node.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Hold variables of type enum.
This class contains the specification of EPS Bearers.
@ GBR_CONV_VOICE
GBR Conversational Voice.
The eNodeB device implementation.
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
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Implements the SCHED SAP and CSCHED SAP for a Proportional Fair scheduler.
void TransmissionModeConfigurationUpdate(uint16_t rnti, uint8_t txMode)
transmission mode configuration update
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
Implements the SCHED SAP and CSCHED SAP for a Round Robin scheduler.
void TransmissionModeConfigurationUpdate(uint16_t rnti, uint8_t txMode)
Transmission mode configuration update function.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static Time Now()
Return the current simulation virtual time.
static void Run()
Run the simulation.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Hold variables of type string.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
std::string CreateTempDirFilename(std::string filename)
Construct the full path to a file in a temporary directory.
std::string GetName() const
Simulation virtual time values and global simulation resolution.
void SetDefault(std::string name, const AttributeValue &value)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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.
static LenaTestMimoSuite lenaTestMimoSuite
Static variable for test initialization.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#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...
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.