Randomly set energy to nodes

71 views
Skip to first unread message

Eric

unread,
Oct 1, 2021, 4:19:56 AM10/1/21
to ns-3-users
Hi, I I wrote aodv simulation code.
And I set the energy to the nodes, and I want to set the energy differently for each node.
Do you have any writing or files that I can refer to?

I uploaded my scenario. Please tell me how to randomly set energy.

Thank you
aodv.cc

Eric

unread,
Oct 12, 2021, 7:16:20 AM10/12/21
to ns-3-users
I want to set the energy to each node randomly or differently.
I searched for it in ns-3 groups, but I can't find it out.
Is there any way?

2021년 10월 1일 금요일 오후 5시 19분 56초 UTC+9에 Eric님이 작성:

Eric

unread,
Oct 13, 2021, 4:12:17 AM10/13/21
to ns-3-users
I tried to use "ns3::UniformRandomVarible".
set energy.PNG
But, Simulation not working.

Error msg is
msg.PNG

How to solve it?
2021년 10월 12일 화요일 오후 8시 16분 20초 UTC+9에 Eric님이 작성:

Charles Pandian

unread,
Oct 13, 2021, 10:47:30 AM10/13/21
to ns-3-...@googlegroups.com
 I think, basicSourceHelper.Set function will only expect a Double Value as a parameter, and it could not phrase a string value.

Charles Pandian,



--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/932c3d51-c731-441f-ad1c-ff12b1fe1a4en%40googlegroups.com.

Eric

unread,
Oct 13, 2021, 9:45:40 PM10/13/21
to ns-3-users
Thank you for reply, Charles

So, isn't there a way to set the energy for each node individually?

2021년 10월 13일 수요일 오후 11시 47분 30초 UTC+9에 igs...@gmail.com님이 작성:
Reply all
Reply to author
Forward
0 new messages