A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lena-frequency-reuse.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/config-store.h"
27 #include <ns3/buildings-helper.h>
28 #include <ns3/spectrum-module.h>
29 #include <ns3/log.h>
30 
31 using namespace ns3;
32 
33 NS_LOG_COMPONENT_DEFINE ("LenaFrequencyReuse");
34 
35 void
36 PrintGnuplottableUeListToFile (std::string filename)
37 {
38  std::ofstream outFile;
39  outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
40  if (!outFile.is_open ())
41  {
42  NS_LOG_ERROR ("Can't open file " << filename);
43  return;
44  }
45  for (NodeList::Iterator it = NodeList::Begin (); it != NodeList::End (); ++it)
46  {
47  Ptr<Node> node = *it;
48  int nDevs = node->GetNDevices ();
49  for (int j = 0; j < nDevs; j++)
50  {
51  Ptr<LteUeNetDevice> uedev = node->GetDevice (j)->GetObject <LteUeNetDevice> ();
52  if (uedev)
53  {
54  Vector pos = node->GetObject<MobilityModel> ()->GetPosition ();
55  outFile << "set label \"" << uedev->GetImsi ()
56  << "\" 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"
57  << std::endl;
58  }
59  }
60  }
61 }
62 
63 void
64 PrintGnuplottableEnbListToFile (std::string filename)
65 {
66  std::ofstream outFile;
67  outFile.open (filename.c_str (), std::ios_base::out | std::ios_base::trunc);
68  if (!outFile.is_open ())
69  {
70  NS_LOG_ERROR ("Can't open file " << filename);
71  return;
72  }
73  for (NodeList::Iterator it = NodeList::Begin (); it != NodeList::End (); ++it)
74  {
75  Ptr<Node> node = *it;
76  int nDevs = node->GetNDevices ();
77  for (int j = 0; j < nDevs; j++)
78  {
79  Ptr<LteEnbNetDevice> enbdev = node->GetDevice (j)->GetObject <LteEnbNetDevice> ();
80  if (enbdev)
81  {
82  Vector pos = node->GetObject<MobilityModel> ()->GetPosition ();
83  outFile << "set label \"" << enbdev->GetCellId ()
84  << "\" at " << pos.x << "," << pos.y
85  << " left font \"Helvetica,4\" textcolor rgb \"white\" front point pt 2 ps 0.3 lc rgb \"white\" offset 0,0"
86  << std::endl;
87  }
88  }
89  }
90 }
91 
92 int main (int argc, char *argv[])
93 {
94  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (true));
95  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (true));
96  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
97  Config::SetDefault ("ns3::LteHelper::UsePdschForCqiGeneration", BooleanValue (true));
98 
99  //Uplink Power Control
100  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (true));
101  Config::SetDefault ("ns3::LteUePowerControl::ClosedLoop", BooleanValue (true));
102  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (false));
103 
104  uint32_t runId = 3;
105  uint16_t numberOfRandomUes = 0;
106  double simTime = 2.500;
107  bool generateSpectrumTrace = false;
108  bool generateRem = false;
109  int32_t remRbId = -1;
110  uint8_t bandwidth = 25;
111  double distance = 1000;
112  Box macroUeBox = Box (-distance * 0.5, distance * 1.5, -distance * 0.5, distance * 1.5, 1.5, 1.5);
113 
114  // Command line arguments
115  CommandLine cmd;
116  cmd.AddValue ("numberOfUes", "Number of random UEs", numberOfRandomUes);
117  cmd.AddValue ("simTime", "Total duration of the simulation (in seconds)", simTime);
118  cmd.AddValue ("generateSpectrumTrace", "if true, will generate a Spectrum Analyzer trace", generateSpectrumTrace);
119  cmd.AddValue ("generateRem", "if true, will generate a REM and then abort the simulation", generateRem);
120  cmd.AddValue ("remRbId", "Resource Block Id, for which REM will be generated,"
121  "default value is -1, what means REM will be averaged from all RBs", remRbId);
122  cmd.AddValue ("runId", "runId", runId);
123  cmd.Parse (argc, argv);
124 
126  RngSeedManager::SetRun (runId);
127 
128  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
129 
130  // Create Nodes: eNodeB and UE
131  NodeContainer enbNodes;
132  NodeContainer centerUeNodes;
133  NodeContainer edgeUeNodes;
134  NodeContainer randomUeNodes;
135  enbNodes.Create (3);
136  centerUeNodes.Create (3);
137  edgeUeNodes.Create (3);
138  randomUeNodes.Create (numberOfRandomUes);
139 
140 
141 /* the topology is the following:
142  * eNB3
143  * / \
144  * / \
145  * / \
146  * / \
147  * distance / \ distance
148  * / UEs \
149  * / \
150  * / \
151  * / \
152  * / \
153  * eNB1-------------------------eNB2
154  * distance
155  */
156 
157  // Install Mobility Model
158  Ptr<ListPositionAllocator> enbPositionAlloc = CreateObject<ListPositionAllocator> ();
159  enbPositionAlloc->Add (Vector (0.0, 0.0, 0.0)); // eNB1
160  enbPositionAlloc->Add (Vector (distance, 0.0, 0.0)); // eNB2
161  enbPositionAlloc->Add (Vector (distance * 0.5, distance * 0.866, 0.0)); // eNB3
162  MobilityHelper mobility;
163  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
164  mobility.SetPositionAllocator (enbPositionAlloc);
165  mobility.Install (enbNodes);
166 
167 
168  Ptr<ListPositionAllocator> edgeUePositionAlloc = CreateObject<ListPositionAllocator> ();
169  edgeUePositionAlloc->Add (Vector (distance * 0.5, distance * 0.28867, 0.0)); // edgeUE1
170  edgeUePositionAlloc->Add (Vector (distance * 0.5, distance * 0.28867, 0.0)); // edgeUE2
171  edgeUePositionAlloc->Add (Vector (distance * 0.5, distance * 0.28867, 0.0)); // edgeUE3
172  mobility.SetPositionAllocator (edgeUePositionAlloc);
173  mobility.Install (edgeUeNodes);
174 
175 
176  Ptr<ListPositionAllocator> centerUePositionAlloc = CreateObject<ListPositionAllocator> ();
177  centerUePositionAlloc->Add (Vector (0.0, 0.0, 0.0)); // centerUE1
178  centerUePositionAlloc->Add (Vector (distance, 0.0, 0.0)); // centerUE2
179  centerUePositionAlloc->Add (Vector (distance * 0.5, distance * 0.866, 0.0)); // centerUE3
180  mobility.SetPositionAllocator (centerUePositionAlloc);
181  mobility.Install (centerUeNodes);
182 
183 
184  Ptr<RandomBoxPositionAllocator> randomUePositionAlloc = CreateObject<RandomBoxPositionAllocator> ();
185  Ptr<UniformRandomVariable> xVal = CreateObject<UniformRandomVariable> ();
186  xVal->SetAttribute ("Min", DoubleValue (macroUeBox.xMin));
187  xVal->SetAttribute ("Max", DoubleValue (macroUeBox.xMax));
188  randomUePositionAlloc->SetAttribute ("X", PointerValue (xVal));
189  Ptr<UniformRandomVariable> yVal = CreateObject<UniformRandomVariable> ();
190  yVal->SetAttribute ("Min", DoubleValue (macroUeBox.yMin));
191  yVal->SetAttribute ("Max", DoubleValue (macroUeBox.yMax));
192  randomUePositionAlloc->SetAttribute ("Y", PointerValue (yVal));
193  Ptr<UniformRandomVariable> zVal = CreateObject<UniformRandomVariable> ();
194  zVal->SetAttribute ("Min", DoubleValue (macroUeBox.zMin));
195  zVal->SetAttribute ("Max", DoubleValue (macroUeBox.zMax));
196  randomUePositionAlloc->SetAttribute ("Z", PointerValue (zVal));
197  mobility.SetPositionAllocator (randomUePositionAlloc);
198  mobility.Install (randomUeNodes);
199 
200  // Create Devices and install them in the Nodes (eNB and UE)
201  NetDeviceContainer enbDevs;
202  NetDeviceContainer edgeUeDevs;
203  NetDeviceContainer centerUeDevs;
204  NetDeviceContainer randomUeDevs;
205  lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
206  lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::PUSCH_UL_CQI));
207  lteHelper->SetEnbDeviceAttribute ("DlBandwidth", UintegerValue (bandwidth));
208  lteHelper->SetEnbDeviceAttribute ("UlBandwidth", UintegerValue (bandwidth));
209 
210  std::string frAlgorithmType = lteHelper->GetFfrAlgorithmType ();
211  NS_LOG_DEBUG ("FrAlgorithmType: " << frAlgorithmType);
212 
213  if (frAlgorithmType == "ns3::LteFrHardAlgorithm")
214  {
215 
216  //Nothing to configure here in automatic mode
217 
218  }
219  else if (frAlgorithmType == "ns3::LteFrStrictAlgorithm")
220  {
221 
222  lteHelper->SetFfrAlgorithmAttribute ("RsrqThreshold", UintegerValue (32));
223  lteHelper->SetFfrAlgorithmAttribute ("CenterPowerOffset",
225  lteHelper->SetFfrAlgorithmAttribute ("EdgePowerOffset",
227  lteHelper->SetFfrAlgorithmAttribute ("CenterAreaTpc", UintegerValue (0));
228  lteHelper->SetFfrAlgorithmAttribute ("EdgeAreaTpc", UintegerValue (3));
229 
230  //ns3::LteFrStrictAlgorithm works with Absolute Mode Uplink Power Control
231  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (false));
232 
233  }
234  else if (frAlgorithmType == "ns3::LteFrSoftAlgorithm")
235  {
236 
237  lteHelper->SetFfrAlgorithmAttribute ("AllowCenterUeUseEdgeSubBand", BooleanValue (true));
238  lteHelper->SetFfrAlgorithmAttribute ("RsrqThreshold", UintegerValue (25));
239  lteHelper->SetFfrAlgorithmAttribute ("CenterPowerOffset",
241  lteHelper->SetFfrAlgorithmAttribute ("EdgePowerOffset",
243  lteHelper->SetFfrAlgorithmAttribute ("CenterAreaTpc", UintegerValue (0));
244  lteHelper->SetFfrAlgorithmAttribute ("EdgeAreaTpc", UintegerValue (3));
245 
246  //ns3::LteFrSoftAlgorithm works with Absolute Mode Uplink Power Control
247  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (false));
248 
249  }
250  else if (frAlgorithmType == "ns3::LteFfrSoftAlgorithm")
251  {
252 
253  lteHelper->SetFfrAlgorithmAttribute ("CenterRsrqThreshold", UintegerValue (30));
254  lteHelper->SetFfrAlgorithmAttribute ("EdgeRsrqThreshold", UintegerValue (25));
255  lteHelper->SetFfrAlgorithmAttribute ("CenterAreaPowerOffset",
257  lteHelper->SetFfrAlgorithmAttribute ("MediumAreaPowerOffset",
259  lteHelper->SetFfrAlgorithmAttribute ("EdgeAreaPowerOffset",
261  lteHelper->SetFfrAlgorithmAttribute ("CenterAreaTpc", UintegerValue (1));
262  lteHelper->SetFfrAlgorithmAttribute ("MediumAreaTpc", UintegerValue (2));
263  lteHelper->SetFfrAlgorithmAttribute ("EdgeAreaTpc", UintegerValue (3));
264 
265  //ns3::LteFfrSoftAlgorithm works with Absolute Mode Uplink Power Control
266  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (false));
267 
268  }
269  else if (frAlgorithmType == "ns3::LteFfrEnhancedAlgorithm")
270  {
271 
272  lteHelper->SetFfrAlgorithmAttribute ("RsrqThreshold", UintegerValue (25));
273  lteHelper->SetFfrAlgorithmAttribute ("DlCqiThreshold", UintegerValue (10));
274  lteHelper->SetFfrAlgorithmAttribute ("UlCqiThreshold", UintegerValue (10));
275  lteHelper->SetFfrAlgorithmAttribute ("CenterAreaPowerOffset",
277  lteHelper->SetFfrAlgorithmAttribute ("EdgeAreaPowerOffset",
279  lteHelper->SetFfrAlgorithmAttribute ("CenterAreaTpc", UintegerValue (0));
280  lteHelper->SetFfrAlgorithmAttribute ("EdgeAreaTpc", UintegerValue (3));
281 
282  //ns3::LteFfrEnhancedAlgorithm works with Absolute Mode Uplink Power Control
283  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (false));
284 
285  }
286  else if (frAlgorithmType == "ns3::LteFfrDistributedAlgorithm")
287  {
288 
289  NS_FATAL_ERROR ("ns3::LteFfrDistributedAlgorithm not supported in this example. Please run lena-distributed-ffr");
290 
291  }
292  else
293  {
294  lteHelper->SetFfrAlgorithmType ("ns3::LteFrNoOpAlgorithm");
295  }
296 
297  lteHelper->SetFfrAlgorithmAttribute ("FrCellTypeId", UintegerValue (1));
298  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (0)));
299 
300  lteHelper->SetFfrAlgorithmAttribute ("FrCellTypeId", UintegerValue (2));
301  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (1)));
302 
303  lteHelper->SetFfrAlgorithmAttribute ("FrCellTypeId", UintegerValue (3));
304  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (2)));
305 
306  //FR algorithm reconfiguration if needed
307  PointerValue tmp;
308  enbDevs.Get (0)->GetAttribute ("LteFfrAlgorithm", tmp);
309  Ptr<LteFfrAlgorithm> ffrAlgorithm = DynamicCast<LteFfrAlgorithm> (tmp.GetObject ());
310  ffrAlgorithm->SetAttribute ("FrCellTypeId", UintegerValue (1));
311 
312 
313  //Install Ue Device
314  edgeUeDevs = lteHelper->InstallUeDevice (edgeUeNodes);
315  centerUeDevs = lteHelper->InstallUeDevice (centerUeNodes);
316  randomUeDevs = lteHelper->InstallUeDevice (randomUeNodes);
317 
318  // Attach edge UEs to eNbs
319  for (uint32_t i = 0; i < edgeUeDevs.GetN (); i++)
320  {
321  lteHelper->Attach (edgeUeDevs.Get (i), enbDevs.Get (i));
322  }
323  // Attach center UEs to eNbs
324  for (uint32_t i = 0; i < centerUeDevs.GetN (); i++)
325  {
326  lteHelper->Attach (centerUeDevs.Get (i), enbDevs.Get (i));
327  }
328 
329  // Attach UE to a eNB
330  lteHelper->AttachToClosestEnb (randomUeDevs, enbDevs);
331 
332  // Activate a data radio bearer
334  EpsBearer bearer (q);
335  lteHelper->ActivateDataRadioBearer (edgeUeDevs, bearer);
336  lteHelper->ActivateDataRadioBearer (centerUeDevs, bearer);
337  lteHelper->ActivateDataRadioBearer (randomUeDevs, bearer);
338 
339  //Spectrum analyzer
340  NodeContainer spectrumAnalyzerNodes;
341  spectrumAnalyzerNodes.Create (1);
342  SpectrumAnalyzerHelper spectrumAnalyzerHelper;
343 
344  if (generateSpectrumTrace)
345  {
346  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
347  //position of Spectrum Analyzer
348 // positionAlloc->Add (Vector (0.0, 0.0, 0.0)); // eNB1
349 // positionAlloc->Add (Vector (distance, 0.0, 0.0)); // eNB2
350  positionAlloc->Add (Vector (distance * 0.5, distance * 0.866, 0.0)); // eNB3
351 
352  MobilityHelper mobility;
353  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
354  mobility.SetPositionAllocator (positionAlloc);
355  mobility.Install (spectrumAnalyzerNodes);
356 
357  Ptr<LteSpectrumPhy> enbDlSpectrumPhy = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ()->GetPhy ()->GetDownlinkSpectrumPhy ()->GetObject<LteSpectrumPhy> ();
358  Ptr<SpectrumChannel> dlChannel = enbDlSpectrumPhy->GetChannel ();
359 
360  spectrumAnalyzerHelper.SetChannel (dlChannel);
362  spectrumAnalyzerHelper.SetRxSpectrumModel (sm);
363  spectrumAnalyzerHelper.SetPhyAttribute ("Resolution", TimeValue (MicroSeconds (10)));
364  spectrumAnalyzerHelper.SetPhyAttribute ("NoisePowerSpectralDensity", DoubleValue (1e-15)); // -120 dBm/Hz
365  spectrumAnalyzerHelper.EnableAsciiAll ("spectrum-analyzer-output");
366  spectrumAnalyzerHelper.Install (spectrumAnalyzerNodes);
367  }
368 
370  if (generateRem)
371  {
372  PrintGnuplottableEnbListToFile ("enbs.txt");
373  PrintGnuplottableUeListToFile ("ues.txt");
374 
375  remHelper = CreateObject<RadioEnvironmentMapHelper> ();
376  remHelper->SetAttribute ("ChannelPath", StringValue ("/ChannelList/0"));
377  remHelper->SetAttribute ("OutputFile", StringValue ("lena-frequency-reuse.rem"));
378  remHelper->SetAttribute ("XMin", DoubleValue (macroUeBox.xMin));
379  remHelper->SetAttribute ("XMax", DoubleValue (macroUeBox.xMax));
380  remHelper->SetAttribute ("YMin", DoubleValue (macroUeBox.yMin));
381  remHelper->SetAttribute ("YMax", DoubleValue (macroUeBox.yMax));
382  remHelper->SetAttribute ("Z", DoubleValue (1.5));
383  remHelper->SetAttribute ("XRes", UintegerValue (500));
384  remHelper->SetAttribute ("YRes", UintegerValue (500));
385  if (remRbId >= 0)
386  {
387  remHelper->SetAttribute ("UseDataChannel", BooleanValue (true));
388  remHelper->SetAttribute ("RbId", IntegerValue (remRbId));
389  }
390 
391  remHelper->Install ();
392  // simulation will stop right after the REM has been generated
393  }
394  else
395  {
396  Simulator::Stop (Seconds (simTime));
397  }
398 
399  Simulator::Run ();
401  return 0;
402 }
double x
x coordinate of vector
Definition: vector.h:49
double zMin
Definition: box.h:97
Hold a bool native type.
Definition: boolean.h:38
NetDeviceContainer InstallEnbDevice(NodeContainer c)
create a set of eNB devices
Definition: lte-helper.cc:382
uint16_t GetCellId() const
hold variables of type string
Definition: string.h:18
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
NetDeviceContainer Install(NodeContainer c) const
static Vector GetPosition(Ptr< Node > node)
Definition: multirate.cc:315
Ptr< Object > GetObject(void) const
Definition: pointer.cc:49
uint64_t GetImsi() const
static void Run(void)
Run the simulation until one of:
Definition: simulator.cc:157
Hold a signed integer type.
Definition: integer.h:45
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
Definition: lte-helper.cc:709
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:170
#define NS_FATAL_ERROR(msg)
fatal error handling
Definition: fatal-error.h:95
void PrintGnuplottableEnbListToFile(std::string filename)
static Ptr< SpectrumModel > GetSpectrumModel(uint16_t earfcn, uint8_t bandwidth)
double xMax
Definition: box.h:91
Ptr< SpectrumChannel > GetChannel()
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Call ActivateDataRadioBearer (ueDevice, bearer) for each UE device in a given set.
Definition: lte-helper.cc:963
a 3d vector
Definition: vector.h:31
void SetFfrAlgorithmType(std::string type)
Definition: lte-helper.cc:252
static void SetRun(uint64_t run)
Set the run number of simulation.
a 3d box
Definition: box.h:33
void SetSchedulerType(std::string type)
Definition: lte-helper.cc:225
double yMax
Definition: box.h:95
uint32_t GetN(void) const
Get the number of Ptr stored in this container.
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:785
Keep track of the current position and velocity of an object.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
hold variables of type 'enum'
Definition: enum.h:37
void PrintGnuplottableUeListToFile(std::string filename)
Attribute for objects of type ns3::Time.
Definition: nstime.h:912
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Hold an unsigned integer type.
Definition: uinteger.h:46
static Iterator End(void)
Definition: node-list.cc:234
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
set an attribute for the scheduler to be created
Definition: lte-helper.cc:239
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:134
double yMin
Definition: box.h:93
Parse command-line arguments.
Definition: command-line.h:196
static void Destroy(void)
Every event scheduled by the Simulator::insertAtDestroy method is invoked.
Definition: simulator.cc:121
void SetPhyAttribute(std::string name, const AttributeValue &v)
uint32_t GetNDevices(void) const
Definition: node.cc:142
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:677
keep track of a set of node pointers.
hold objects of type Ptr
Definition: pointer.h:33
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Definition: node-list.h:44
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())
void Install()
Deploy the RemSpectrumPhy objects that generate the map according to the specified settings...
double y
y coordinate of vector
Definition: vector.h:53
double zMax
Definition: box.h:99
static void SetSeed(uint32_t seed)
set the seed it will duplicate the seed value 6 times
NetDeviceContainer InstallUeDevice(NodeContainer c)
create a set of UE devices
Definition: lte-helper.cc:397
Helper class used to assign positions and mobility models to nodes.
static Iterator Begin(void)
Definition: node-list.cc:228
void AddValue(const std::string &name, const std::string &help, T &value)
Add a program argument, assigning to POD.
Definition: command-line.h:471
static void Stop(void)
If an event invokes this method, it will be the last event scheduled by the Simulator::run method bef...
Definition: simulator.cc:165
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:213
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:845
void SetChannel(Ptr< SpectrumChannel > channel)
set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper ...
void SetRxSpectrumModel(Ptr< SpectrumModel > m)
Set the spectrum model used by the created SpectrumAnalyzer instances to represent incoming signals...
void EnableAsciiAll(std::string prefix)
Enable ASCII output.
void Parse(int argc, char *argv[])
Parse the program arguments.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:861
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:193
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...
int main(int argc, char *argv[])
Hold a floating point type.
Definition: double.h:41
std::string GetFfrAlgorithmType() const
Definition: lte-helper.cc:246
void SetAttribute(std::string name, const AttributeValue &value)
Definition: object-base.cc:176
The eNodeB device implementation.
Ptr< T > GetObject(void) const
Definition: object.h:362
void SetFfrAlgorithmAttribute(std::string n, const AttributeValue &v)
set an attribute for the FFR algorithm to be created
Definition: lte-helper.cc:260
Qci
QoS Class Indicator.
Definition: eps-bearer.h:77
double xMin
Definition: box.h:89
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
set an attribute for the LteEnbNetDevice to be created
Definition: lte-helper.cc:307
The LteSpectrumPhy models the physical layer of LTE.
The LteUeNetDevice class implements the UE net device.