LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-27-2014, 09:02 PM   #1
reshmaj
LQ Newbie
 
Registered: Aug 2014
Posts: 1

Rep: Reputation: Disabled
ns2 code to deploy nodes, assign initial energy values and divide into grids


How to deploy 50 nodes in 100 x 100 m and assign different energy values to them and divide them into grids of 20 x 20 m
 
Old 12-28-2014, 06:25 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,007

Rep: Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341
Quote:
Originally Posted by reshmaj View Post
How to deploy 50 nodes in 100 x 100 m and assign different energy values to them and divide them into grids of 20 x 20 m
You write the code to do it...or you can look up examples, and modify them to fit your needs.

But you need to read the LQ Rules and the "Question Guidelines" link in my posting signature. We are NOT going to give you code or write it for you, but we will be very happy to help you if you're stuck. But you are going to have to show effort of your own. Post what you've written/tried/looked up on your own, along with the relevant details, and we can try to help you.
 
Old 04-15-2017, 03:07 AM   #3
baig7070
LQ Newbie
 
Registered: Nov 2016
Posts: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by reshmaj View Post
How to deploy 50 nodes in 100 x 100 m and assign different energy values to them and divide them into grids of 20 x 20 m
I can send you the code for that. Email me at hasanbaig94@gmail.com.
 
Old 04-15-2017, 08:00 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,684

Rep: Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286
Re #3, @baig7070.

Example grid : pbcast_sim.tcl + p_bcast.tcl
http://disc.ece.illinois.edu/downloads/lab108.html
>> http://disc.ece.illinois.edu/downloads/pbcast_sim.tcl
and http://disc.ece.illinois.edu/downloads/p_bcast.tcl

Simulation example : $ ns pbcast_sim.tcl -prob 20

Your code : Please attach as "grid__unique-name.tcl.txt
I.e. .txt is the only accepted suffix for attaching text files.
Attachments : That's the 'paper clip tool' in the 'Advanced Editor'.


-

Last edited by knudfl; 04-15-2017 at 10:27 AM.
 
Old 04-15-2017, 09:49 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,007

Rep: Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341
Quote:
Originally Posted by baig7070 View Post
I can send you the code for that. Email me at hasanbaig94@gmail.com.
Baig7070, this is a community forum. If you'd like to share code to solve problems, then post it here. But telling the community that you'll only share privately is fairly rude.
 
  


Reply

Tags
grid-ns2, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NS2 Code for Energy Based Clustering Routing Protocol in Wireless Sensor Network Sudha Rajaram Programming 6 11-26-2014 04:55 AM
How to set different energy levels to different nodes in ns2 pon Linux - Newbie 0 09-03-2014 03:44 PM
how to set different energy level to different nodes in ns2 Aska123 Linux - Software 0 02-17-2014 02:44 PM
Energy.awk required to compute remaing energy of nodes. Aska123 Linux - Wireless Networking 2 02-02-2014 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration