5G-LENA nr-v3.1-69-g2dd513a7
The 5G/NR module for the ns-3 simulator
|
The HexagonalGridScenarioHelper class. More...
#include "hexagonal-grid-scenario-helper.h"
Public Member Functions | |
HexagonalGridScenarioHelper () | |
HexagonalGridScenarioHelper. | |
~HexagonalGridScenarioHelper () override | |
~HexagonalGridScenarioHelper | |
int64_t | AssignStreams (int64_t stream) |
void | CreateScenario () override |
Create the scenario, with the configured parameter. | |
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. | |
Vector | GetHexagonalCellCenter (const Vector &sitePos, uint16_t cellId) const |
Returns the cell center coordinates. | |
double | GetHexagonalCellRadius () const |
Gets the radius of the hexagonal cell. | |
void | SetMaxUeDistanceToClosestSite (double maxUeDistanceToClosestSite) |
void | SetNumRings (uint8_t numRings) |
Sets the number of outer rings of sites around the central site. | |
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. | |
double | GetAntennaOrientationRadians (std::size_t cellId) const |
Returns the orientation in radians of the antenna array for the given cellId. | |
Vector | GetAntennaPosition (const Vector &sitePos, uint16_t cellId) const |
Returns the position of the cell antenna. | |
const NodeContainer & | GetBaseStations () const |
Get the list of gnb/base station nodes. | |
uint16_t | GetCellIndex (std::size_t ueId) const |
Get the cell (base station) index the queried UE id belongs to. | |
std::size_t | GetNumCells () const |
Gets the total number of cells deployed. | |
std::size_t | GetNumSites () const |
Gets the number of sites with cell base stations. | |
uint16_t | GetSectorIndex (std::size_t cellId) const |
Get the sector index the queried cell id belongs to. | |
uint16_t | GetSiteIndex (std::size_t cellId) const |
Gets the site index the queried cell id belongs to. | |
const NodeContainer & | GetUserTerminals () const |
Get the list of user nodes. | |
void | SetBsNumber (std::size_t n) |
Set the number of base stations. | |
void | SetSitesNumber (std::size_t n) |
Set number of sites/towers. | |
void | SetUtNumber (std::size_t n) |
Set the number of UT/UE. | |
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. | |
void | SetRMaParameters () |
Sets rural Macro scenario parameters. | |
void | SetScenarioParameters (const ScenarioParameters &scenario) |
Sets parameters to the specified scenario. | |
void | SetScenarioParameters (const std::string &scenario) |
Sets parameters to the specified scenario. | |
void | SetSectorization (SiteSectorizationType numSectors) |
Sets the number of sectors of every site. | |
void | SetSectorization (uint32_t numSectors) |
Sets the number of sectors of every site. | |
void | SetUMaParameters () |
Sets the Urban Macro (UMa) scenario parameters. | |
void | SetUMiParameters () |
Sets the Urban Micro (UMi) scenario parameters. | |
void | SetUtHeight (double h) |
SetUeHeight. | |
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. | |
The HexagonalGridScenarioHelper class.
TODO: Documentation, tests
Definition at line 21 of file hexagonal-grid-scenario-helper.h.
ns3::HexagonalGridScenarioHelper::HexagonalGridScenarioHelper | ( | ) |
Definition at line 28 of file hexagonal-grid-scenario-helper.cc.
|
override |
~HexagonalGridScenarioHelper
Definition at line 34 of file hexagonal-grid-scenario-helper.cc.
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.
stream | first stream index to use |
Definition at line 640 of file hexagonal-grid-scenario-helper.cc.
|
overridevirtual |
Create the scenario, with the configured parameter.
After this call, GetGnbs and GetUes will return the containers with the nodes created and positioned.
Implements ns3::NodeDistributionScenarioInterface.
Definition at line 376 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.
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.
speed | UE speed |
percentage | Percentage (decimal) of UEs with random antenna height > 1.5 m |
Definition at line 475 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.
Vector ns3::HexagonalGridScenarioHelper::GetHexagonalCellCenter | ( | const Vector & | sitePos, |
uint16_t | cellId | ||
) | const |
Returns the cell center coordinates.
sitePos | Site position coordinates |
cellId | Cell Id |
Definition at line 331 of file hexagonal-grid-scenario-helper.cc.
References ns3::ScenarioParameters::GetNumSectorsPerSite(), and ns3::NodeDistributionScenarioInterface::GetSectorIndex().
Referenced by CreateScenario(), and CreateScenarioWithMobility().
double ns3::HexagonalGridScenarioHelper::GetHexagonalCellRadius | ( | ) | const |
Gets the radius of the hexagonal cell.
Definition at line 325 of file hexagonal-grid-scenario-helper.cc.
void ns3::HexagonalGridScenarioHelper::SetMaxUeDistanceToClosestSite | ( | double | maxUeDistanceToClosestSite | ) |
Definition at line 648 of file hexagonal-grid-scenario-helper.cc.
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 286 of file hexagonal-grid-scenario-helper.cc.
References ns3::NodeDistributionScenarioInterface::m_numSites, and ns3::NodeDistributionScenarioInterface::SetSitesNumber().
void ns3::HexagonalGridScenarioHelper::SetResultsDir | ( | std::string | resultsDir | ) |
Definition at line 17 of file hexagonal-grid-scenario-helper.cc.
void ns3::HexagonalGridScenarioHelper::SetSimTag | ( | std::string | simTag | ) |
Definition at line 23 of file hexagonal-grid-scenario-helper.cc.