5G-LENA  nr-v3.0-25-g90be5d1
The 5G/NR module for the ns-3 simulator
ns3::HexagonalGridScenarioHelper Class Reference

The HexagonalGridScenarioHelper class. More...

#include "hexagonal-grid-scenario-helper.h"

+ Inheritance diagram for ns3::HexagonalGridScenarioHelper:
+ Collaboration diagram for ns3::HexagonalGridScenarioHelper:

Public Member Functions

 HexagonalGridScenarioHelper ()
 HexagonalGridScenarioHelper.
 
 ~HexagonalGridScenarioHelper () override
 ~HexagonalGridScenarioHelper
 
int64_t AssignStreams (int64_t stream)
 
void CreateScenario () override
 Create the scenario, with the configured parameter. More...
 
void CreateScenarioWithMobility (const Vector &speed, double percentage)
 This function can be used to create a scenario with UEs with mobility and define a percentage of UEs, if needed, that will have a random antenna height > 1.5 m. More...
 
Vector GetHexagonalCellCenter (const Vector &sitePos, uint16_t cellId) const
 Returns the cell center coordinates. More...
 
double GetHexagonalCellRadius () const
 Gets the radius of the hexagonal cell. More...
 
void SetMaxUeDistanceToClosestSite (double maxUeDistanceToClosestSite)
 
void SetNumRings (uint8_t numRings)
 Sets the number of outer rings of sites around the central site. More...
 
void SetResultsDir (std::string resultsDir)
 
void SetSimTag (std::string simTag)
 
- Public Member Functions inherited from ns3::NodeDistributionScenarioInterface
 ~NodeDistributionScenarioInterface () override
 ~NodeDistributionScenarioInterface
 
double GetAntennaOrientationDegrees (std::size_t cellId) const
 Returns the orientation in degrees of the antenna array for the given cellId. The orientation is the azimuth angle of the antenna bore sight. More...
 
double GetAntennaOrientationRadians (std::size_t cellId) const
 Returns the orientation in radians of the antenna array for the given cellId. More...
 
Vector GetAntennaPosition (const Vector &sitePos, uint16_t cellId) const
 Returns the position of the cell antenna. More...
 
const NodeContainer & GetBaseStations () const
 Get the list of gnb/base station nodes. More...
 
uint16_t GetCellIndex (std::size_t ueId) const
 Get the cell (base station) index the queried UE id belongs to. More...
 
std::size_t GetNumCells () const
 Gets the total number of cells deployed. More...
 
std::size_t GetNumSites () const
 Gets the number of sites with cell base stations. More...
 
uint16_t GetSectorIndex (std::size_t cellId) const
 Get the sector index the queried cell id belongs to. More...
 
uint16_t GetSiteIndex (std::size_t cellId) const
 Gets the site index the queried cell id belongs to. More...
 
const NodeContainer & GetUserTerminals () const
 Get the list of user nodes. More...
 
void SetBsNumber (std::size_t n)
 Set the number of base stations. More...
 
void SetSitesNumber (std::size_t n)
 Set number of sites/towers. More...
 
void SetUtNumber (std::size_t n)
 Set the number of UT/UE. More...
 
- Public Member Functions inherited from ns3::ScenarioParameters
virtual ~ScenarioParameters ()
 ~ScenarioParameters
 
uint32_t GetNumSectorsPerSite () const
 Gets the number of sectors per site.
 
void SetBsHeight (double h)
 SetGnbHeight. More...
 
void SetRMaParameters ()
 Sets rural Macro scenario parameters.
 
void SetScenarioParameters (const ScenarioParameters &scenario)
 Sets parameters to the specified scenario. More...
 
void SetScenarioParameters (const std::string &scenario)
 Sets parameters to the specified scenario. More...
 
void SetSectorization (SiteSectorizationType numSectors)
 Sets the number of sectors of every site. More...
 
void SetSectorization (uint32_t numSectors)
 Sets the number of sectors of every site. More...
 
void SetUMaParameters ()
 Sets the Urban Macro (UMa) scenario parameters.
 
void SetUMiParameters ()
 Sets the Urban Micro (UMi) scenario parameters.
 
void SetUtHeight (double h)
 SetUeHeight. More...
 

Additional Inherited Members

- Public Types inherited from ns3::ScenarioParameters
enum  SiteSectorizationType { NONE = 0 , SINGLE = 1 , TRIPLE = 3 }
 Type of site sectorization. More...
 
- Public Attributes inherited from ns3::ScenarioParameters
double m_antennaOffset {-1.0}
 Cell antenna offset in meters w.r.t. site location.
 
double m_bsHeight {-1.0}
 Height of gNB nodes.
 
double m_isd {-1.0}
 Inter-site distance (ISD) in meters.
 
double m_minBsUtDistance {-1.0}
 Minimum distance between BS and UT in meters.
 
SiteSectorizationType m_sectorization {NONE}
 Number of sectors per site.
 
