Hexagonal wraparound model wraps nodes around in space based on an hexagonal deployment. More...
#include "hexagonal-wraparound-model.h"
Public Member Functions | |
HexagonalWraparoundModel () | |
Default constructor. | |
HexagonalWraparoundModel (double isd, size_t numSites) | |
Constructor. | |
void | AddSitePosition (const Vector3D &pos) |
Add a site position. | |
double | CalculateDistance (const Vector3D &a, const Vector3D &b) const |
Calculate distance after wraparound between two points. | |
Vector3D | GetSitePosition (const Vector3D &pos) const |
Calculate the site position. | |
Vector3D | GetVirtualPosition (const Vector3D txPos, const Vector3D rxPos) const override |
Get virtual position of txPos with respect to rxPos. | |
void | SetNumSites (uint8_t numSites) |
Set number of sites. | |
void | SetSiteDistance (double isd) |
Set site distance. | |
void | SetSitePositions (const std::vector< Vector3D > &positions) |
Set site positions. | |
![]() | |
WraparoundModel ()=default | |
Default constructor. | |
Ptr< MobilityModel > | GetVirtualMobilityModel (Ptr< const MobilityModel > tx, Ptr< const MobilityModel > rx) const |
Creates a disposable virtual mobility model for tx based on rx distance and a wraparound model. | |
![]() | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const final |
Get the most derived TypeId for this Object. | |
template<typename T> | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T> | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Register this type with the TypeId system. | |
![]() | |
static TypeId | GetTypeId () |
Register this type with the TypeId system. | |
![]() | |
static TypeId | GetTypeId () |
Register this type. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
Private Attributes | |
double | m_isd |
distance between sites | |
uint8_t | m_numSites |
number of sites | |
double | m_radius |
site radius | |
std::vector< Vector3D > | m_sitePositions |
site positions | |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoDispose () |
Destructor implementation. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
Hexagonal wraparound model wraps nodes around in space based on an hexagonal deployment.
Introspection did not find any typical Config paths
No Attributes are defined for this type
No TraceSources are defined for this type
Group: Spectrum
Size of this type is 104 bytes (on a 64-bit architecture).
It is used to determine a virtual position after wraparound and calculate the distance between a point of reference and the virtual position.
This model is used for the hexagonal deployments typical of mobile networks. It supports rings 0 (1 site), 1 (7 sites) and 3 rings (19 sites). To use it, set the inter-site distance (isd) and the number of sites. Then, add the position coordinates of the sites. All space coordinates in this class and its subclasses are understood to be meters or meters/s. i.e., they are all metric international units.
When GetRelativeVirtualPosition (absPos1, absPos2) is called, the relative position of the absPos2 is calculated respective to the reference coordinate absPos1, applying the wrapping based on the model described in:
R. S. Panwar and K. M. Sivalingam, "Implementation of wrap around mechanism for system level simulation of LTE cellular networks in NS3," 2017 IEEE 18th International Symposium on A World of Wireless, Mobile and Multimedia Networks (WoWMoM), Macau, 2017, pp. 1-9, doi: 10.1109/WoWMoM.2017.7974289.
Definition at line 45 of file hexagonal-wraparound-model.h.
ns3::HexagonalWraparoundModel::HexagonalWraparoundModel | ( | ) |
Default constructor.
Definition at line 44 of file hexagonal-wraparound-model.cc.
References m_numSites.
Referenced by GetTypeId().
ns3::HexagonalWraparoundModel::HexagonalWraparoundModel | ( | double | isd, |
size_t | numSites ) |
Constructor.
isd | inter-site distance |
numSites | number of sites |
Definition at line 49 of file hexagonal-wraparound-model.cc.
References m_numSites, and SetSiteDistance().
void ns3::HexagonalWraparoundModel::AddSitePosition | ( | const Vector3D & | pos | ) |
Add a site position.
pos | position of a site |
Definition at line 70 of file hexagonal-wraparound-model.cc.
References m_numSites, m_sitePositions, NS_ASSERT, and NS_LOG_FUNCTION.
double ns3::HexagonalWraparoundModel::CalculateDistance | ( | const Vector3D & | a, |
const Vector3D & | b ) const |
Calculate distance after wraparound between two points.
a | position of point a |
b | position of point b |
Definition at line 85 of file hexagonal-wraparound-model.cc.
References GetVirtualPosition().
Calculate the site position.
pos | original position |
Definition at line 97 of file hexagonal-wraparound-model.cc.
References m_numSites, m_sitePositions, and NS_ASSERT.
|
static |
Register this type with the TypeId system.
Definition at line 35 of file hexagonal-wraparound-model.cc.
References HexagonalWraparoundModel(), ns3::WraparoundModel::WraparoundModel(), and ns3::TypeId::SetParent().
|
overridevirtual |
Get virtual position of txPos with respect to rxPos.
txPos | |
rxPos |
Reimplemented from ns3::WraparoundModel.
Definition at line 114 of file hexagonal-wraparound-model.cc.
References m_isd, m_numSites, m_radius, NS_ASSERT_MSG, ns3::WRAPPING_COEFF_CLUSTER19, and ns3::WRAPPING_COEFF_CLUSTER7.
Referenced by CalculateDistance().
void ns3::HexagonalWraparoundModel::SetNumSites | ( | uint8_t | numSites | ) |
Set number of sites.
numSites | number of sites |
Definition at line 63 of file hexagonal-wraparound-model.cc.
References m_numSites, and NS_ASSERT.
void ns3::HexagonalWraparoundModel::SetSiteDistance | ( | double | isd | ) |
Set site distance.
isd | site distance |
Definition at line 56 of file hexagonal-wraparound-model.cc.
References m_isd, m_radius, and M_SQRT3.
Referenced by HexagonalWraparoundModel().
void ns3::HexagonalWraparoundModel::SetSitePositions | ( | const std::vector< Vector3D > & | positions | ) |
Set site positions.
positions | positions of all sites |
Definition at line 78 of file hexagonal-wraparound-model.cc.
References m_numSites, m_sitePositions, and NS_ASSERT.
|
private |
distance between sites
Definition at line 113 of file hexagonal-wraparound-model.h.
Referenced by GetVirtualPosition(), and SetSiteDistance().
|
private |
number of sites
Definition at line 115 of file hexagonal-wraparound-model.h.
Referenced by HexagonalWraparoundModel(), HexagonalWraparoundModel(), AddSitePosition(), GetSitePosition(), GetVirtualPosition(), SetNumSites(), and SetSitePositions().
|
private |
site radius
Definition at line 114 of file hexagonal-wraparound-model.h.
Referenced by GetVirtualPosition(), and SetSiteDistance().
|
private |
site positions
Definition at line 116 of file hexagonal-wraparound-model.h.
Referenced by AddSitePosition(), GetSitePosition(), and SetSitePositions().