I am carrying out a research project titled:
“An Adaptive Handover Strategy for 5G Ultra-Dense Networks under Stochastic Mobility and Fading Conditions.”
This work requires the integration of three key layers of the ns-3 simulation framework:
Mobility Layer – to implement a stochastic movement model for mobile users.
Measurement and Channel Layer – to model realistic radio conditions including RSRP, SINR, path loss, shadowing, and interference.
Handover Decision Layer – to override the default 3GPP A3/A5 event-based mechanism and implement a custom adaptive handover algorithm.
Since I am new to ns-3, I require clear and complete documentation on:
How to correctly install ns-3.41
How to enable and integrate the 5G-LENA NR module
How to verify that the installation is successful
How to run initial NR examples to confirm proper setup
Kindly assist me with the step-by-step installation guide and configuration instructions.
After the installation of ns-3 with 5G Lena. I wanted to implement my research work on ns-3 using the following steps:
A.
Topology
& Conditions: scratch/ahs-5gudn-smfc-sim.cc
(New Simulation Script)
1.
Create a new file in the scratch
directory.
2.
Implement the UDN topology: Deploy 5G gNBs and the UE using
nr-helper.
3.
Configure the channel model: Use nr-channel
and add propagation loss (e.g., LogNormalShadowingModel
and 3gppPropagationLossModel).
4.
Apply the RandomWaypointMobilityModel
to the UE.
B.
Metric
Collection: contrib/nr/model/nr-ue-net-device.cc
1.
Locate where RSRP/SINR measurements are processed (often in the
Measurement Report generation).
2.
Add custom tracing mechanisms (e.g., ns3::TraceSource)
to log RSRP/SINR to a file or a custom data structure accessible by
your logic.
B.
Handover
Logic Hook: contrib/nr/model/nr-rrc-protocol-real.cc
1.
Identify the function that processes the Measurement
Report
(MR) and triggers the RRC state machine decision. This is your
primary hook point.
2.
Modify the MR handling to pass the relevant metrics to your custom
TOPSIS/Dwell Time class instead of the standard A3/A5 event handling
logic.
Step
2: Algorithm Implementation (The Core Research)
A. Implement the Stochastic Mobility and Fading-aware Dwell Time Prediction (SMFDTP) algorithm
TOPSIS/SAWAM Class
TOPSIS/SAWAM Implementation
Decision & Trigger
Step
3: Validation and AnalysisDuring the compilation (build) proc process I encounter so many errors. Some of the errors are shown below:
/home/alibawa/nrRepo/ns-3-dev/contrib/nr/model/nr-rrc-protocol-ideal.h:75:18: error: ‘ns3::ns3::NrUeRrcSapUser::SetupParameters’ has not been declared
75 | void DoSetup(NrUeRrcSapUser::SetupParameters params);
| ^~~~~~~~~~~~~~
/home/alibawa/nrRepo/ns-3-dev/contrib/nr/model/nr-ue-net-device.h:138:9: error: ‘NrEpcUeNas’ was not declared in this scope; did you mean ‘ns3::ns3::NrEpcUeNas’?
138 | Ptr<NrEpcUeNas> GetNas() const;
| ^~~~~~~~~~
| ns3::ns3::NrEpcUeNas
/home/alibawa/nrRepo/ns-3-dev/contrib/nr/model/nr-ue-net-device.h:150:27: error: ‘NrInitialAssociation’ was not declared in this scope; did you mean ‘ns3::ns3::NrInitialAssociation’?
150 | void SetInitAssoc(Ptr<NrInitialAssociation> initAssoc);
| ^~~~~~~~~~~~~~~~~~~~
| ns3::ns3::NrInitialAssociation
/home/alibawa/nrRepo/ns-3-dev/contrib/nr/model/nr-ue-net-device.h:170:51: error: ‘BandwidthPartUe’ is not a member of ‘ns3::ns3’; did you mean ‘BandwidthPartUe’?
170 | void SetCcMap(std::map<uint8_t, ns3::Ptr<ns3::BandwidthPartUe>> ccm);
/home/alibawa/nrRepo/ns-3-dev/contrib/nr/model/nr-ue-net-device.h:175:37: error: template argument 2 is invalid
175 | std::map<uint8_t, ns3::Ptr<ns3::BandwidthPartUe>> GetCcMap(); // Use ns3::Ptr and ns3::BPUe
| ^~~~~~~~~~~~~~~
Kindly
assist me with some procedures or guidelines on how to successfully
implement my work on ns3 5G Lena.
Thanks.
--
You received this message because you are subscribed to the Google Groups "5G-LENA-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 5g-lena-user...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/5g-lena-users/2d82e24b-192c-49ed-ad15-2c8a23d2c2f5n%40googlegroups.com.
I am running ns3 with 5G Lena. I build successfully as you can see below:
alibawa@alibawa:~/nrRepo/ns-3-dev$ ./ns3 build
[0/2] Re-checking globbed directories...
ninja: no work to do.
Finished executing the following commands:
/usr/bin/cmake --build /home/alibawa/nrRepo/ns-3-dev/cmake-cache -j 7
Bu when I attept to conpile I got the error below:
alibawa@alibawa:~/nrRepo/ns-3-dev$ ./ns3 run scratch/ahs-test.cc
[0/2] Re-checking globbed directories...
ninja: no work to do.
NS_ASSERT failed, cond="m_ptr", msg="Attempted to dereference zero pointer", +0.000000000s -1 file=/home/alibawa/nrRepo/ns-3-dev/src/core/model/ptr.h, line=712
NS_FATAL, terminating
terminate called without an active exception
Command 'build/scratch/ns3.46-ahs-test-default' died with <Signals.SIGABRT: 6>.
I googled the error through chatgpt and google gemini several times but there are no results. Kindly assist me on how to fix the error. Thank you very much for the support
To view this discussion, visit https://groups.google.com/d/msgid/5g-lena-users/a59195f3-9252-4e86-b7ca-8c0c96dc9c88n%40googlegroups.com.