A Discrete-Event Network Simulator
API
lena-distributed-ffr.cc
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 #include "ns3/core-module.h"
23 #include "ns3/network-module.h"
24 #include "ns3/mobility-module.h"
25 #include "ns3/lte-module.h"
26 #include "ns3/spectrum-module.h"
27 #include "ns3/config-store.h"
28 #include <ns3/buildings-helper.h>
29 #include "ns3/point-to-point-epc-helper.h"
30 #include "ns3/internet-module.h"
31 #include "ns3/point-to-point-module.h"
32 #include "ns3/applications-module.h"
33 #include "ns3/log.h"
34 
35 using namespace ns3;
36 
37 NS_LOG_COMPONENT_DEFINE ("LenaDistributedFrequencyReuse");
38 
39 void
40 PrintGnuplottableUeListToFile (std::string filename)
41 {
42  std::ofstream outFile;
43  outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
44  if (!outFile.is_open ())
45  {
46  NS_LOG_ERROR ("Can't open file " << filename);
47  return;
48  }
49  for (NodeList::Iterator it = NodeList::Begin (); it != NodeList::End (); ++it)
50  {
51  Ptr<Node> node = *it;
52  int nDevs = node->GetNDevices ();
53  for (int j = 0; j < nDevs; j++)
54  {
55  Ptr<LteUeNetDevice> uedev = node->GetDevice (j)->GetObject <LteUeNetDevice> ();
56  if (uedev)
57  {
58  Vector pos = node->GetObject<MobilityModel> ()->GetPosition ();
59  outFile << "set label \"" << uedev->GetImsi ()
60  << "\" at " << pos.x << "," << pos.y << " left font \"Helvetica,4\" textcolor rgb \"grey\" front point pt 1 ps 0.3 lc rgb \"grey\" offset 0,0"
61  << std::endl;
62  }
63  }
64  }
65 }
66 
67 void
68 PrintGnuplottableEnbListToFile (std::string filename)
69 {
70  std::ofstream outFile;
71  outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
72  if (!outFile.is_open ())
73  {
74  NS_LOG_ERROR ("Can't open file " << filename);
75  return;
76  }
77  for (NodeList::Iterator it = NodeList::Begin (); it != NodeList::End (); ++it)
78  {
79  Ptr<Node> node = *it;
80  int nDevs = node->GetNDevices ();
81  for (int j = 0; j < nDevs; j++)
82  {
84  if (enbdev)
85  {
86  Vector pos = node->GetObject<MobilityModel> ()->GetPosition ();
87  outFile << "set label \"" << enbdev->GetCellId ()
88  << "\" at " << pos.x << "," << pos.y
89  << " left font \"Helvetica,4\" textcolor rgb \"white\" front point pt 2 ps 0.3 lc rgb \"white\" offset 0,0"
90  << std::endl;
91  }
92  }
93  }
94 }
95 
96 int main (int argc, char *argv[])
97 {
98  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (true));
99  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (true));
100  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
101  Config::SetDefault ("ns3::LteHelper::UsePdschForCqiGeneration", BooleanValue (true));
102 
103  //Uplink Power Control
104  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (true));
105  Config::SetDefault ("ns3::LteUePowerControl::ClosedLoop", BooleanValue (true));
106  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (false));
107 
108  uint32_t runId = 3;
109  uint16_t numberOfRandomUes = 0;
110  double simTime = 5.000;
111  bool generateSpectrumTrace = false;
112  bool generateRem = false;
113  int32_t remRbId = -1;
114  uint16_t bandwidth = 25;
115  double distance = 1000;
116  Box macroUeBox = Box (-distance * 0.5, distance * 1.5, -distance * 0.5, distance * 1.5, 1.5, 1.5);
117 
118  // Command line arguments
119  CommandLine cmd (__FILE__);
120  cmd.AddValue ("numberOfUes", "Number of UEs", numberOfRandomUes);
121  cmd.AddValue ("simTime", "Total duration of the simulation (in seconds)", simTime);
122  cmd.AddValue ("generateSpectrumTrace", "if true, will generate a Spectrum Analyzer trace", generateSpectrumTrace);
123  cmd.AddValue ("generateRem", "if true, will generate a REM and then abort the simulation", generateRem);
124  cmd.AddValue ("remRbId", "Resource block Id, for which REM will be generated,"
125  "default value is -1, what means REM will be averaged from all RBs", remRbId);
126  cmd.AddValue ("runId", "runId", runId);
127  cmd.Parse (argc, argv);
128 
130  RngSeedManager::SetRun (runId);
131 
132  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
133  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
134  lteHelper->SetEpcHelper (epcHelper);
135  lteHelper->SetHandoverAlgorithmType ("ns3::NoOpHandoverAlgorithm"); // disable automatic handover
136 
137  Ptr<Node> pgw = epcHelper->GetPgwNode ();
138 
139  // Create a single RemoteHost
140  NodeContainer remoteHostContainer;
141  remoteHostContainer.Create (1);
142  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
143  InternetStackHelper internet;
144  internet.Install (remoteHostContainer);
145 
146  // Create the Internet
147  PointToPointHelper p2ph;
148  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
149  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
150  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010)));
151  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
152  Ipv4AddressHelper ipv4h;
153  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
154  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
155  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
156 
157  // Routing of the Internet Host (towards the LTE network)
158  Ipv4StaticRoutingHelper ipv4RoutingHelper;
159  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
160  // interface 0 is localhost, 1 is the p2p device
161  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
162 
163  // Create Nodes: eNodeB and UE
164  NodeContainer enbNodes;
165  NodeContainer randomUeNodes;
166  enbNodes.Create (3);
167  randomUeNodes.Create (numberOfRandomUes);
168 
169  /* the topology is the following:
170  * eNB3
171  * / \
172  * / \
173  * / \
174  * / \
175  * distance / \ distance
176  * / UEs \
177  * / \
178  * / \
179  * / \
180  * / \
181  * eNB1-------------------------eNB2
182  * distance
183  */
184 
185  // Install Mobility Model
186  Ptr<ListPositionAllocator> enbPositionAlloc = CreateObject<ListPositionAllocator> ();
187  enbPositionAlloc->Add (Vector (0.0, 0.0, 0.0)); // eNB1
188  enbPositionAlloc->Add (Vector (distance, 0.0, 0.0)); // eNB2
189  enbPositionAlloc->Add (Vector (distance * 0.5, distance * 0.866, 0.0)); // eNB3
191  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
192  mobility.SetPositionAllocator (enbPositionAlloc);
193  mobility.Install (enbNodes);
194 
195  Ptr<RandomBoxPositionAllocator> randomUePositionAlloc = CreateObject<RandomBoxPositionAllocator> ();
196  Ptr<UniformRandomVariable> xVal = CreateObject<UniformRandomVariable> ();
197  xVal->SetAttribute ("Min", DoubleValue (macroUeBox.xMin));
198  xVal->SetAttribute ("Max", DoubleValue (macroUeBox.xMax));
199  randomUePositionAlloc->SetAttribute ("X", PointerValue (xVal));
200  Ptr<UniformRandomVariable> yVal = CreateObject<UniformRandomVariable> ();
201  yVal->SetAttribute ("Min", DoubleValue (macroUeBox.yMin));
202  yVal->SetAttribute ("Max", DoubleValue (macroUeBox.yMax));
203  randomUePositionAlloc->SetAttribute ("Y", PointerValue (yVal));
204  Ptr<UniformRandomVariable> zVal = CreateObject<UniformRandomVariable> ();
205  zVal->SetAttribute ("Min", DoubleValue (macroUeBox.zMin));
206  zVal->SetAttribute ("Max", DoubleValue (macroUeBox.zMax));
207  randomUePositionAlloc->SetAttribute ("Z", PointerValue (zVal));
208  mobility.SetPositionAllocator (randomUePositionAlloc);
209  mobility.Install (randomUeNodes);
210 
211  // Create Devices and install them in the Nodes (eNB and UE)
212  NetDeviceContainer enbDevs;
213  NetDeviceContainer randomUeDevs;
214  lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
215  lteHelper->SetSchedulerAttribute ("HarqEnabled", BooleanValue (true));
216 
217  lteHelper->SetEnbDeviceAttribute ("DlBandwidth", UintegerValue (bandwidth));
218  lteHelper->SetEnbDeviceAttribute ("UlBandwidth", UintegerValue (bandwidth));
219 
220  lteHelper->SetFfrAlgorithmType ("ns3::LteFfrDistributedAlgorithm");
221  lteHelper->SetFfrAlgorithmAttribute ("CalculationInterval", TimeValue (MilliSeconds (200)));
222  lteHelper->SetFfrAlgorithmAttribute ("RsrpDifferenceThreshold", UintegerValue (5));
223  lteHelper->SetFfrAlgorithmAttribute ("RsrqThreshold", UintegerValue (25));
224  lteHelper->SetFfrAlgorithmAttribute ("EdgeRbNum", UintegerValue (6));
225  lteHelper->SetFfrAlgorithmAttribute ("CenterPowerOffset",
227  lteHelper->SetFfrAlgorithmAttribute ("EdgePowerOffset",
229 
230  lteHelper->SetFfrAlgorithmAttribute ("CenterAreaTpc", UintegerValue (0));
231  lteHelper->SetFfrAlgorithmAttribute ("EdgeAreaTpc", UintegerValue (3));
232 
233  //ns3::LteFfrDistributedAlgorithm works with Absolute Mode Uplink Power Control
234  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (false));
235 
236  enbDevs = lteHelper->InstallEnbDevice (enbNodes);
237  randomUeDevs = lteHelper->InstallUeDevice (randomUeNodes);
238 
239  // Add X2 interface
240  lteHelper->AddX2Interface (enbNodes);
241 
242 
243  NodeContainer ueNodes;
244  ueNodes.Add (randomUeNodes);
245  NetDeviceContainer ueDevs;
246  ueDevs.Add (randomUeDevs);
247 
248  // Install the IP stack on the UEs
249  internet.Install (ueNodes);
250  Ipv4InterfaceContainer ueIpIfaces;
251  ueIpIfaces = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueDevs));
252 
253  // Attach a UE to a eNB
254  lteHelper->AttachToClosestEnb (ueDevs, enbDevs);
255 
256  // Install and start applications on UEs and remote host
257  uint16_t dlPort = 10000;
258  uint16_t ulPort = 20000;
259 
260  // randomize a bit start times to avoid simulation artifacts
261  // (e.g., buffer overflows due to packet transmissions happening
262  // exactly at the same time)
263  Ptr<UniformRandomVariable> startTimeSeconds = CreateObject<UniformRandomVariable> ();
264  startTimeSeconds->SetAttribute ("Min", DoubleValue (0));
265  startTimeSeconds->SetAttribute ("Max", DoubleValue (0.010));
266 
267  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
268  {
269  Ptr<Node> ue = ueNodes.Get (u);
270  // Set the default gateway for the UE
271  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ue->GetObject<Ipv4> ());
272  ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
273 
274  for (uint32_t b = 0; b < 1; ++b)
275  {
276  ++dlPort;
277  ++ulPort;
278 
281 
282  UdpClientHelper dlClientHelper (ueIpIfaces.GetAddress (u), dlPort);
283  dlClientHelper.SetAttribute ("MaxPackets", UintegerValue (1000000));
284  dlClientHelper.SetAttribute ("Interval", TimeValue (MilliSeconds (1.0)));
285  clientApps.Add (dlClientHelper.Install (remoteHost));
286  PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory",
288  serverApps.Add (dlPacketSinkHelper.Install (ue));
289 
290 
291  UdpClientHelper ulClientHelper (remoteHostAddr, ulPort);
292  ulClientHelper.SetAttribute ("MaxPackets", UintegerValue (1000000));
293  ulClientHelper.SetAttribute ("Interval", TimeValue (MilliSeconds (1.0)));
294  clientApps.Add (ulClientHelper.Install (ue));
295  PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory",
297  serverApps.Add (ulPacketSinkHelper.Install (remoteHost));
298 
299  Ptr<EpcTft> tft = Create<EpcTft> ();
301  dlpf.localPortStart = dlPort;
302  dlpf.localPortEnd = dlPort;
303  tft->Add (dlpf);
305  ulpf.remotePortStart = ulPort;
306  ulpf.remotePortEnd = ulPort;
307  tft->Add (ulpf);
309  lteHelper->ActivateDedicatedEpsBearer (ueDevs.Get (u), bearer, tft);
310 
311  Time startTime = Seconds (startTimeSeconds->GetValue ());
312  serverApps.Start (startTime);
313  clientApps.Start (startTime);
314  }
315  }
316 
317  //Spectrum analyzer
318  NodeContainer spectrumAnalyzerNodes;
319  spectrumAnalyzerNodes.Create (1);
320  SpectrumAnalyzerHelper spectrumAnalyzerHelper;
321 
322  if (generateSpectrumTrace)
323  {
324  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
325  //position of Spectrum Analyzer
326  positionAlloc->Add (Vector (0.0, 0.0, 0.0)); // eNB1
327 // positionAlloc->Add (Vector (distance, 0.0, 0.0)); // eNB2
328 // positionAlloc->Add (Vector (distance*0.5, distance*0.866, 0.0)); // eNB3
329 
331  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
332  mobility.SetPositionAllocator (positionAlloc);
333  mobility.Install (spectrumAnalyzerNodes);
334 
335  Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ()->GetPhy ()->GetDownlinkSpectrumPhy ()->GetObject<LteSpectrumPhy> ();
336  Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel ();
337 
338  spectrumAnalyzerHelper.SetChannel (dlChannel);
340  spectrumAnalyzerHelper.SetRxSpectrumModel (sm);
341  spectrumAnalyzerHelper.SetPhyAttribute ("Resolution", TimeValue (MicroSeconds (10)));
342  spectrumAnalyzerHelper.SetPhyAttribute ("NoisePowerSpectralDensity", DoubleValue (1e-15)); // -120 dBm/Hz
343  spectrumAnalyzerHelper.EnableAsciiAll ("spectrum-analyzer-output");
344  spectrumAnalyzerHelper.Install (spectrumAnalyzerNodes);
345  }
346 
348  if (generateRem)
349  {
350  PrintGnuplottableEnbListToFile ("enbs.txt");
351  PrintGnuplottableUeListToFile ("ues.txt");
352 
353  remHelper = CreateObject<RadioEnvironmentMapHelper> ();
354  Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ()->GetPhy ()->GetDownlinkSpectrumPhy ()->GetObject<LteSpectrumPhy> ();
355  Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel ();
356  uint32_t dlChannelId = dlChannel->GetId ();
357  NS_LOG_INFO ("DL ChannelId: " << dlChannelId);
358  remHelper->SetAttribute ("Channel", PointerValue (dlChannel));
359  remHelper->SetAttribute ("OutputFile", StringValue ("lena-distributed-ffr.rem"));
360  remHelper->SetAttribute ("XMin", DoubleValue (macroUeBox.xMin));
361  remHelper->SetAttribute ("XMax", DoubleValue (macroUeBox.xMax));
362  remHelper->SetAttribute ("YMin", DoubleValue (macroUeBox.yMin));
363  remHelper->SetAttribute ("YMax", DoubleValue (macroUeBox.yMax));
364  remHelper->SetAttribute ("Z", DoubleValue (1.5));
365  remHelper->SetAttribute ("XRes", UintegerValue (500));
366  remHelper->SetAttribute ("YRes", UintegerValue (500));
367 
368  if (remRbId >= 0)
369  {
370  remHelper->SetAttribute ("UseDataChannel", BooleanValue (true));
371  remHelper->SetAttribute ("RbId", IntegerValue (remRbId));
372  }
373 
374  remHelper->Install ();
375  // simulation will stop right after the REM has been generated
376  }
377  else
378  {
379  Simulator::Stop (Seconds (simTime));
380  }
381 
382  Simulator::Run ();
384  return 0;
385 }
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition: net-device-container.h:42
GetPosition
static Vector GetPosition(Ptr< Node > node)
Definition: wifi-ap.cc:96
ns3::SpectrumAnalyzerHelper::SetPhyAttribute
void SetPhyAttribute(std::string name, const AttributeValue &v)
Definition: spectrum-analyzer-helper.cc:104
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::InetSocketAddress
an Inet address class
Definition: inet-socket-address.h:41
ns3::DataRateValue
AttributeValue implementation for DataRate.
Definition: data-rate.h:298
ns3::UdpClientHelper
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Definition: udp-client-server-helper.h:94
ns3::EpcTft::PacketFilter::remotePortStart
uint16_t remotePortStart
start of the port number range of the remote host
Definition: epc-tft.h:137
ns3::CommandLine
Parse command-line arguments.
Definition: command-line.h:228
ns3::ListPositionAllocator::Add
void Add(Vector v)
Add a position to the list of positions.
Definition: position-allocator.cc:70
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
ns3::NoBackhaulEpcHelper::GetPgwNode
virtual Ptr< Node > GetPgwNode() const
Get the PGW node.
Definition: no-backhaul-epc-helper.cc:498
ns3::LteEnbNetDevice::GetCellId
uint16_t GetCellId() const
Definition: lte-enb-net-device.cc:224
ns3::NodeList::Begin
static Iterator Begin(void)
Definition: node-list.cc:229
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteSpectrumPhy
The LteSpectrumPhy models the physical layer of LTE.
Definition: lte-spectrum-phy.h:154
ns3::Box::zMin
double zMin
The z coordinate of the down bound of the box.
Definition: box.h:118
ns3::Ipv4AddressHelper
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Definition: ipv4-address-helper.h:48
ns3::EpcTft::PacketFilter
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
Definition: epc-tft.h:75
ns3::IntegerValue
Hold a signed integer type.
Definition: integer.h:44
ns3::LteHelper::SetEnbDeviceAttribute
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the eNodeB devices (LteEnbNetDevice) to be created.
Definition: lte-helper.cc:400
ns3::PointToPointHelper::SetDeviceAttribute
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
Definition: point-to-point-helper.cc:69
ns3::LteHelper::InstallEnbDevice
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:474
ns3::PointToPointHelper::SetChannelAttribute
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
Definition: point-to-point-helper.cc:75
ns3::MicroSeconds
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
PrintGnuplottableUeListToFile
void PrintGnuplottableUeListToFile(std::string filename)
Definition: lena-distributed-ffr.cc:40
ns3::Box::xMin
double xMin
The x coordinate of the left bound of the box.
Definition: box.h:110
ns3::Object::GetObject
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:470
ns3::LteHelper::InstallUeDevice
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:489
ns3::SpectrumAnalyzerHelper::Install
NetDeviceContainer Install(NodeContainer c) const
Definition: spectrum-analyzer-helper.cc:160
ns3::EpcTft::PacketFilter::remotePortEnd
uint16_t remotePortEnd
end of the port number range of the remote host
Definition: epc-tft.h:138
ns3::LteHelper::AttachToClosestEnb
void AttachToClosestEnb(NetDeviceContainer ueDevices, NetDeviceContainer enbDevices)
Manual attachment of a set of UE devices to the network via the closest eNodeB (with respect to dista...
Definition: lte-helper.cc:1037
ns3::EpcTft::Add
uint8_t Add(PacketFilter f)
add a PacketFilter to the Traffic Flow Template
Definition: epc-tft.cc:240
ns3::PointToPointHelper::Install
NetDeviceContainer Install(NodeContainer c)
Definition: point-to-point-helper.cc:222
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
ns3::Ipv4StaticRouting::SetDefaultRoute
void SetDefaultRoute(Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a default route to the static routing table.
Definition: ipv4-static-routing.cc:122
ns3::NodeContainer::GetN
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
Definition: node-container.cc:88
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
ns3::ObjectBase::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:185
ns3::LteUeNetDevice::GetImsi
uint64_t GetImsi() const
Get the IMSI.
Definition: lte-ue-net-device.cc:208
PrintGnuplottableEnbListToFile
void PrintGnuplottableEnbListToFile(std::string filename)
Definition: lena-distributed-ffr.cc:68
ns3::Box::yMin
double yMin
The y coordinate of the bottom bound of the box.
Definition: box.h:114
ns3::DoubleValue
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:41
ns3::NodeContainer::Create
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Definition: node-container.cc:98
ns3::RngSeedManager::SetRun
static void SetRun(uint64_t run)
Set the run number of simulation.
Definition: rng-seed-manager.cc:87
ns3::NoBackhaulEpcHelper::GetUeDefaultGatewayAddress
virtual Ipv4Address GetUeDefaultGatewayAddress()
Definition: no-backhaul-epc-helper.cc:523
startTime
double startTime
Definition: tcp-nsc-comparison.cc:45
ns3::NodeContainer::Add
void Add(NodeContainer other)
Append the contents of another NodeContainer to the end of this container.
Definition: node-container.cc:114
ns3::LteHelper::AddX2Interface
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
Definition: lte-helper.cc:1221
ns3::Ipv4AddressHelper::SetBase
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Definition: ipv4-address-helper.cc:64
ns3::Ipv4
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:77
ns3::Ipv4StaticRoutingHelper
Helper class that adds ns3::Ipv4StaticRouting objects.
Definition: ipv4-static-routing-helper.h:43
ns3::Ptr< Node >
ns3::DataRate
Class for representing data rates.
Definition: data-rate.h:89
ns3::SpectrumAnalyzerHelper
Class to allow the Spectrum Analysis.
Definition: spectrum-analyzer-helper.h:45
ns3::Ipv4StaticRoutingHelper::GetStaticRouting
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...
Definition: ipv4-static-routing-helper.cc:58
ns3::NodeList::Iterator
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Definition: node-list.h:44
ns3::Simulator::Stop
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:180
ns3::LteRrcSap::PdschConfigDedicated::dB_3
@ dB_3
Definition: lte-rrc-sap.h:164
ns3::LteHelper::SetEpcHelper
void SetEpcHelper(Ptr< EpcHelper > h)
Set the EpcHelper to be used to setup the EPC network in conjunction with the setup of the LTE radio ...
Definition: lte-helper.cc:272
ns3::InternetStackHelper::Install
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
Definition: internet-stack-helper.cc:366
ns3::NoBackhaulEpcHelper::AssignUeIpv4Address
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
Definition: no-backhaul-epc-helper.cc:504
NS_LOG_INFO
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:281
ns3::SpectrumAnalyzerHelper::EnableAsciiAll
void EnableAsciiAll(std::string prefix)
Enable ASCII output.
Definition: spectrum-analyzer-helper.cc:151
ns3::MilliSeconds
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1297
ns3::Node::GetDevice
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:144
ns3::LteUeNetDevice
The LteUeNetDevice class implements the UE net device.
Definition: lte-ue-net-device.h:57
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition: ipv4-interface-container.h:55
ns3::NodeContainer::Get
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Definition: node-container.cc:93
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
second.cmd
cmd
Definition: second.py:35
ns3::LteHelper::SetFfrAlgorithmAttribute
void SetFfrAlgorithmAttribute(std::string n, const AttributeValue &v)
Set an attribute for the FFR algorithm to be created.
Definition: lte-helper.cc:314
ns3::RngSeedManager::SetSeed
static void SetSeed(uint32_t seed)
Set the seed.
Definition: rng-seed-manager.cc:81
ns3::LteHelper::ActivateDedicatedEpsBearer
uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
Definition: lte-helper.cc:1069
ns3::Box::zMax
double zMax
The z coordinate of the up bound of the box.
Definition: box.h:120
ns3::Simulator::Run
static void Run(void)
Run the simulation.
Definition: simulator.cc:172
ns3::StringValue
Hold variables of type string.
Definition: string.h:41
ns3::PacketSinkHelper
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Definition: packet-sink-helper.h:36
NS_LOG_ERROR
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:257
ns3::NodeList::End
static Iterator End(void)
Definition: node-list.cc:235
first.clientApps
clientApps
Definition: first.py:61
ns3::SpectrumAnalyzerHelper::SetRxSpectrumModel
void SetRxSpectrumModel(Ptr< SpectrumModel > m)
Set the spectrum model used by the created SpectrumAnalyzer instances to represent incoming signals.
Definition: spectrum-analyzer-helper.cc:144
ns3::EpsBearer
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:92
ns3::LteSpectrumValueHelper::GetSpectrumModel
static Ptr< SpectrumModel > GetSpectrumModel(uint32_t earfcn, uint16_t bandwidth)
Definition: lte-spectrum-value-helper.cc:239
ns3::Ipv4Address::GetAny
static Ipv4Address GetAny(void)
Definition: ipv4-address.cc:395
ns3::LteHelper::SetHandoverAlgorithmType
void SetHandoverAlgorithmType(std::string type)
Set the type of handover algorithm to be used by eNodeB devices.
Definition: lte-helper.cc:327
ns3::LteHelper::SetSchedulerAttribute
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created.
Definition: lte-helper.cc:293
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::Ipv4AddressHelper::Assign
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Definition: ipv4-address-helper.cc:135
ns3::Simulator::Destroy
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:136
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition: application-container.h:43
ns3::LteHelper::SetFfrAlgorithmType
void SetFfrAlgorithmType(std::string type)
Set the type of FFR algorithm to be used by eNodeB devices.
Definition: lte-helper.cc:306
first.serverApps
serverApps
Definition: first.py:52
ns3::Box
a 3d box
Definition: box.h:35
ns3::TimeValue
AttributeValue implementation for Time.
Definition: nstime.h:1353
ns3::PointToPointHelper
Build a set of PointToPointNetDevice objects.
Definition: point-to-point-helper.h:45
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition: mobility-model.h:40
ns3::NodeContainer
keep track of a set of node pointers.
Definition: node-container.h:39
ns3::Ipv4Mask
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:256
ns3::Ipv4StaticRouting::AddNetworkRouteTo
void AddNetworkRouteTo(Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a network route to the static routing table.
Definition: ipv4-static-routing.cc:63
ns3::LteRrcSap::PdschConfigDedicated::dB3
@ dB3
Definition: lte-rrc-sap.h:169
ns3::Ipv4InterfaceContainer::GetAddress
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Definition: ipv4-interface-container.cc:59
ns3::EpcTft::PacketFilter::localPortStart
uint16_t localPortStart
start of the port number range of the UE
Definition: epc-tft.h:139
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::EpsBearer::NGBR_VIDEO_TCP_DEFAULT
@ NGBR_VIDEO_TCP_DEFAULT
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
Definition: eps-bearer.h:120
ns3::Config::SetDefault
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:849
ns3::Node::GetNDevices
uint32_t GetNDevices(void) const
Definition: node.cc:152
ns3::LteHelper::SetSchedulerType
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:279
ns3::RadioEnvironmentMapHelper::Install
void Install()
Deploy the RemSpectrumPhy objects that generate the map according to the specified settings.
Definition: radio-environment-map-helper.cc:191
ns3::InternetStackHelper
aggregate IP/TCP/UDP functionality to existing Nodes.
Definition: internet-stack-helper.h:88
ns3::SpectrumAnalyzerHelper::SetChannel
void SetChannel(Ptr< SpectrumChannel > channel)
Set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper.
Definition: spectrum-analyzer-helper.cc:88
ns3::NetDeviceContainer::Get
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Definition: net-device-container.cc:62
ns3::LteSpectrumPhy::GetChannel
Ptr< SpectrumChannel > GetChannel()
Definition: lte-spectrum-phy.cc:301
ns3::Box::xMax
double xMax
The x coordinate of the right bound of the box.
Definition: box.h:112
ns3::UniformRandomVariable::GetValue
double GetValue(double min, double max)
Get the next random value, as a double in the specified range .
Definition: random-variable-stream.cc:182
ns3::NetDeviceContainer::Add
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Definition: net-device-container.cc:67
ns3::LteEnbNetDevice
The eNodeB device implementation.
Definition: lte-enb-net-device.h:57
ns3::MobilityHelper
Helper class used to assign positions and mobility models to nodes.
Definition: mobility-helper.h:43
third.mobility
mobility
Definition: third.py:108
ns3::EpcTft::PacketFilter::localPortEnd
uint16_t localPortEnd
end of the port number range of the UE
Definition: epc-tft.h:140
ns3::Box::yMax
double yMax
The y coordinate of the top bound of the box.
Definition: box.h:116