The solution of adding nano-sim moodule to ns3.27 on Ubuntu 16.04 LTS

155 views
Skip to first unread message

jeje omar

unread,
Nov 20, 2017, 8:47:29 AM11/20/17
to ns-3-users

Hello everyone,

the OS I use Ubuntu 16.04 LTS  , ns3.27

The problem of adding nanosim module (http://telematics.poliba.it/index.php/en/nano-sim) to ns3.27 is solved thanks to 2 persons:

First, Tommaso Pecorella mentioned (the need to change the variable random from UniformVariable to UniformRandomVariable because UniformVariable is removed in the new version of ns3.27)



I try to read the manual, I saw the random section and how to create it, as per ns3 manual:


Ptr<UniformRandomVariable> x = CreateObject<UniformRandomVariable> ();

myRandomNo = x->GetValue();


but since I am not that expert I don't know where I am supposed to make my changes in health-care.cc file . Seyed M Buhari (mesb...@kau.edu.sa) from my university (King Abdulaziz University) solved it quickly even though he is new to ns3 but he work on ns2.

He just put the creation line as below:


The older line :

UniformVariable random;



This is the replacement:

Ptr<UniformRandomVariable> random = CreateObject<UniformRandomVariable> ();


this is first line in variable declaration

the second line


the older one :

double startTime = random.GetValue(0.0, 0.1);


This is the replacement:

double startTime = random->GetValue(0.0, 0.1);


the change just in the operator ->


and its work creating 4 output files.

alhamdu lillah.


The file is attached, hope you will get a benefit from it.


Best Regards,
Areej Omar

Faculty of Computing and Information Technology,
King Abdulaziz University,Ministry of Higher Education,
Kingdom of Saudi Arabia

health-care.cc

Tommaso Pecorella

unread,
Nov 20, 2017, 6:32:12 PM11/20/17
to ns-3-users
Thanks, I'll forward it to the author.

T.

Hanen Ferjani

unread,
Mar 21, 2018, 7:31:40 PM3/21/18
to ns-3-users

i have a proleme when i execute health-care.cc i found 4 files but i don't have same result in the article can you help me please?
Reply all
Reply to author
Forward
0 new messages