double m_utHeight {-1.0}
 Height of UE nodes.
 
- Static Public Attributes inherited from ns3::ScenarioParameters
static double MAX_ANTENNA_OFFSET = 1
 
- Protected Attributes inherited from ns3::NodeDistributionScenarioInterface
NodeContainer m_bs
 Base stations.
 
std::size_t m_numBs
 Number of base stations to create.
 
std::size_t m_numSites
 Number of sites with base stations.
 
std::size_t m_numUt
 Number of user terminals to create.
 
NodeContainer m_ut
 User Terminals.
 

Detailed Description

The HexagonalGridScenarioHelper class.

TODO: Documentation, tests

Definition at line 23 of file hexagonal-grid-scenario-helper.h.

Member Function Documentation

◆ AssignStreams()

int64_t ns3::HexagonalGridScenarioHelper::AssignStreams ( int64_t  stream)

Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 642 of file hexagonal-grid-scenario-helper.cc.

◆ CreateScenario()

◆ CreateScenarioWithMobility()

void ns3::HexagonalGridScenarioHelper::CreateScenarioWithMobility ( const Vector &  speed,
double  percentage 
)

This function can be used to create a scenario with UEs with mobility and define a percentage of UEs, if needed, that will have a random antenna height > 1.5 m.

Parameters
speedUE speed
percentagePercentage (decimal) of UEs with random antenna height > 1.5 m

Definition at line 477 of file hexagonal-grid-scenario-helper.cc.

References ns3::NodeDistributionScenarioInterface::GetAntennaPosition(), GetHexagonalCellCenter(), ns3::NodeDistributionScenarioInterface::GetSectorIndex(), ns3::NodeDistributionScenarioInterface::GetSiteIndex(), ns3::NodeDistributionScenarioInterface::m_bs, ns3::ScenarioParameters::m_bsHeight, ns3::ScenarioParameters::m_isd, ns3::ScenarioParameters::m_minBsUtDistance, ns3::NodeDistributionScenarioInterface::m_numBs, ns3::NodeDistributionScenarioInterface::m_numUt, ns3::NodeDistributionScenarioInterface::m_ut, and ns3::ScenarioParameters::m_utHeight.

+ Here is the call graph for this function:

◆ GetHexagonalCellCenter()

Vector ns3::HexagonalGridScenarioHelper::GetHexagonalCellCenter ( const Vector &  sitePos,
uint16_t  cellId 
) const

Returns the cell center coordinates.

Parameters
sitePosSite position coordinates
cellIdCell Id

Definition at line 333 of file hexagonal-grid-scenario-helper.cc.

References ns3::ScenarioParameters::GetNumSectorsPerSite(), and ns3::NodeDistributionScenarioInterface::GetSectorIndex().

Referenced by CreateScenario(), and CreateScenarioWithMobility().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHexagonalCellRadius()

double ns3::HexagonalGridScenarioHelper::GetHexagonalCellRadius ( ) const

Gets the radius of the hexagonal cell.

Returns
Cell radius in meters

Definition at line 327 of file hexagonal-grid-scenario-helper.cc.

◆ SetNumRings()

void ns3::HexagonalGridScenarioHelper::SetNumRings ( uint8_t  numRings)

Sets the number of outer rings of sites around the central site.

Relation between the number of rings and the number of rings.

0 rings = 1 + 6 * 0 = 1 site 1 rings = 1 + 6 * 1 = 7 sites 2 rings = 1 + 6 * 2 = 13 sites 3 rings = 1 + 6 * 3 = 19 sites 4 rings = 1 + 6 * 4 = 31 sites 5 rings = 1 + 6 * 5 = 37 sites

0 rings = (1 + 6 * 0 ) * 3 = 3 gNBs 1 rings = (1 + 6 * 1 ) * 3 = 21 gNBs 2 rings = (1 + 6 * 2 ) * 3 = 39 gNBs 3 rings = (1 + 6 * 3 ) * 3 = 57 gNBs 4 rings = (1 + 6 * 5 ) * 3 = 93 gNBs 5 rings = (1 + 6 * 6 ) * 3 = 111 gNBs

If 10 UEs per gNB:

0 rings = (1 + 6 * 0 ) * 3 * 10 = 30 UEs 1 rings = (1 + 6 * 1 ) * 3 * 10 = 210 UEs 2 rings = (1 + 6 * 2 ) * 3 * 10 = 390 UEs 3 rings = (1 + 6 * 3 ) * 3 * 10 = 570 UEs 4 rings = (1 + 6 * 5 ) * 3 * 10 = 930 UEs 5 rings = (1 + 6 * 6 ) * 3 * 10 = 1110 UEs

Definition at line 288 of file hexagonal-grid-scenario-helper.cc.

References ns3::NodeDistributionScenarioInterface::m_numSites, and ns3::NodeDistributionScenarioInterface::SetSitesNumber().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: